7.2 Visualizing the World: An Introduction to Visualization

7.2 Visualizing the World: An Introduction to Visualization

Quick Question

Create the fertility rate versus population under 15 plot again:

ggplot(WHO, aes(x = FertilityRate, y = Under15)) + geom_point()

Now, color the points by the Region variable.

Note: You can add scale_color_brewer(palette=“Dark2”) to your plot if you are having a hard time distinguishing the colors (this color palette is often better if you are colorblind). To use this option, you should just add scale_color_brewer(palette=“Dark2”) to your plotting command right after geom_point().

One region in particular has a lot of countries with a very low fertility rate and a very low percentage of the population under 15. Which region is it?

 Africa  close
 
 Americas  close
 
 Eastern Mediterranean  close
 
 Europe  check
 
 South-East Asia  close
 
 Western Pacific  close
 
Check Show Solution

Explanation You can color the points by region if you adjust the command to the following: ggplot(WHO, aes(x = FertilityRate, y = Under15, color=Region)) + geom\_point() Most of the countries in Europe have a very low fertility rate and a very low percentage of the population under 15.

Course Info

Learning Resource Types

theaters Lecture Videos
notes Lecture Notes
assignment_turned_in Problem Sets with Solutions