Skip to content

Commit ae77570

Browse files
authored
Merge pull request #17 from SPTKL/master
Fixing census tract formatting issue
2 parents 1026c9b + 39c7b20 commit ae77570

8 files changed

Lines changed: 23 additions & 18 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/__pycache__/
77
/dist/
88
/build/
9+
/venv/
10+
/.vscode/
911
MANIFEST
1012
cover
1113
.coverage

geosupport/function_info/work_area_layouts/output/1B.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ Feature Type Code,,1,211,211,,,
4949
Segment Type Code,,1,212,212,,,
5050
Alley or Cross Street List Flag,,1,213,213,A - Alley Split X - Cross Street List Modified,,
5151
Coincidence Segment Count,,1,214,214,,,
52-
1990 Census Tract,,6,218,223,,,
53-
2010 Census Tract,,6,224,229,,,
52+
1990 Census Tract,,6,218,223,,,CT
53+
2010 Census Tract,,6,224,229,,,CT
5454
2010 Census Block,,4,230,233,,,
5555
2010 Census Block Suffix,,1,234,234,Not Implemented,,
56-
2000 Census Tract,,6,235,240,,,
56+
2000 Census Tract,,6,235,240,,,CT
5757
2000 Census Block,,4,241,244,,,
5858
2000 Census Block Suffix,,1,245,245,,,
5959
Neighborhood Tabulation Area (NTA),,4,246,249,,,

geosupport/function_info/work_area_layouts/output/1_1E.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ Segment Type Code,1,212,212,,,,
5252
Alley or Cross Street List Flag,1,213,213,A - Alley Split X - Cross Street ,,,
5353
Coincidence Segment Count,1,214,214,,,,
5454
Borough of Census Tract,1,217,217,Internal,,,
55-
1990 Census Tract,6,218,223,,,,
56-
2010 Census Tract,6,224,229,,,,
55+
1990 Census Tract,6,218,223,,,,CT
56+
2010 Census Tract,6,224,229,,,,CT
5757
2010 Census Block,4,230,233,,,,
5858
2010 Census Block Suffix,1,234,234,Not Implemented,,,
59-
2000 Census Tract,6,235,240,,,,
59+
2000 Census Tract,6,235,240,,,,CT
6060
2000 Census Block,4,241,244,,,,
6161
2000 Census Block Suffix,1,245,245,,,,
6262
Neighborhood Tabulation Area (NTA),4,246,249,,,,

geosupport/function_info/work_area_layouts/output/2.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Fire Battalion,2,128,129,,,,
3838
Fire Company Type,1,130,130,,,,
3939
Fire Company Number,3,131,133,,,,
4040
Community School District,2,134,135,,,,
41-
2010 Census Tract,6,136,141,,,,
42-
1990 Census Tract,6,142,147,,,,
41+
2010 Census Tract,6,136,141,,,,CT
42+
1990 Census Tract,6,142,147,,,,CT
4343
List of Pairs of Level Codes,10,148,157,Not Implemented,,,
4444
Police Patrol Borough,2,158,159,,,,
4545
Assembly District,2,160,161,,,,
@@ -49,7 +49,7 @@ Civil Court District,2,166,167,,,,
4949
City Council District,2,168,169,,,,
5050
CD Eligibility,1,170,170,,,,
5151
Distance Between Duplicate Intersections,5,171,175,,,,
52-
2000 Census Tract,6,176,181,,,,
52+
2000 Census Tract,6,176,181,,,,CT
5353
Health Center District,2,182,183,,,,
5454
Sanitation District,3,184,186,,,,
5555
Sanitation Section/Subsection,2,187,188,,,,

geosupport/function_info/work_area_layouts/output/2W.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Fire Battalion,2,128,129,,,,
3838
Fire Company Type,1,130,130,,,,
3939
Fire Company Number,3,131,133,,,,
4040
Community School District,2,134,135,,,,
41-
2010 Census Tract,6,136,141,,,,
42-
1990 Census Tract,6,142,147,,,,
41+
2010 Census Tract,6,136,141,,,,CT
42+
1990 Census Tract,6,142,147,,,,CT
4343
List of Pairs of Level Codes,10,148,157,Not Implemented,,,
4444
Police Patrol Borough,2,158,159,,,,
4545
Assembly District,2,160,161,,,,
@@ -49,7 +49,7 @@ Civil Court District,2,166,167,,,,
4949
City Council District,2,168,169,,,,
5050
CD Eligibility,1,170,170,,,,
5151
Distance Between Duplicate Intersections,5,171,175,,,,
52-
2000 Census Tract,6,176,181,,,,
52+
2000 Census Tract,6,176,181,,,,CT
5353
Health Center District,2,182,183,,,,
5454
Sanitation District,3,184,186,,,,
5555
Sanitation Section/Subsection,2,187,188,,,,

geosupport/function_info/work_area_layouts/output/3.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ Election District (ED),3,245,247,,LEFT SIDE:,,
5151
Assembly District (AD),2,248,249,,LEFT SIDE:,,
5252
Police Patrol Borough,2,250,251,,LEFT SIDE:,,
5353
Borough Code,1,253,253,,LEFT SIDE:,,
54-
1990 Census Tract,6,254,259,,LEFT SIDE:,,
55-
2010 Census Tract,6,260,265,,LEFT SIDE:,,
54+
1990 Census Tract,6,254,259,,LEFT SIDE:,,CT
55+
2010 Census Tract,6,260,265,,LEFT SIDE:,,CT
5656
2010 Census Block,4,266,269,,LEFT SIDE:,,
5757
2010 Census Block Suffix,1,270,270,Not Implemented,LEFT SIDE:,,
58-
2000 Census Tract,6,271,276,,LEFT SIDE:,,
58+
2000 Census Tract,6,271,276,,LEFT SIDE:,,CT
5959
2000 Census Block Suffix,1,281,281,,LEFT SIDE:,,
6060
Neighborhood Tabulation Area (NTA),4,289,292,,LEFT SIDE:,,
6161
RIGHT SIDE:,142,301,442,,,,

geosupport/function_info/work_area_layouts/output/3C.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ Election District (ED),3,245,247,,,,
5050
Assembly District (AD),2,248,249,,,,
5151
Police Patrol Borough,2,250,251,,,,
5252
Borough Code,1,253,253,Internal Use,,,
53-
1990 Census Tract,6,254,259,,,,
54-
2010 Census Tract,6,260,265,,,,
53+
1990 Census Tract,6,254,259,,,,CT
54+
2010 Census Tract,6,260,265,,,,CT
5555
2010 Census Block,4,266,269,,,,
5656
2010 Census Block Suffix,1,270,270,Not Implemented,,,
57-
2000 Census Tract,6,271,276,,,,
57+
2000 Census Tract,6,271,276,,,,CT
5858
2000 Census Block,4,277,280,,,,
5959
2000 Census Block Suffix,1,281,281,,,,
6060
Neighborhood Tabulation Area (NTA),4,289,292,,,,

geosupport/io.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ def f(v):
8787
'intersections': list_of_workareas('INTERSECTION', 55),
8888
'node_list': list_of_nodes,
8989

90+
# Census Tract formatter
91+
'CT': lambda v: '' if v is None else v.replace(' ', '0'),
92+
9093
# Default formatter
9194
'': lambda v: '' if v is None else str(v).strip().upper()
9295
}

0 commit comments

Comments
 (0)