Ziqi (Katrina) Ding

Back

Team: 1 person
Duration: 2โ€“3 weeks
Category: Data & Visualization
Created:

Tech Stack

R Shiny Leaflet ggplot2 ggiraph dplyr sf rnaturalearth

Tags

R Shiny Data Visualization

๐ŸŒ World Happiness Visualization

R project analyzing and visualizing World Happiness Report data from 2013 to 2023.

Project Gallery

Trends page with country selector and happiness score lines over time
Map page showing global view, legend, and the bar chart of countries by happiness level
Map page zoomed into a region with markers, tooltips, and controls
+1
View all

Why it Matters#

Happiness data is often presented as static rankings. This project turns the World Happiness Report into an interactive explorer so users can answer richer questions: How does a country change over time? How do regions compare? Which indicators move together? The app prioritizes clarity, visual hierarchy, and accessibility with coordinated views and minimal chart junk.

What You Can Explore#

  • Compare happiness scores across countries from 2005โ€“2022.
  • Interactive tooltips show exact values; a world average line provides context.
  • Click a point to reveal deeper country statistics for that year.

Country Profile (Indicators)ยท#

  • A radar chart summarizes multiple normalized indicators (strengths vs weaknesses).
  • Detailed metrics appear beside the chart for quick reading.

Map (Space)#

  • Explore global happiness distribution by year with a timeline slider.
  • Filter by happiness level and optionally hide country labels to reduce overlap.
  • Clustered markers improve density and readability at global zoom.

Data & Sources#

Technical Implementation#

  • Framework: R Shiny, deployed to shinyapps.io.
  • Spatial stack: sf + rnaturalearth for country geometries; centroids computed for marker placement.
  • Mapping: leaflet with custom SVG marker icons and cluster behavior.
  • Charts: ggplot2 + ggiraph for interactive time-series; fmsb for radar charts.
  • Data wrangling: dplyr for filtering, joins, and aggregation.
  • Reproducibility note: world geometry is pre-generated (worldMap.rds) to avoid deprecated GIS dependencies and runtime downloads on hosting.

Key Notes#

  • Threshold-based happiness classes (very unhappy โ†’ very happy) are derived from the score range to keep the map legend consistent across years.
  • UI choices emphasize readability: light basemap, limited UI colors, and interactive details-on-demand (tooltips instead of labels).