andrewthong / covid19tracker-api

API backend for COVID-19 Tracker Canada project
https://api.covid19tracker.ca/
MIT License
37 stars 5 forks source link

Recent combined health regions #91

Closed andrewthong closed 3 years ago

blanchardjeremy commented 3 years ago

This looks like it's on track for what @jy2wong and I are requesting over in #88. Thanks for starting this.

Is it possible to have regions/recent API call take a parameter of how many days in the past we're seeking? For our purpose on microCOVID, we need 15 days of data to be able to resolve the issue we're facing.

We use 2 weeks worth of data so we can determine whether cases are increasing or decreasing in a given area week-over-week. And we need 15 days because we don't count the current day's data because some of our data sources aren't updated for "today" and some are.

Thanks again!

andrewthong commented 3 years ago

I plan to set it so it's the most recent 15 days. Still testing things out but aiming to deploy either tonight or tomorrow evening if all goes well.

blanchardjeremy commented 3 years ago

Oh wonderful! 👍 You rock! Thank you! 🙏

blanchardjeremy commented 3 years ago

Hi @andrewthong ! This looks great. Thanks again for the time you put into this.

From a quick read of the new code, it looks like it's either 7 or 10 days. Am I missing the part where it can be set manually or set to 15 days? Maybe that's somewhere else.

andrewthong commented 3 years ago

It's set in the .env configuration. The 10 you see is just an example setting, and the 7 is the default if this configuration is not set.

blanchardjeremy commented 3 years ago

Oh that makes sense! Thanks!