This is a GraphQL server that consumes the NY Times data source and John Hopkins University (JHU CSSE) data source for covid-19 and serves it using GraphQL queries.
Using this project? let me know!
or if you found an issue or want a new dataset, create a new issue here
Visit https://graph-cv19.iscottrichardson.com/ to use the server
or
Pull Docker image
$ docker pull scottjr632/graph-covid-19
or
Create your own
$ git clone https://github.com/scottjr632/graph-covid-19.git && cd $_
$ yarn install
$ # development environment
$ yarn start:dev
$ # productin
$ yarn build
$ yarn start:prod
You can navigate to http://localhost:4000 to get to the GraphQL explorer to explorer the API.
{
jhu(filter: {last:10000, country:"us"}) {
data {
total
nodes {
country
state
...
}
}
}
}
{
nytimes {
counties {
total
nodes {
cases
...
}
}
}
states {
nodes {
state
...
}
}
}
type JHUFilter {
last: Float = 100
from: DateTime
state: String
sort: SortCovidInputType
country: String
}
type CountyFilter {
last: Float = 100
from: DateTime
state: String
sort: SortCovidInputType
county: String
}
type StateFilter {
last: Float = 100
from: DateTime
state: String
sort: SortCovidInputType
}
If you are using NY Times data please follow their License and Attribution guide. Other than that this project is open source and is accepting pull request and issue request!