Skip to content
Nat Lee

Keyboard shortcuts

Turn these off if they get in the way of a screen reader or voice control. The setting is saved in this browser.

1
Home
2
Work
3
Projects
4
About
5
Experience
/
Search projects
?
Show this panel

Data Science

Taiwan Population Atlas

Three decades of Taiwan, on a map

Play through population change across Taiwan’s 22 counties, compare their trends and explore household income. A 2017 hackathon project, rebuilt in 2026.

Role
Hackathon team member & 2026 rewrite maintainer
Period
2026 – 2026.11
Status
Completed
Categories
Web apps & extensions
Stack
  • TypeScript
  • React
  • D3
  • Government Open Data
Taiwan Population Atlas, screenshot 1

Overview

An interactive atlas of population and household finances across Taiwan. Monthly population data starts in 1997, with annual income and savings indicators alongside it. A playback timeline, county comparison charts and shareable URLs turn the original 2017 Chiayi hackathon project into a tool for exploring change.

What it's good for

Anyone wondering whether a county grows from births or from people moving in can watch it month by month since 1997, with that month's news beside the map, and send the exact view as a link instead of a screenshot of a spreadsheet.

Diagrams

Main paths only. The edge cases stayed in the code.

Nine years later: 20,082 overlapping numbers, 5 different, each by 0.01.

Point at a box to see what it connects to.

  1. Run the data update(npm run data:update) → statistics: Download the official tables → news: Fetch Wikipedia's yearly events
  2. Download the official tables(Links looked up each time) → Load the 2017 hackathon data
  3. Fetch Wikipedia's yearly events(One page at a time) → Load the 2017 hackathon data
  4. Load the 2017 hackathon data(Nine years old, still checks out) → Every name in the county table?
  5. Every name in the county table? → yes: What's in the new cell? → no: Stop the build
  6. Stop the build(Nothing dropped quietly)
  7. What's in the new cell?(A dash means zero) → number or dash: Overwrite and log the difference → blank: Keep the older value
  8. Overwrite and log the difference(Every changed number reported) → More cells to merge?
  9. Keep the older value(Blank means unknown) → More cells to merge?
  10. More cells to merge? → yes: What's in the new cell? → no: Tag each event with counties
  11. Tag each event with counties(Old county names count too) → Write the JSON the app loads
  12. Write the JSON the app loads(No timestamps, same every time) → CI rebuild matches the commit?
  13. CI rebuild matches the commit? → same: Check passes → different: Check fails
  14. Check passes
  15. Check fails(Data out of step with inputs)

Features

  • Population, migration, income and savings indicators
  • Animated timeline with adjustable playback speed
  • Compare trends across up to four counties
  • Government open data with reproducible conversion scripts
Social increase in May 2008: New Taipei selected, compared with Taoyuan and Chiayi County
Social increase in May 2008: New Taipei selected, compared with Taoyuan and Chiayi County

What I learned

  • The 2017 JSON held up: of 20,082 overlapping population numbers only 5 differed, each by 0.01 from source corrections, and all 1,890 household figures matched.
  • Government tables write '-' for zero, and the data backs it: in 39 of the 40 months where natural increase is '-', total growth equals social growth.
  • Download links can't be hard-coded: the household-survey files change path every year, so each fetch looks them up on data.gov.tw first.
  • On a phone the metric menu folds into one button; here, total growth in June 2020
    On a phone the metric menu folds into one button; here, total growth in June 2020
  • The 2017 original, in a green-to-red scale that red-green colour-blind readers can't use
    The 2017 original, in a green-to-red scale that red-green colour-blind readers can't use
  • Web apps & extensions77 stars on GitHub

    Streaming Player

    Twitch, YouTube live chat and chat bots share one song queue. A Rust backend keeps the OBS player, overlay and moderator dashboard in sync.

    2023Completed
  • Web apps & extensions11 stars on GitHub

    Gantt Studio

    Drag a schedule into place, draw dependencies and see the critical path. Switch to Mermaid text without losing the plan. Everything stays in your browser.

    2026Completed
  • Web apps & extensions33 stars on GitHub

    MorphKit

    Converts and edits images, audio, video, PDFs and documents entirely in the browser. Nothing gets uploaded, mostly because there is nowhere to upload it to.

    2026Active