Skip to content

owenchu/corona-cases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

corona-cases

https://vis.pandemic.events

Screenshot

This project provides a simple visualization for the coronavirus pandemic. The idea is to allow the user to see up-to-date stats aggregated by selected regions or counties within a state, so the user can stay informed about the corona situation in the context that's most relevant to their daily lives.

Quick start

This project was bootstrapped with Create React App. To launch the project in development mode, run:

yarn run start

Adding a new state

See this commit for an example.

Adding a new state requires some manual work:

  1. Add a new state entry to src/States.js
  2. Download the state's county map from Wikimedia Commons (example)
  3. Convert the county map into a React component: npx @svgr/cli maps/[StateCountyMap].svg > src/maps/[State]Map.js
  4. Edit the generated component (YMMV)
    • Rename the component so its name is consistent with other map components
    • Prefix state IDs with the state's postal code (e.g., id="Atlantic" -> id="NJ_Atlantic")
    • Add missing state IDs (if any is missing)
    • Set the SVG's default fill color to #CCC
    • Set the SVG's default stroke color to #FFF
    • Set the SVG's viewBox so it's fully visible on the page
    • Edit the code to let the component reflect selection status for its counties (example)

License

GPL licensed. See the LICENSE file for details.

About

Stay informed about COVID-19

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages