Skip to content
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

Add support for province/state-level timeseries data #13

Closed
wants to merge 1 commit into from

Conversation

titaniumbones
Copy link

  • add new function buildSeries to extract main parsing logic
  • create new files province-${country}.json for the relevant
    countries

Addresses half of #9

- add new function `buildSeries` to extract main parsing logic
- create new files `province-${country}.json` for the relevant
countries

Addresses half of pomber#9
@pomber
Copy link
Owner

pomber commented Mar 19, 2020

Hey @titaniumbones , thanks a lot for the PR.

I'm not sure about having one file per country. I know it makes it easier and faster to download if you are interested in only one country, but country names aren't very stable and having multiple files makes it more difficult to maintain.

What do you think of putting all the regions in one big file? we could also add the lat-long there:

{
  "Cameroon": {
    "Cameroon": {
      lat: 3.4,
      long: 11.5,
      cases: [
        {date: .., confirmed: .., deaths: .., recovered: ..},
        {date: .., confirmed: .., deaths: .., recovered: ..},
        ...
      ] 
    }
  }
  "Canada": {
    "Ontario": {
      lat: 51,
      long: -85,
      cases: [
        {date: .., confirmed: .., deaths: .., recovered: ..},
        {date: .., confirmed: .., deaths: .., recovered: ..},
        ...
      ]
    },
    "Alberta": {
      lat: 53,
      long: -116,
      cases: [
        {date: .., confirmed: .., deaths: .., recovered: ..},
        {date: .., confirmed: .., deaths: .., recovered: ..},
        ...
      ]
    },
    ...
  },
  ...
}

@titaniumbones
Copy link
Author

titaniumbones commented Mar 19, 2020 via email

@zbraniecki
Copy link
Contributor

I started putting together https://labs.braniecki.net/covid19-timeseries/ based on your data. per-region data would be awesome to have. Thank you!

@flccrakers
Copy link

I would suggest the following: today you have one file name timeseries.json which in fact represent the aggregated data by country.

I suggest to create the files:

  • aggregatedCountries.json which is the current countries.json
  • countries.json who will contain the name in the following form: ${country} / ${province}
  • aggregatedtimeseries.json whic is the current timeseries.json
    -timeserie.json whowill contain the data for countries.json

I did that in my own dash board: http://covid-by-contries.alwaysdata.net/, https://github.com/flccrakers/covid-19.
I didn't use your repo yet because the aggregation logic was missing, but I use your algorithm to create my files.

@shaun-yb
Copy link

sort of bouncing off of what @flccrakers is saying... something i've struggled with the adapters on this dataset is that when i search for say, the united states, i can only get it on a grandular level, and i have to sum up all of the states to get a final total population. i really like how this dataset just has the US alone:

Screen Shot 2020-03-21 at 12 31 02 AM

so, if we are to add in breakdowns by state, can we still keep an entry for the entire country as a whole?

@flccrakers
Copy link

sort of bouncing off of what @flccrakers is saying... something i've struggled with the adapters on this dataset is that when i search for say, the united states, i can only get it on a grandular level, and i have to sum up all of the states to get a final total population. i really like how this dataset just has the US alone:

Screen Shot 2020-03-21 at 12 31 02 AM

so, if we are to add in breakdowns by state, can we still keep an entry for the entire country as a whole?

Yeah exactly what I suggest. Keep the aggregated data by country and add an other set of data for provinces, when you want to access more details datas ;-)

@kvenn
Copy link

kvenn commented Mar 23, 2020

@titaniumbones I like your suggestion to have separate files. I'm building a dashboard of just US and would love to have a per-state breakdown without need to request all the data.

Were you able to get actions working on your repo? I might fork it.

@titaniumbones
Copy link
Author

titaniumbones commented Mar 23, 2020 via email

@kvenn
Copy link

kvenn commented Mar 23, 2020

Oh nice! @titaniumbones so is your fork actively being updated with real information?

I'd love to point at https://titaniumbones.github.io/covid19/timeseries.json it if you're going to keep it up!

@titaniumbones
Copy link
Author

titaniumbones commented Mar 23, 2020 via email

@pomber
Copy link
Owner

pomber commented Apr 16, 2020

I'm going to close this one, we won't add province/state support

@pomber pomber closed this Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants