Open loleg opened 4 years ago
@loleg this is pretty easy - can you give more details of the API structure you'd like to see?
@loleg since it is published to datahubio, it provides some API:
Point taken. I'll close this and (let someone) write an external wrapper.
I'm going to re-open - the stuff at https://datahub.io/core/covid-19#data-cli is not really a fully API. Yes it has CORS and JSON but nothing more.
@loleg would love more suggestions here. I've also added more to the issue description now.
Maybe this API that I developed can make useful https://github.com/AndresMorelos/coivd-19-api.
It is published at http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/
For Countries data :
http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/countries/
## Filter by Country
http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/countries/?Country=NAME
http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/countries/?country=NAME
## Filter by Date
http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/countries/?Date=YYYY-MM-DD
http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/countries/?date=YYYY-MM-DD
## Filter by Country & Date
http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/countries/?Country=NAME&Date=YYYY-MM-DD
http://ec2-18-223-118-73.us-east-2.compute.amazonaws.com/countries/?country=NAME&date=YYYY-MM-DD
@AndresMorelos great! I think the code is javascript. Would you be up for refactoring to use data package structure?
As a lot of people want to connect from dashboards and get filtered/streaming access to the data, it would be good to also set up an (example) wrapper with API endpoints.
See also https://github.com/Quintessential-SFT/Covid-19-API and https://github.com/dataletsch/panoptikum/blob/master/app.py
Design (from @rufuspollock)
Jobs to be done: i want to get latest data for my country / region.
Desired API
API-ifying a Data Package
We have a datapackage.json - let's auto API-ify-it.
e.g. suppose we have a table
cases.csv
Each table => a url ...
Values => sub-urls
Dimension
Adding an id (??)