Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Extra column which shows date of 1st reported case. #337

Closed
strikertanmay opened this issue Mar 29, 2020 · 25 comments
Closed

Extra column which shows date of 1st reported case. #337

strikertanmay opened this issue Mar 29, 2020 · 25 comments
Assignees
Labels
Status: Available Reply with /claim to assign to you

Comments

@strikertanmay
Copy link
Contributor

This feature will help people to get information that may be important sometimes as the date of first reported case shows the level of danger in the particular state/district. This will also help doctors, analysts, and other people to take important decisions if required.

Simply add one column in the table which shows the date of first reported case in each state as well as in each district.

Look on this website https://www.worldometers.info/coronavirus/ which also have a same column which I'm talking about.

@strikertanmay
Copy link
Contributor Author

@JunaidBabu I would like to work on this issue

@SubashAravindan
Copy link

I'd like to take this up

@pavankirigeri
Copy link

@JunaidBabu Is this issue still open?

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Can someone work on API for this? Data that is to be populated in the column isn't present in the current API and it is not possible to calculate the same.

@strikertanmay
Copy link
Contributor Author

Can someone work on API for this? Data that is to be populated in the column isn't present in the current API and it is not possible to calculate the same.

@pk1997 yeah I would like work on the API for this issue. Let distribute the work and Integrate this feature.

@pk1997
Copy link

pk1997 commented Mar 30, 2020

@strikertanmay Sure. Let me know once you are done with API. BTW do we have slack channel or something for communication

@strikertanmay
Copy link
Contributor Author

@strikertanmay Sure. Let me know once you are done with API. BTW do we have slack channel or something for communication

@pk1997 Please tell me the response structure which u needed to populate the table. I will modify the api response on that basis.

@pk1997
Copy link

pk1997 commented Mar 30, 2020

@strikertanmay In API response of 'https://api.covid19india.org/data.json', In statewise array, send a field saying first_reported with date in it.
Ex of json data in statewise array
{
"active":"183",
"confirmed":"215",
"deaths":"7",
"delta":{
"active":12,
"confirmed":12,
"deaths":0,
"recovered":0
},
"lastupdatedtime":"30/03/2020 10:02:25",
"recovered":"25",
"state":"Maharashtra"
"first_reported":"30 jan 2020"
}

Hope this helps

@strikertanmay
Copy link
Contributor Author

@strikertanmay In API response of 'https://api.covid19india.org/data.json', In statewise array, send a field saying first_reported with date in it.
Ex of json data in statewise array
{
"active":"183",
"confirmed":"215",
"deaths":"7",
"delta":{
"active":12,
"confirmed":12,
"deaths":0,
"recovered":0
},
"lastupdatedtime":"30/03/2020 10:02:25",
"recovered":"25",
"state":"Maharashtra"
"first_reported":"30 jan 2020"
}

Hope this helps

Okay I get it. If I change in state_district_wise.json (https://api.covid19india.org/state_district_wise.json)as this will cover both district and state, it will worked for you ?
"Goa": {
"districtData": {
"North Goa": {
"confirmed": 3,
"lastupdatedtime": "",
"firstReported" : "30/01/2020"
},
"Unknown": {
"confirmed": 2,
"lastupdatedtime": ""
}
}
"firstReported" : "30/01/2020"
},

@pk1997
Copy link

pk1997 commented Mar 30, 2020

@strikertanmay Even though yours is a good idea to cover both, I feel its bad design to involve state data in district wise data. Add first reported for the state in https://api.covid19india.org/data.json API and first reported of the district in https://api.covid19india.org/state_district_wise.json API so that it will be a clean code
Hope you understand my concern here

@strikertanmay
Copy link
Contributor Author

@strikertanmay Even though yours is a good idea to cover both, I feel its bad design to involve state data in district wise data. Add first reported for the state in https://api.covid19india.org/data.json API and first reported of the district in https://api.covid19india.org/state_district_wise.json API so that it will be a clean code
Hope you understand my concern here

I'm also not truly satisfied with my idea and your concern is totally valid. Actually I explored but not found any way to update the data.json just like there is a way for state_district_wise.json. We can do one more thing as all states have first_reported cases and there is no update in this field so you can also hardcoded it for the state. And for district_wise I will update the API and it will populate through API response

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Sure lets do that

@strikertanmay
Copy link
Contributor Author

Sure lets do that

covid19india/api#38

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Can you help me curate an object contains ifo first reported case of each and every state.
Ex: right now we are getting district wise info of the first reported case. But doing it statewise requires creating const object with values in it.
const firstReported = {
'Goa' : '12th feb',
'Karnataka': 1st Mar',....
}
Can you help me create this constant object ?

@strikertanmay
Copy link
Contributor Author

Can you help me curate an object contains ifo first reported case of each and every state.
Ex: right now we are getting district wise info of the first reported case. But doing it statewise requires creating const object with values in it.
const firstReported = {
'Goa' : '12th feb',
'Karnataka': 1st Mar',....
}
Can you help me create this constant object ?

Yeah sure..
I will make a separate json object and make a PR for it. Does it work?

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Sure Thanks

@strikertanmay
Copy link
Contributor Author

Sure Thanks

@pk1997 Please view the PR and suggest if any change required.

@pk1997
Copy link

pk1997 commented Mar 30, 2020

PR link please ?

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Gotcha. That should have been done in frontend repo. Anyway thanks for the help I got what I needed

@strikertanmay
Copy link
Contributor Author

strikertanmay commented Mar 30, 2020

Gotcha. That should have been done in frontend repo. Anyway thanks for the help I got what I needed

U can directly fetch data by requesting api/state_wise_first_reported.json. According to me this will be good to fetched all data from api. hope u get my point

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Got it.

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Will do that once your pr is up and running

@pk1997
Copy link

pk1997 commented Mar 30, 2020

Hey there @strikertanmay I respect your work but can you change date format, US uses months first so lets keep it like this. I will give you JSON please paste the same

{ 'Andaman and Nicobar Islands': '26th March', 'Andhra Pradesh': '12th March', Bihar: '22th March', Chandigarh: '23th March', Chhattisgarh: '19th March', Delhi: '02th March', Goa: '25th March', Gujarat: '19th March', Haryana: '04th March', 'Himachal Pradesh': '20th March', 'Jammu and Kashmir': '09th March', Karnataka: '09th March', Kerala: '30th January', Ladakh: '07th March', 'Madhya Pradesh': '20th March', Maharashtra: '09th March', Manipur: '24th March', Mizoram: '25th March', Odisha: '16th March', Puducherry: '17th March', Punjab: '09th March', Rajasthan: '03th March', 'Tamil Nadu': '07th March', Telangana: '02th March', 'Uttar Pradesh': '04th March', Uttarakhand: '15th March', 'West Bengal': '17th March', };

This will look good too on the actual table

@strikertanmay
Copy link
Contributor Author

Hey there @strikertanmay I respect your work but can you change date format, US uses months first so lets keep it like this. I will give you JSON please paste the same

{ 'Andaman and Nicobar Islands': '26th March', 'Andhra Pradesh': '12th March', Bihar: '22th March', Chandigarh: '23th March', Chhattisgarh: '19th March', Delhi: '02th March', Goa: '25th March', Gujarat: '19th March', Haryana: '04th March', 'Himachal Pradesh': '20th March', 'Jammu and Kashmir': '09th March', Karnataka: '09th March', Kerala: '30th January', Ladakh: '07th March', 'Madhya Pradesh': '20th March', Maharashtra: '09th March', Manipur: '24th March', Mizoram: '25th March', Odisha: '16th March', Puducherry: '17th March', Punjab: '09th March', Rajasthan: '03th March', 'Tamil Nadu': '07th March', Telangana: '02th March', 'Uttar Pradesh': '04th March', Uttarakhand: '15th March', 'West Bengal': '17th March', };

This will look good too on the actual table

Okay, I will change for the state data. But For district data, will u change the format during populating or I will have to change in JSON itself?

@jeremyphilemon
Copy link
Collaborator

Closed in favor of #1496

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Available Reply with /claim to assign to you
Projects
None yet
Development

No branches or pull requests

7 participants