Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NACIS 2020: Mapping COVID-19 Coast to Coast, and Around the World

NACIS 2020: Mapping COVID-19 Coast to Coast, and Around the World

In developing an interactive map for the COVID-19 Mobility Network, we developed a unique set of map projections and dynamic map labels for the clearest and most effective communication of our data. In this session I’ll walk through the stages of developing and refining several iterations of our map, starting with a US-only Albers projection customized to include all US territories and possessions, to a global map combining hierarchical administrative data from many different sources. I explain how we used a variety of open source tools (from D3, Dirty Reprojectors, GDAL/OGR, MapShaper, Makefiles, and numerous Mapbox command-line tools and APIs) to create a repeatable and highly customizable workflow.

Video recording: https://www.youtube.com/watch?v=DeDYDql4O3Q

Alan McConchie

October 14, 2020
Tweet

More Decks by Alan McConchie

Other Decks in Programming

Transcript

  1. Mapping COVID-19
    Coast to Coast, and
    Around the World
    Alan McConchie // Stamen Design
    NACIS Practical Cartography Day
    October 14, 2020
    Slides: sta.mn/8vj
    Video: youtu.be/DeDYDql4O3Q

    View Slide

  2. COVID-19 Mobility Data Network
    Working with Facebook’s Data for Good and the COVID-19
    Mobility Data Network, we mapped movement in regions around
    the world during the pandemic.
    The COVID-19 Movement Trends tool seeks to help policy
    makers answer critical questions: How well have physical
    distancing interventions worked? Where do communities need
    the most support with their distancing efforts? How and when,
    and how quickly, should we re-open different cities, states and
    countries?
    visualization.covid19mobility.org

    View Slide

  3. Mobility trends as small multiples
    visualization.covid19mobility.org
    Stay-at-home percentage
    Relative change in mobility

    View Slide

  4. Mobility trends in the wild
    Governor’s COVID-19 press conference with
    Secretary of the California Health and Human
    Services Dr. Mark Ghaly, April 13, 2020

    View Slide

  5. The mobility dashboard: version 1
    (R.I.P.)

    View Slide

  6. Wanted: map projections for the US
    (the whole US)

    View Slide

  7. Daniel Immerwahr
    “How to Hide an Empire: A History of the
    Greater United States”

    View Slide

  8. Custom map projections
    in TileMill and Leaflet
    (aka “Lying to Leaflet”)
    oceanplanning.org
    climate.audubon.org
    natgeo.com/climate-change/explore-amazonia
    more info (NACIS PCD 2015) >

    View Slide

  9. Custom map projections
    in TileMill and Leaflet
    (aka “Lying to Leaflet”)
    more info (NACIS PCD 2015) >
    ogr2ogr -f GeoJSON -t_srs "EPSG:2163"
    -s_srs "EPSG:4326" /vsistdout/ unprojected.geojson |
    ogr2ogr -f GeoJSON -t_srs "EPSG:4326" -s_srs
    "EPSG:3857" projected.geojson /vsistdin/

    View Slide

  10. Custom map projections
    in PostGIS and CARTO
    dsl.richmond.edu/panorama/overlandtrails
    dsl.richmond.edu/panorama/forcedmigration
    more info (NACIS 2015) >

    View Slide

  11. Custom map projections
    in PostGIS and CARTO
    more info (NACIS 2015) >
    SELECT cartodb_id, name,
    ST_Transform(ST_SetSRID(ST_Transform(the_geom,2163),3857),4326)
    as the_geom FROM my_table

    View Slide

  12. Reprojection with Dirty Reprojectors
    using D3.js under the hood
    more info (dirty-reprojectors github) >
    cat original.geojson |
    dirty-reproject --forward patterson >
    projected_patterson.geojson

    View Slide

  13. Lo Bénichou
    Mapping the US elections:
    Guide to Albers USA projection in Studio

    View Slide

  14. View Slide

  15. View Slide

  16. Albers USA + Territories
    now available:
    github.com/stamen/geo-albers-usa-territories
    npmjs.com/package/geo-albers-usa-territories

    View Slide

  17. Labels
    Label data must be reprojected too.
    Note how county labels only appear
    for the currently-active state.

    View Slide

  18. Make & makefiles ❤
    Reproducible command-line workflows
    Learn more from Seth Fitzsimmons
    at NACIS PCD 2016 >

    View Slide

  19. Makefile morsels
    just a taste

    View Slide

  20. International mobility data for 15 countries
    visualization.covid19mobility.org
    Stay-at-home percentage
    Relative change in mobility

    View Slide

  21. View Slide

  22. View Slide

  23. FIPS,
    NUTS,
    and GADM

    View Slide

  24. FIPS: Federal Information Processing Standard (US only)
    NUTS: Nomenclature des unités territoriales statistiques (Europe only)
    GADM: Database of Global Administrative Areas (worldwide)

    View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. View Slide

  29. View Slide

  30. Thank you!
    Alan McConchie
    @mappingmashups
    [email protected]
    Slides: sta.mn/8vj
    Video: youtu.be/DeDYDql4O3Q
    Explore the map and let us know what you think!
    Visualization.covid19mobility.org
    Thanks to the COVID-19 Mobility Data Network,
    coordinated by Direct Relief and researchers from
    the Harvard T.H. Chan School of Public Health.
    Thanks also to Facebook’s Data for Good program.

    View Slide

  31. #exhaust

    View Slide

  32. #exhaust

    View Slide

  33. #exhaust

    View Slide

  34. Miller vs Patterson

    View Slide

  35. Tried pasting a Wikipedia table into
    LibreOffice, because what's the worst that
    could happen? Oh look, some SVG images
    came along for the ride!

    View Slide

  36. #exhaust

    View Slide