12 counties have ambiguous names within their states
simonw opened this issue · comments
name name fips_codes
Maryland Baltimore "[""24510"", ""24005""]"
Missouri St. Louis "[""29189"", ""29510""]"
Virginia Fairfax "[""51600"", ""51059""]"
Virginia Franklin "[""51620"", ""51067""]"
Virginia Richmond "[""51159"", ""51760""]"
Virginia Roanoke "[""51770"", ""51161""]"
I think these are all city v.s. county issues.
Looking at https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/home/?cid=nrcs143_013697
24510 = Baltimore City
24005 = Baltimore
29189 = St Louis
29510 = St Louis City
51600 = Fairfax City
51059 = Fairfax
51620 = Franklin City
51067 = Franklin
51159 = Richmond
51760 = Richmond City
51770 = Roanoke
51161 = Roanoke
That clears up all but Roanoke.
https://va.postcodebase.com/county/51770 says Roanoke City
https://va.postcodebase.com/county/51161 says Roanoke County
I'm going to deploy a data migration for this. It's not the perfect solution (since it won't work for new installations of VIAL that don't yet have their counties imported) but this is mainly a cosmetic issue so I can live with that.
select fips_code, name from county where fips_code in ('24510', '29510', '51600', '51620', '51760', '51770')
Before running this migration on staging: https://vial-staging.calltheshots.us/dashboard/?sql=select+fips_code%2C+name+from+county+where+fips_code+in+%28%2724510%27%2C+%2729510%27%2C+%2751600%27%2C+%2751620%27%2C+%2751760%27%2C+%2751770%27%29%3Aje_rsIHENolLwWtmVYh35LGvwBJbSbTaYfem_qc7-8U
fips_code name
24510 Baltimore
29510 St. Louis
51600 Fairfax
51620 Franklin
51760 Richmond
51770 Roanoke
After running it on staging, the same query returns:
fips_code name
24510 Baltimore City
29510 St Louis City
51600 Fairfax City
51620 Franklin City
51760 Richmond City
51770 Roanoke City
fips_code name
24005 Baltimore
29189 St. Louis
51059 Fairfax
51067 Franklin
51159 Richmond
51161 Roanoke
24510 Baltimore
29510 St. Louis
51600 Fairfax
51620 Franklin
51760 Richmond
51770 Roanoke
Production after:
fips_code name
24005 Baltimore
29189 St. Louis
51059 Fairfax
51067 Franklin
51159 Richmond
51161 Roanoke
24510 Baltimore City
29510 St Louis City
51600 Fairfax City
51620 Franklin City
51760 Richmond City
51770 Roanoke City