CSSEGISandData / COVID-19

Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE
https://systems.jhu.edu/research/public-health/ncov/
29.14k stars 18.44k forks source link

FIPS codes incorrect on csse_covid_19_daily_reports #2530

Open BrianRuizy opened 4 years ago

BrianRuizy commented 4 years ago

I was attempting to make a Choropleth map of cases per-capita of US-counties, however I resulted in many blank regions due to misinterpretation of FIPS codes. I thought the issue was on my end when using Pandas to read the data since pandas.read_csv() drop leading 0's on integer or float values. So I used the following arg:

pd.read_csv('.../csse_covid_19_daily_reports/05-15-2020.csv', dtype={"FIPS": str})

However, after closer inspection into the raw data, it is apparent that the method to aggregate data into _csse_covid_19_dailyreports/ is stripping the crucial leading 0's of the FIPS.

Take for instance, LA, California:

FIPS County
Correct 06037 Los Angeles County
Incorrect 6037 Los Angeles County

Alabama, Arkansas, Colorado, among others, should also have a leading-0 on their FIPS. Wiki Reference List of FIPS.

Untitled

Lucas-Czarnecki commented 4 years ago

This is an ongoing issue that has persisted for around a month now. You'll have to fix it on your end if you want a solution.

Alternatively, I maintain a clean repo of the JHU data HERE that may be of interest. It fixes this and other common issues.

BrianRuizy commented 4 years ago

@Lucas-Czarnecki Thanks for the viable alternative solution! Though, I had already resolved it --site viewable here--I will definitely refer to your repo when needed.