Apollo GraphQL server for retreiving Covid-19 Data by date
The UI is deployed to Heroku. It is a WIP
The data comes from the 2019 Novel Coronavirus (nCoV) Data Repository, by John Hopkins University. It is retrieved, transformed and cached for one hour. Keep in mind, that this is only the CSSE data. WHO situation reports have not been added.
git clone https://github.com/SiddharthMantri/covid-graphql.git
cd covid-graphql
npm install
npm run dev
The apollo client will be running at http://localhost:8080/graphql
The schema currently available is:
type Query {
records(date: String, countryRegion: String): [DateData]
timeSeries(type: String!, countryRegion: String): [TimeSeries]
dailySeries(type: String!, countryRegion: String): [TimeSeries]
country(name: String): [Country]
countryDataList: [DateData]
globalStatsWithChange(countryRegion: String): GlobalDataWithChange
cacheStats: CacheStats
}
type ChangeStat {
number: Int
change: Int
perc: Float
}
type Country {
name: String
regions: [Region]
lat: Int
lng: Int
}
type DateData {
provinceState: String
countryRegion: String
updated: String
confirmed: Int
deaths: Int
recovered: Int
active: Int
lat: String
lng: String
}
type DateStat {
date: String
nums: Int
}
type GlobalData {
updated: String
confirmed: Int
deaths: Int
recovered: Int
active: Int
}
type GlobalDataWithChange {
confirmed: ChangeStat
deaths: ChangeStat
recovered: ChangeStat
active: ChangeStat
}
type Region {
name: String
}
type TimeSeries {
provinceState: String
countryRegion: String
lat: String
lng: String
data: [DateStat]
}
Created a simple UI for the data. To run it - simply clone and run
npm run dev
PRs are welcome. Feel free to add any and all datasets and points
MIT © SiddharthMantri