scraping

Life Expectancy Across the World

February 25, 2023
visualization
ggplot2, scraping

I came across an interesting dataset on life expectancy for different countries on Worldometer, and thought that might make for some interesting visualizations. First, I need to get ahold of the data, which is embedded in a web-page and isn’t in an immediately downloadable form. I’ll have to do some web-scraping. Fortunately, there’s rvest for that task. The essential set of packages include: library(tidyverse) library(rvest) library(hrbrthemes) Data # Let’s grab the data. ...