Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/connor-makowski/c3covid19
Python wrapper for easy use of the C3 COVID 19 Data Lake
https://github.com/connor-makowski/c3covid19
Last synced: about 1 month ago
JSON representation
Python wrapper for easy use of the C3 COVID 19 Data Lake
- Host: GitHub
- URL: https://github.com/connor-makowski/c3covid19
- Owner: connor-makowski
- License: mit
- Created: 2020-04-15T21:14:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T09:34:56.000Z (about 2 years ago)
- Last Synced: 2024-10-28T13:36:40.756Z (2 months ago)
- Language: Python
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
c3covid19
==========
Python wrapper for easy use of the [C3 Covid 19 Data Lake](https://c3.ai/covid-19-api-documentation/#section/Using-C3.ai-APIs).Full API Documentation
--------
https://connor-makowski.github.io/c3covid19/Features
--------- Simplified python access to the c3 data lake.
Setup
----------Make sure you have Python 3.6.x (or higher) installed on your system. You can download it [here](https://www.python.org/downloads/).
### Installation
```
pip install c3covid19
```### Quick Start
1) Import c3api into your project
```py
from c3covid19 import c3api
```2) Initialize a `c3api` connection object
```py
cnx=c3api()
```3) Specify your JSON request as a python dictionary:
```py
germany_request={
"spec": {
"filter": 'id == "Germany"'
}
}
```4) request from the connection object:
```py
germany=cnx.request(data_type='outbreaklocation', parameters=germany_request, api='fetch')
```
- Notes:
- `data_type` is the data "Type" as specified by the c3.ai covid19 documentation [here](https://c3.ai/covid-19-api-documentation/#section/C3.ai-APIs-for-COVID-19-Unified-Data)
- `parameters` is the JSON Request you will be posting to the api
- `api` is the specific API to hit and defaults to `fetch` if not specified.5) Print the results:
```py
print(germany)
```### Output Data
Output data will be in the format set by the C3 Covid19 Data Lake team. See their documentation [here](https://c3.ai/covid-19-api-documentation/#section/Using-C3.ai-APIs).### Full Example
```py
from c3covid19 import c3apicnx=c3api()
germany_request={
"spec": {
"filter": 'id == "Germany"'
}
}germany=cnx.request(data_type='outbreaklocation', parameters=germany_request)
print(germany)
```