covid19india / covid19india-react

Tracking the impact of COVID-19 in India
https://www.covid19india.org
MIT License
6.86k stars 3.41k forks source link

Tracking Non-Virus Covid19 Lockdown Deaths #354

Closed anivar closed 4 years ago

anivar commented 4 years ago

Is your feature request related to a problem? Please describe. India have an increasing death rate linked to Covid19 Lockdown measures. This is peculiar comparing to other countries in the world.

Describe the solution you'd like Please integrate API from http://projects.datameet.org/covid19/non-virus-deaths/

thejeshgn commented 4 years ago

API details if anyone is interested. You can cache it on your server as it changes only once a day.

https://twitter.com/thej/status/1244342448664371200

asdofindia commented 4 years ago

From a public health perspective, it is important to contextualize numbers to be able to make right decisions. There are no clear rights and wrongs in medicine. There are only relatively better/worse options.

Therefore integrating deaths due to non-virus causes is important.

It would also be useful to have breakdown of these deaths into different categories (eg: Non-COVID deaths due to lack of ventilators/ICU beds in hospitals, non-COVID deaths due to inability to refill on medications, accidents during migration, deaths due to police action, and so on).

These figures enable weighing risks and benefits for every time-critical decision, like provisions to be made in a hospital, or measures to take in local self governance, etc.

thejeshgn commented 4 years ago

We have a reason columns which can contain one more values from

Medical Emergency Road Blocked Suicide Lockdown Exhaustion, Migration Hunger

etc. We can add more as when we encounter


{
  "id": "2020-03-25|non_virus_deaths|17",
  "key": "2020-03-25|non_virus_deaths|17",
  "value": {
    "_id": "2020-03-25|non_virus_deaths|17",
    "_rev": "3-3381b76df61bff8c3b28276a1cffad27",
    "type": "non_virus_deaths",
    "location": "Rasingapuram",
    "district": "Theni",
    "state": "KL",
    "incident_date": "2020-03-24",
    "deaths": 4,
    "reason": [
      "Forest fire",
      "Roadblock"
    ],
    "source_date": "2020-03-25",
    "source_link": "https://www.thehindu.com/news/national/tamil-nadu/death-toll-rises-to-4-in-theni-forest-fire-tragedy/article31160605.ece",
    "source": "www.thehindu.com"
  }
}
esafwan commented 4 years ago

API details if anyone is interested. You can cache it on your server as it changes only once a day.

https://twitter.com/thej/status/1244342448664371200

I think the API is not allowing cross-origin requests. I was just trying out the API after @anivar shared the same.

thejeshgn commented 4 years ago

@esafwan Can you cache it on your server and use it. Server side pull should be okay right?

esafwan commented 4 years ago

Yes, it should work.

I had forked this repo and was directly accessing via axios from client-side to see if I can send a PR.

thejeshgn commented 4 years ago

Let me know.

Else I will add this site to my CORS list.

esafwan commented 4 years ago

@thejeshgn Sorry got a bit held up. Correct me if I am wrong, I think covid19india.org is not using a backend. It's reading data from JSON files. In that case, we only have two options:

  1. Write a CRON job somewhere to periodically download data of non-virus death and update the JSON file from where we update the site.
  2. Add covid19india.org to the CORS list.

I think this decision should be taken by the maintainers (@jeremyphilemon) and @thejeshgn .

thejeshgn commented 4 years ago

Give me an hour. I will add cors for this domain.

Regards, Thej

Thejesh GN ⏚ ತೇಜೇಶ್ ಜಿ.ಎನ್ http://thejeshgn.com

On Sun, 5 Apr, 2020, 3:12 PM Safwan Erooth, notifications@github.com wrote:

@thejeshgn https://github.com/thejeshgn Sorry got a bit held up. Correct me if I am wrong, I think covid19india.org is not using a backend. It's reading data from JSON files. In that case, we only have two options:

  1. Write a CRON job somewhere to periodically download data of non-virus death and update the JSON file from where we update the site.
  2. Add covid19india.org to the CORS list.

I think this decision should be taken by the maintainers (@jeremyphilemon https://github.com/jeremyphilemon) and @thejeshgn https://github.com/thejeshgn .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/covid19india/covid19india-react/issues/354#issuecomment-609388380, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAASSUVHCK3IXKDODL2NRSLRLBG67ANCNFSM4LWCWSBQ .

thejeshgn commented 4 years ago

I have added the CORS. It should work.

In case if it didn't use one of the CORS proxies. https://gist.github.com/jimmywarting/ac1be6ea0297c16c477e17f8fbe51347

Example, this should work too http://api.allorigins.win/get?url=https%3A//data.thejeshgn.com/covid19/_design/india/_view/non_virus_deaths%3Fdescending%3Dfalse&callback=?

using

https://allorigins.win/

shuklaayush commented 4 years ago

Sorry, but this seems out of our scope.