Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/energee/covid19-us-api
US States API of confirmed cases and deaths
https://github.com/energee/covid19-us-api
corona coronavirus covid-19 covid-api covid-data covid19 covid19-data
Last synced: about 2 months ago
JSON representation
US States API of confirmed cases and deaths
- Host: GitHub
- URL: https://github.com/energee/covid19-us-api
- Owner: energee
- License: gpl-3.0
- Created: 2020-03-30T21:49:05.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-24T02:28:01.000Z (almost 2 years ago)
- Last Synced: 2024-12-01T06:03:41.859Z (2 months ago)
- Topics: corona, coronavirus, covid-19, covid-api, covid-data, covid19, covid19-data
- Language: JavaScript
- Homepage: https://energ.ee/covid19-us-api/states.json
- Size: 4.39 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
![](https://github.com/energee/covid19-us-api/workflows/.github/workflows/main.yml/badge.svg)
Transforms data from https://github.com/nytimes/covid-19-data into json. Available at https://energee.github.io/covid19-us-api/states.json.
The json contains the number of COVID-19 confirmed cases and deaths for every state starting on January 21st. Note: there are no entries for states on days that have 0 confirmed and 0 dead:
```
"Washington": [
{
"date": "2020-01-21",
"confirmed": "1",
"deaths": "0"
},
{
"date": "2020-01-22",
"confirmed": "1",
"deaths": "0"
}
]
```**Example:**
```
fetch("https://energee.github.io/covid19-us-api/states.json")
.then(response => response.json())
.then(data => {
data["Pennsylvania"].forEach(({ date, confirmed, deaths }) =>
console.log(`${date} active cases: ${confirmed} deaths: ${deaths}`)
);
});
```