GithubHelp home page GithubHelp logo

davliu / corona-cases Goto Github PK

View Code? Open in Web Editor NEW

This project forked from owenchu/corona-cases

0.0 1.0 0.0 1.32 MB

License: GNU General Public License v3.0

HTML 4.10% JavaScript 95.08% CSS 0.82%

corona-cases's Introduction

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 on 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/SvgBlank[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.

corona-cases's People

Contributors

owenchu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.