starschema / COVID-19-data

Unpivoted and cleaned data sets on the COVID-19 pandemic

Home Page:https://starschema.github.io/COVID-19-data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JHU_COVID_19: FIPS codes should have leading zeros to 5 characters

sfc-gh-space opened this issue · comments

Describe the bug
283 FIPS codes don't have leading zeros to 5 characters in the JHU_COVID_19 table. Also, three FIPS codes (66, 72, 78) have codes but no names which should be impossible. (I don't see them in the FIPS list I was referencing--bad data?)

To Reproduce

select distinct COUNTY, FIPS
from "STARSCHEMA_COVID19"."PUBLIC"."JHU_COVID_19"
where LEN(FIPS) < 5
ORDER BY COUNTY; 

image

select distinct COUNTY, FIPS 
from "STARSCHEMA_COVID19"."PUBLIC"."JHU_COVID_19"
where COUNTY in ('Alamosa','Alpine')
ORDER BY COUNTY; 

image

Expected behavior
FIPS codes should be 5 characters to make them easier to join to external sources. In this case, some counties are represented twice due to the issue (i.e. Alamosa with codes 08003 and 8003).