Malaria Incidence
Map visualization
Notable topics: Map visualization
Recorded on: 2018-11-11
Timestamps by: Alex Cookson
Screencast
Timestamps
Importing data using the malariaAtlas package
Using geom_line function to visualize malaria prevalence over time
Quick map visualization using longitude and latitude coordinates and the geom_point function
Using borders function to add Kenyan country borders to map
Using scale_colour_gradient2 function to change the colour scale of points on the map
Using arrange function to ensure that certain points on a map appear in front of/behind other points
Aggregating data into decades using the truncated division operator %/%
Starting to look at aggregated malaria data (instead of country-specific data)
Using sample and unique functions to randomly select a few countries, which are then graphed
Using last function to select the most recent observation from a set of arranged data
Creating a Bland-Altman plot to explore relationship between current incidence and change in incidence in past 15 years
Using anti_join function to find which countries are not in the malaria dataset
Using the iso3166 dataset set in the maps package to match three-letter country code (i.e., the ISO 3166 code) with country names
Creating a world map using geom_polygon function (and eventually theme_void and coord_map functions)
Getting rid of Antarctica from world map
Using facet_wrap function to create small multiples of world map for different time periods
Starting to create an animated map of malaria deaths (actual code writing starts at 57:45)
Starting with a single year after working through some bugs
Using regex_inner_join function from the fuzzyjoin package to join map datasets because one of them has values in regular expressions
As alternative to fuzzyjoin package in above step, using str_remove function to get rid of unwanted regex
Starting to turn static map into an animation using gganimate package
The actual animated map
Using countrycode package to filter down to countries in a specific continent (Africa, in this case)
Summary of screencast