-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
When I do a SELECT DISTINCT state FROM 'precincts-2163' I get a list that is a mix of full state names, and FIPS codes:
01
02
04
Arkansas
06
08
09
10
11
12
Georgia
Hawaii
16
17
18
Iowa
Kansas
Kentucky
22
23
24
25
26
Minnesota
28
(null)
Missouri
30
31
32
33
34
35
36
37
38
39
40
41
Pennsylvania
45
46
47
48
49
50
Virginia
Washington
West Virginia
55
Wyoming
72
The county field is similar. I feel the need to standardize, and certainly see the value in having, potentially, both forms (if we'd want, then — state, state_fips, county, and county_fips).
Any thoughts?
Potential solutions could include:
- Hard coding state name or state FIPS code in each command
- Doing a SQLite join to a static CSV file with name and FIPs codes; e.g.
ogr2ogr -F CSV state_fips.csv render/cb_2013_us_state_20m-2163.shp -dialect SQLite -sql "SELECT name AS name, statefp AS fips FROM 'cb_2013_us_state_20m-2163'" - Similar approach but for county codes.
Happy to run with this and submit a PR, but would love to have more input, first.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels