Giter VIP home page Giter VIP logo

covid19-usa's Introduction

COVID-19 USA

Main CI

This project checks nytimes/covid-19-data every 4 hours to see if the us-states.csv and us-counties.csv have been updated and then converts them to a JSON format and deploys it to a website for public use.

JSON

timeseries.json

The JSON is grouped by state with each having an array of objects with the following information:

Note:

Some data goes back as early as January 21st, 2020 (Ex. Washington), but most of the data starts after March 1st, 2020.

{
...
    "New York": [
            {
	            "date": "2020-03-01",
		    "fips": "36",
		    "cases": "1",
		    "deaths": "0"
	    },
	    {
		    "date": "2020-03-02",
		    "fips": "36",
		    "cases": "1",
		    "deaths": "0"
	    },
	    {
	            "date": "2020-03-03",
		    "fips": "36",
		    "cases": "2",
		    "deaths": "0"
	    },
    ...
    ],
...
}

Example

Here is an example of using the data with JavaScript:

https://jsfiddle.net/69qbudfn/

fetch("https://amishpr.github.io/covid19-usa/timeseries.json")
  .then(response => response.json())
  .then(data => {
    data."New York".forEach(({ date, fips, cases, deaths }) => {
      console.log(`${date} | Active Cases: ${cases - deaths}`);
      console.log(data);
    });
  });

timeseries-counties.json

The JSON is grouped by state and then county with each county having an array of objects with the following information:

Note:

Some data goes back as early as January 21st, 2020 (Ex. Washington), but most of the data starts after March 1st, 2020.

{
    "Washington": {
		"Snohomish": [
			{
				"date": "2020-01-21",
				"fips": "53061",
				"cases": "1",
				"deaths": "0"
			},
			{
				"date": "2020-01-22",
				"fips": "53061",
				"cases": "1",
				"deaths": "0"
			},
			...
			],
		"Spokane": [
			{
				"date": "2020-02-24",
				"fips": "53063",
				"cases": "4",
				"deaths": "0"
			},
			{
				"date": "2020-02-25",
				"fips": "53063",
				"cases": "4",
				"deaths": "0"
			},
			...
			]
		...
		}
	...
}

Example

Here is an example of using the data with JavaScript:

https://jsfiddle.net/0tw5hf4m/

fetch("https://amishpr.github.io/covid19-usa/timeseries-counties.json")
  .then(response => response.json())
  .then(data => {
    data.Washington.Snohomish.forEach(({ date, fips, cases, deaths }) => {
      	console.log(`${date} | Active Cases: ${cases - deaths}`);
  	console.log(data);
    });
  });

Projects using this dataset (➕Add Yours)

COVID-19 Tracker (repo): Displays current information about COVID-19 cases worldwide and by state for USA.

Adding your project

Please make a pull request adding a link to your project in this README.MD.

Rules:

  • Project must be Open Source
  • On your project cite amishpr/covid19-usa as a data source (with a link) as well as the nytimes/covid-19-data
  • Use the following format:
     [PROJECT NAME](PROJECT URL) ([repo](REPO URL)): DESCRIPTION
    • Note: Replace UPPER CASED values with your own

➕Add a new project to the list

Inspiration / Thank you

Please go checkout: pomber/covid19.

The idea, a lot of my GitHub Action setup, and other files are from that repo.

pomber made a timeseries.json for every country/territory using CSSEGISandData/COVID-19 and I wanted to do the same for every state in the United States.

License

This repository is licensed under the GNU General Public License v3.0.

The data from nytimes/covid-19-data is licensed under their own terms of use.

covid19-usa's People

Contributors

actions-user avatar amishpr avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

bdelcamp

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.