-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storing data in a data in database #98
Comments
From what I have seen you guys talking about on other issues it seems like the format of the data is not totally stable. |
Yes, that would probably be better. MongoDB or alike. |
Happy to help with this as well. |
This would be good too because the API is now broken for me and others |
@traderjosh can you explain in more detail how it’s broken for you? JHU (our data provider) made some pretty drastic changes lately which has caused the API’s outputs to change (of note the ID indexing and provinces no longer being present for USA). |
@ExpDev07 it works now - it was that cors header field missing from the API. The recovered field is missing now it seems. Is that gone forever? And some countries don't have an id, you're right. I think a database would be good for this in case of website changes. MongoDB would be good because the data can change unexpectedly. |
For JHU, yes, the recovery stats is gone forever unless they decide to bring it back. I’m gonna see if I can find some other reputable sources that offer it and add it to the API. I believe their reasoning was that no reputable sources were providing accurate recovery numbers, so they just decided to remove it. |
Ok that's not an issue. Do you want me to help setup MongoDB? I can write the boilerplate and you can integrate an account for it. |
It would be awesome if you can start drafting a PR for it. It needs to be compatible with our service provider system (see “app.services.locations” module). But I think MongoDB will be perfect for it. I’m thinking we periodically sync the DB with data retrieved from the data sources. |
And it should be in Python? Not my speciality but I could do some research. |
Yeah, feel like that would be best. |
|
Perhaps we should use Mongo to store and update the normalized data?
|
From what I have seen in the code so far, both the JHU and CSBS location models derive from the Splitting the data in multiple collections in Mongo wouldn't really add much value unless you want to support historical records in multiple formats, which is horrible to query anyway if they aren't backwards compatible. |
We are deployed with Related readinghttps://realpython.com/python-memcache-efficient-caching/ Created a new issue for using a shared cache #304 |
Right now the data is just stored in cache. Is it perhaps better to sync the data to an actual MySQL database? It would allow for fast querying.
The text was updated successfully, but these errors were encountered: