An API around the https://github.com/CSSEGISandData/COVID-19 dataset
Project description
COVID-19 API
This API is a wrapper around Johns Hopkins' https://github.com/CSSEGISandData/COVID-19 dataset.
Please abide by their terms of use with respect to how you use their data via this API.
Installation
This package is hosted on pypi
The recommended method of installation is through pipx.
pipx install covid-19
However, covid-19 can also be pip-installed as normal.
pip install covid-19
Website
The coronavirus api website allows several methods of slicing and dicing the data.
For example, the get_all
endpoint (which returns all data) can be filtered for rows which only contain
data for California and Colorado as of March 22nd in this way:
https://coronavirus-api.net/get_all?min_date=2020-03-22&states=["California", "Colorada"]
The main page will list the available endpoints and their available parameters.
CLI Usage
This package installs a command-line tool, covid
It lets you programmatically access John Hopkins' dataset via terminal commands or via a rest api that can itself be instantiated locally from the cli
covid --help
This API is a wrapper around Johns Hopkins' https://github.com/CSSEGISandData/COVID-19 dataset.
Please abide by their terms of use with respect to how you use their data via this API.
Available Commands:
- get_all: Fetch all data from John Hopkins.
- countries: Return all countries and regions in the dataset.
- states: Return all states and provinces in the dataset.
- for_date: Return all data for a specific date.
- serve: Serve REST API locally.
i.e.
covid for_date 2020-03-21
[
{
"Province/State": "Hubei",
"Country/Region": "China",
"Last Update": "2020-03-22T09:43:06",
"Confirmed": 67800.0,
"Deaths": 3144.0,
"Recovered": 59433.0,
"Latitude": 30.9756,
"Longitude": 112.2707
...
Docker
This package can also be run as a docker image.
docker run knowsuchagency/covid-19 --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file covid-19-0.5.1.tar.gz
.
File metadata
- Download URL: covid-19-0.5.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf223ad8f704e060cbfe0623fbf774db2a0e6bd187ed5eee1f038b8c59fa3b2 |
|
MD5 | f666d431afd387e733389773cbb310f8 |
|
BLAKE2b-256 | 55f7ebf5aa759564400880a144ccd2886f8eb076cc8704540455a557aa29681c |
File details
Details for the file covid_19-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: covid_19-0.5.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef29c644a4bca0be756e567413e3969c8fe817d065ddda4a91e943d56d74a194 |
|
MD5 | 82b2a9aebb21b335ad97024892a37445 |
|
BLAKE2b-256 | e25e139b4cd9211dc731f5f788e841136f002cd9e3562147a7c11d5410d072c1 |