because china and india are more heavily populated than other countriesthe map shows little contrast china and india are each home to over billion peoplewhereas the next most populous country is the united states with approximately million people instead of plotting all countries as one grouplet' separate the countries into three population levelsless than millionbetween million and billionand more than billionworld_ population py --snip-build dictionary of population data cc_populations {for pop_dict in pop_dataif pop_dict['year'=' '--snip-if codecc_populations[codepopulation group the countries into population levels cc_pops_ cc_pops_ cc_pops_ {}{}{ for ccpop in cc_populations items()if pop cc_pops_ [ccpop elif pop cc_pops_ [ccpop elsecc_pops_ [ccpop see how many countries are in each level print(len(cc_pops_ )len(cc_pops_ )len(cc_pops_ )wm pygal worldmap(wm title 'world population in by countryx wm add(' - 'cc_pops_ wm add(' - bn'cc_pops_ wm add('> bn'cc_pops_ wm render_to_file('world_population svg'to group the countrieswe create an empty dictionary for each category we then loop through cc_populations to check the population of each country the ifelifelse block adds an entry to the appropriate dictionary (cc_pops_ cc_pops_ or cc_pops_ for each country codepopulation pair at we print the length of each of these dictionaries to find out the sizes of the groups when we plot the data xwe make sure to add all three groups to the worldmap when you run this programyou'll first see the size of each group downloading data