covidatlas / li

Next-generation serverless crawler for COVID-19 data
Apache License 2.0
57 stars 33 forks source link

Aggregate column is not marked correctly for all countries #550

Open sagarkulkarny opened 4 years ago

sagarkulkarny commented 4 years ago

e.g. AUS has one row for entire country marked as "state" which should be "country" and it has 6 rows for the states Australian Capital Territory, New South Wales, Northern Territory, Queensland, South Australia and Victoria which are blank but should be marked "state".

mdibenigno commented 4 years ago

In addition, countries like the USA have a country level count in addition to state and county, but then countries like China only have data at a province level... so I'm starting to go a little crazy with what countries to aggregate/melt!

lazd commented 4 years ago

@sagarkulkarny hmm, you may be right about AUS, @camjc can you look into it? We should be properly setting aggregate: 'state' on both the states and the rolled up data for AUS itself.

lazd commented 4 years ago

@mdibenigno I don't see the problem at all here. CHN clearly says aggregate: state, and so does every single CHN province -- if you want totals for all of CHN, then just take CHN.

Look at the code on the map: https://github.com/lazd/coronadatascraper/blob/master/site/map.js#L133-L160

You can see we find out what is a county, what is a state, and what is a country and choose which one to display by looking at aggregate.

lazd commented 4 years ago

@tautme says

The aggregate labels for country total cases are not consistent. covidatlas/coronadatascraper#378

image