sdetweil / MyCovid19

monitor COV ID 19 status
9 stars 5 forks source link

US county level data #9

Closed tdworm closed 4 years ago

tdworm commented 4 years ago

Hi. Really enjoy this module; thanks for sharing it. Question, how hard would it be to add county level data? There is a us-counties.csv file on the nytimes github. I tried to modify the files but am well out of my comfort zone (knew that before I tried!). Thanks

sdetweil commented 4 years ago

@tdworm not really sure.. how would you propose to identify the counties in config? (as there are colliding names in different states)

right now i have an array of single names so maybe [{county, state},{county,state}] (then the colors etc line up) (the data has both on each record)

how would u label those in the legend? just the county name? the combo would get long pretty fast

tdworm commented 4 years ago

{county, state} is how the csv file is structured. I think labeling is fine with just county. It works obviously be a locally specific chart so I'd assume the user would know the state without it being listed in the legend.

I pull county data from a json sensor in home assistant and it's useful to see local case trends. Would be a nice addition to my mirror but again, I couldn't figure out how to modify your module so no worries either way.

sdetweil commented 4 years ago

@tdworm ok, do a git pull

the format is counties : [ {'countyname':'statename'},{'countyname':'statename'],

i tried to minimize the amount of data to enter so to make avalid javascript object it had to have the : between the names... (vs a comma like we talked before)

right now, I only display on the chart the copunty name

let me know how it looks README updated as well

there was one prior bug exposed in testing , if there are not enough colors specified for the numebr of things requested, then the data is not shown... now draws in ugly pink!!..

tdworm commented 4 years ago

My sincere thanks for updating that. It works great. Stay safe and thanks again.