andrewthong / covid19tracker-api Goto Github PK
View Code? Open in Web Editor NEWAPI backend for COVID-19 Tracker Canada project
Home Page: https://api.covid19tracker.ca/
License: MIT License
API backend for COVID-19 Tracker Canada project
Home Page: https://api.covid19tracker.ca/
License: MIT License
Hi! I'm trying to add more fine-grained Canadian data to https://github.com/microcovid/microcovid and thought your API would be perfect!
For our intake, we need about 2 weeks worth of reports from each health region, a couple times a week. However, since I can't find a way to get all the health region reports together, I'm left making ~100 separate API calls for every single individual health region.
Would it be possible to allow split reports? I'd love to be able to use the following:
curl 'https://api.covid19tracker.ca/reports/regions/split'
The data entry for June 12 included an extra 1million new cases - which is nearly impossible given the population of that health region is only 1.4million.
{
"date": "2021-06-10", "change_cases": 96, "change_fatalities": 0, "change_recoveries": 95, "change_vaccinated": 0, "change_vaccinations": 0, "total_cases": 110527, "total_fatalities": 771,
"total_recoveries": 108941, "total_vaccinated": 88848, "total_vaccinations": 1212884
},
{
"date": "2021-06-11", "change_cases": 67, "change_fatalities": 1, "change_recoveries": 138, "change_vaccinated": 41005, "change_vaccinations": 55545, "total_cases": 110594,
"total_fatalities": 772, "total_recoveries": 109079, "total_vaccinated": 129853, "total_vaccinations": 1268429
},
{
"date": "2021-06-12", "change_cases": 1000087, "change_fatalities": 2, "change_recoveries": 99, "total_cases": 1110681, "total_fatalities": 774, "total_recoveries": 109178,
"total_vaccinated": 129853, "total_vaccinations": 1268429
},
{
"date": "2021-06-13", "change_cases": 64, "change_fatalities": 1, "change_recoveries": 151, "total_cases": 1110745, "total_fatalities": 774, "total_recoveries": 109329,
"total_vaccinated": 129853, "total_vaccinations": 1268429
}
],
"id": 3553,
"population": 1480214,
"province": "ON",
"short": "Peel",
"updated_at": "2021-06-13T23:42:02.000Z"
It looks like there was a superfluous extra 1. You can see this when calculating the 7day average of new cases:
Since Oct 16/21, BC's Saturday and Sunday change_cases have been entered as 0 and then Monday entered as the 3 day total. Previous to October/21 the data was entered by the day. Could we please go back to the daily figures?
Thanks for keeping up with this data all these years.
Doug Hull
Hello folks,
First of all, thanks a lot for publicly providing that API. It's very well documented and great to work with. :)
I was having a look at the API and went over the data in Quebec to look how it compares to the reported numbers. In that regard, I noticed that the change_tests and total_tests do not expose the values that I would expect.
I think the reason is that they do not refer to the number of tests, but rather the number of people tested (which can be quite different as someone might be tested multiple times).
This can be seen quite well on https://www.inspq.qc.ca/covid-19/donnees where the number your API provides correspond to the 4.1 section which describes the number of people tested positive and negative. However, the plot at 4.2, which shows the number of tests, is quite different from the API values.
This can also be seen at https://www.quebec.ca/en/health/health-issues/a-z/2019-coronavirus/situation-coronavirus-in-quebec/#c51841 where the total number of tests stated on the website for August 10 is 1,394,431 (see below). This is much more than the number exposed by the API (926,538 for August 12).
Would it be possible to integrate the total number of tests instead or in addition to the number of people tested? I think this number is very valuable as it describes the current capabilities of laboratories much better.
Best,
Georg
Hi
I would need the number of people "fully" vaccinated with two doses.
I haven't found the definition for change_vaccinations and change_vaccines_distributed, maybe the answer is there but i'm not sure.
Thank you for your good work
Hi!
This is an issue to track the problem discovered by jeanpaulrsoucy in ccodwg/CovidTimelineCanada#23 (comment)
Per his note:
The health region IDs for BC used by covid19tracker.ca are wrong: https://api.covid19tracker.ca/province/BC/regions
...but this traces back to the health region IDs for BC used by us in Covid19Canada being wrong: https://github.com/ccodwg/Covid19Canada/blob/master/other/hr_map.csv
...but this traces back to the health region IDs for BC used by ESRI (for their map file) being wrong: https://resources-covid19canada.hub.arcgis.com/datasets/covid19canada::health-region-summaries
However, [CovidTimelineCanada's] current HRUIDs for BC are now correct, according to both StatCan and BC itself.
He notes that he has reached out to @noahlittle on this. This issue is currently blocking microCOVID.org from being able to report at the health-region level: microCOVID/microCOVID#1452
I see that there's city info in the individual cases, but I don't see any endpoints to get totals by city. If this isn't added yet, it may prove useful.
Hello,
In your API docs, it shows that when getting https://api.covid19tracker.ca/reports?fill_dates&stat=&date&after&before
, it returns data from ALL provinces. Is there a way to specify a province?
Cheers,
Hello
Is your vaccination tracker available through an API?
Thank you
Can you tell me how to download related covid-19 data?
The /summary
endpoint returns a "last_updated" value. It would be great if others (especially /reports
) returned that value, as well. Specifically, I'm pulling Alberta data and looking for null values or zero length arrays to judge if the content is added for the current day (and popping the array if it isn't). It would be helpful to have that field instead.
I'm not sure if this is where to post this, but there's an issue with the vaccination data for Ottawa (region 3551) for today (May 28th). It shows change_vaccinations of 17771 (which seems correct), but change_vaccinated is 485840 (I'm sure it's supposed to be in the range of 4,000). I'm sure it's a problem with the Ontario source data, but it's worth noting.
Currently, active case counts are not accessible through the API.
Hello, thank you for making your API public. This is a very useful service. I have a Perl script that has been successfully making calls to the API, like https://api.covid19tracker.ca/regions, through the summer. On Oct 1 (between Sep 30 7a and Oct 1 7a EST), it stopped working. The error message is Can\'t connect to api.covid19tracker.ca:443
.
I can access the API directly in my browser and I can connect to other SSL APIs from Perl without issue. Do you know if you made a proxy or firewall change around this time that affects access? I used the following SSL tests against your site to hopefully see if there was an obvious connectivity issue. They show something, but I'm not sure what your next diagnostic steps may be.
I know there's not a lot to go on here, but am hoping that you're aware of a change on Oct 1 that could have affected connectivity. Thank you.
The summary of new and total cases per country is not returning any data. I've checked various other projects using the same https://api.covid19api.com/summary API and its returning no data. It was working last at 12:00 AM - 1:00 AM on June 27th, 2021. However, it is not currently working on the 28th.
health region data from stats canada should be included in the /hr results. This data can be picked up from:
https://www12.statcan.gc.ca/rest/census-recensement/CR2016Geo.json?geos=HR
. Each Health Region ID can be used to call https://www12.statcan.gc.ca/rest/census-recensement/CPR2016.json?dguid=${hr[0]}&topic=13
to collect the last census population values.
The Ottawa health region is reporting fully vaccinated and total vaccines distributed at https://www.ottawapublichealth.ca/en/reports-research-and-statistics/daily-covid19-dashboard.aspx
(under Vaccination & Testing). Currently they are reporting 97,170 doses received, 87,737 doses administered
It appears that the health region data uses a hybrid of 2016 census health region/unit definition and current configurations. For example, Saskatchewan used to have 13 health regions, but currently has only one health unit. Yet, the health region data breaks it down by 6 sub divisions. the hr_uid for these itemsdoesn't appear to match the official hr_uid.
Ontario's data didn't update at 10:30 am EDT like it normally does. I can see it on the Ontario website but it doesn't seem to be getting picked up by the tracker. Is there an issue somewhere or is it just delayed?
There are now 4 types of vaccines available. the APIs should track which of the 4 have been distributed and administered.
localhost/:1 Access to XMLHttpRequest at 'https://api.covid19tracker.ca/summary' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
What does this error mean?
I am trying to make a get request with axios on my local host?
Hey,
I am trying a get request to the api but I keep getting the following error:
Access to XMLHttpRequest at 'https://api.covid19tracker.ca/provinces' from origin 'http://localhost:3002' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
My code:
axios.get(`https://api.covid19tracker.ca/provinces`,
{
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json',
}
}
).then((res) => {
console.log(res);
})
Can someone tell me what am I doing wrong?
Request access to https://api.covid19tracker.ca/reports?fill_dates&stat=&date&after&before is blocked by CORS policy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.