Interactive demographic storytelling through maps and data visualization
Explore US population demographics with an interactive story map that seamlessly blends interactive mapping with demographic visualization. Built for planners, analysts, and anyone curious about America's demographic landscape.
🌎 Interactive Globe → Select any US state with smooth map transitions
📊 Live Demographics → Real-time population pyramids for 3,000+ counties
🎯 Smart Filtering → Census tract-level median age visualization
📱 Story Format → Guided exploration from overview to detail
# Clone this repository
# git clone https://github.com/ar-puuk/population-pyramid-explorer.git
# Setup (one time)
install.packages(c("shiny", "mapgl", "tidycensus", "tigris", "tidyverse", "sf", "scales"))
tidycensus::census_api_key("YOUR_KEY_HERE", install = TRUE)
# Run
shiny::runApp("app.R")
💡 Need a Census API key? Get one free at census.gov/developers
State Overview | County Detail |
---|---|
![]() |
![]() |
Choose state → explore median age patterns | Select county → analyze age structure |
📦 Frontend: Shiny + MapLibre GL JS
🗺️ Mapping: mapgl package with globe projection
📊 Data: US Census Bureau via tidycensus
🎨 Viz: ggplot2 with custom pyramid styling
⚡ Performance: Reactive data pipeline + caching
- Years 2015-2023 available for temporal analysis
- Real-time filtering with server-side county search
- Responsive design optimized for desktop and mobile
- Publication-ready visualizations with custom theming
- Efficient caching for improved performance
Found a bug? Have an idea? Pull requests welcome!
- 🐛 Bug fixes
- ✨ New demographic variables
- 🎨 Visualization improvements
- ⚡ Performance optimizations
MIT © Open for exploration and analysis
Built with ❤️ for the R spatial community