I was inspired by Andrew Collier’s blog postÂ Life Expectancy by CountryÂ where heÂ illustrated how to create aÂ bubble chartÂ thatÂ compares female and male life expectancies for a number of countries based on the data scraped from Wikipedia usingÂ R andÂ Plot.ly charts.
I decided to replicate these results using another popular language for technical computing – Julia.
Scraping Wikipedia in Julia proved to be less elegant, as it is missing a convenient package for ingesting tabular data from web pages into data frames, but otherwise it was a relatively simple task.
The dotted line in the chart corresponds to equal female and male life expectancy. The sizeÂ of the bubbles is linearly proportional to countryÂ population.
Interactive plot is available on Plot.ly.