Interactive charts: R, Python and D3

Publisher

Personal projects

A series of charts I’ve created using R, Python and D3.

My role
  • Data collection
  • Data wrangling
  • Developer
  • Designer

Tools
  • R
  • Python
  • D3
  • Mapshaper
  • RStudio
  • Visual Studio Code
  • Microsoft Excel


Line chart

An interactive line chart created with ggplot2 and ggiraph. The data was scraped directly from CATSA using Microsoft Excel, and restructured and analysed with R:

Stacked bar chart

An interactive stacked bar chart created with ggplot2 and ggiraph. The data was pulled from an Angus Reid survey and analysed with R:

Donut chart

An interactive donut chart created with D3, HTML, CSS and JavaScript. The data was pulled from Statistics Canada (source 1, source 2) and transformed and analysed with R:

Cluster chart

An interactive chart comparing the effectiveness of vaccines against COVID-19. I was inspired to create this after reading this article on how certain COVID-19 data can be more accurately compared using the incidence rate ⁠— a figure which shows how often an event, such as disease or death, occurs in a population.

The numbers for this cluster chart were pulled from CDC and cleaned up with Excel. The data centers on information recorded on January 2, 2022 ⁠— when infections across 30 US jurisdictions were at their peak. D3, HTML, CSS and JavaScript were used to create the visualisation, and the animated points were drawn with the Canvas API to minimize loading speeds.

Choropleth map

An interactive map looking at the shelter-cost-to-income ratio across Canada. The numbers were pulled from Statistics Canada, and transformed and analysed with Python library pandas. D3, HTML, CSS, JavaScript and Mapshaper were used to create the visualisation.

Waffle chart

An interactive waffle chart looking at racial diversity in Canada’s federal parliament. The numbers were taken from a survey and transformed with R. R packages ggplot2, ggiraph and waffle were used to build the visualisation, which was further customized with D3, HTML, CSS and Javascript.