Historical Phones
Joining tables, Animated world choropleth, Adding IQR to geom_line, World development indicators package
Notable topics: Joining tables, Animated world choropleth, Adding IQR to geom_line, World development indicators package
Recorded on: 2020-11-09
Timestamps by: Eric Fletcher
Screencast
Timestamps
Use bind_rows from the dplyr package to combine the two data sets.
Use group = interaction(type, country) within ggplot aes() to set the interaction type with every single country on one plot.
Use semi_join from the dplyr package to join rows from phones with a match in country_sizes.
Use quantile from the stats package within summarize to show the 25th, and 75th quantiles (interquartile range) on the plot.
Import the wdi package (World Development Indicators from the World Bank) with extra = TRUE in order to get the iso3c code and income level for each country.
Use inner_join from the dplyr package to join the WDI data with the phones data.
Use fct_relevel from the forcats package to reorder income factor levels in ascending order.
Create an anonymous function using . (dot).
Use inner_join from the dplyr package to join the mobile data and landline data together with a geom_abline to see how different the total populations are between the two datasets.
Use geom_hline to add a refrence line to the plot shwoing when each country crossed the 50 per 100 subscription mark.
Use summarize from the dplyr package with min(year([Mobile >= 50])) to find the year in which each country crossed the 50 per 100 subscription mark.
Use summarize from the dplyr package with max(Mobile) to find the peak number of mobile subscriptions per country.
Use na_if from the dplyr package within summarize to change Inf to NA.
Using the WDIsearch function to search the WDI package for proper GDP per capita indicator. Ended up using the NY.GDP.PCAP.PP.KD indicator.
Adding the GDP data from the WDI package to the country_incomes table.
Using the inner_join function from the dplyr package to join the phones table with the country_incomes table pulling in the gdp_per_capita variable.
Using the WDIsearch function to search the WDI package for proper population indicator. Ended up using the SP.POP.TOTL indicator.
Create an animated choropleth world map with fill = subscriptions.
Summary of screencast