File tree Expand file tree Collapse file tree 5 files changed +130
-134
lines changed
Expand file tree Collapse file tree 5 files changed +130
-134
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ dependencies:
1313 - dill
1414 - geopandas
1515 - git
16+ - jax>=0.4.31
17+ - jaxlib>=0.4.31
18+ - jaxopt>=0.8.3
1619 - libpysal
1720 - multiprocess
1821 - networkx
@@ -32,8 +35,3 @@ dependencies:
3235 - ruff
3336 - setuptools_scm
3437 - watermark
35- # pip installations
36- - pip :
37- - jax>=0.5.3
38- - jaxlib>=0.5.3
39- - jaxopt>=0.8.3
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ dependencies:
1313 - dill
1414 - geopandas=1.1
1515 - git
16+ - jax>=0.4.31
17+ - jaxlib>=0.4.31
18+ - jaxopt>=0.8.3
1619 - libpysal=4.12.1
1720 - multiprocess>=0.70.15
1821 - networkx=3.2.1
@@ -32,8 +35,3 @@ dependencies:
3235 - ruff
3336 - setuptools_scm
3437 - watermark
35- # pip installations
36- - pip :
37- - jax>=0.4.31
38- - jaxlib>=0.4.31
39- - jaxopt>=0.8.3
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ dependencies:
1212 - deprecation
1313 - dill
1414 - geopandas
15+ - jax>=0.5.3
16+ - jaxlib>=0.5.3
17+ - jaxopt>=0.8.3
1518 - git
1619 - libpysal
1720 - multiprocess
@@ -32,8 +35,3 @@ dependencies:
3235 - ruff
3336 - setuptools_scm
3437 - watermark
35- # pip installations
36- - pip :
37- - jax>=0.5.3
38- - jaxlib>=0.5.3
39- - jaxopt>=0.8.3
Original file line number Diff line number Diff line change @@ -1586,7 +1586,7 @@ def parse_bg_fips_by_tract(
15861586 url = base + params
15871587
15881588 rj = requests .get (url ).json ()
1589- geoids = pd .json_normalize (rj ["features" ]).values .flatten ()
1589+ geoids = pd .json_normalize (rj ["features" ]).values .flatten (). sort ()
15901590
15911591 return geoids
15921592
Original file line number Diff line number Diff line change 1414trt_geoids = rel [rel ["puma" ] == puma ]["geoid" ].values
1515
1616# known values #
17- bg_geoids = [
18- "470930001001" ,
19- "470930008001" ,
20- "470930008002" ,
21- "470930008003" ,
22- "470930009011" ,
23- "470930009021" ,
24- "470930009022" ,
25- "470930014001" ,
26- "470930014002" ,
27- "470930014003" ,
28- "470930015001" ,
29- "470930015002" ,
30- "470930015003" ,
31- "470930016001" ,
32- "470930016002" ,
33- "470930017001" ,
34- "470930017002" ,
35- "470930018001" ,
36- "470930018002" ,
37- "470930019001" ,
38- "470930020001" ,
39- "470930020002" ,
40- "470930020003" ,
41- "470930021001" ,
42- "470930021002" ,
43- "470930022001" ,
44- "470930022002" ,
45- "470930022003" ,
46- "470930023001" ,
47- "470930023002" ,
48- "470930024001" ,
49- "470930024002" ,
50- "470930026001" ,
51- "470930026002" ,
52- "470930027001" ,
53- "470930027002" ,
54- "470930028001" ,
55- "470930028002" ,
56- "470930029001" ,
57- "470930029002" ,
58- "470930030001" ,
59- "470930030002" ,
60- "470930030003" ,
61- "470930031001" ,
62- "470930031002" ,
63- "470930032001" ,
64- "470930032002" ,
65- "470930033001" ,
66- "470930034001" ,
67- "470930034002" ,
68- "470930035001" ,
69- "470930035002" ,
70- "470930035003" ,
71- "470930037001" ,
72- "470930037002" ,
73- "470930037003" ,
74- "470930038011" ,
75- "470930038012" ,
76- "470930038013" ,
77- "470930038021" ,
78- "470930038022" ,
79- "470930039011" ,
80- "470930039012" ,
81- "470930039021" ,
82- "470930039022" ,
83- "470930040001" ,
84- "470930040002" ,
85- "470930041001" ,
86- "470930041002" ,
87- "470930042001" ,
88- "470930042002" ,
89- "470930043001" ,
90- "470930043002" ,
91- "470930044011" ,
92- "470930044012" ,
93- "470930044031" ,
94- "470930044032" ,
95- "470930044033" ,
96- "470930044041" ,
97- "470930044042" ,
98- "470930045001" ,
99- "470930045002" ,
100- "470930045003" ,
101- "470930045004" ,
102- "470930046081" ,
103- "470930046082" ,
104- "470930046151" ,
105- "470930046152" ,
106- "470930047001" ,
107- "470930047002" ,
108- "470930048001" ,
109- "470930048002" ,
110- "470930048003" ,
111- "470930050001" ,
112- "470930050002" ,
113- "470930050003" ,
114- "470930066001" ,
115- "470930066002" ,
116- "470930067001" ,
117- "470930067002" ,
118- "470930067003" ,
119- "470930068001" ,
120- "470930068002" ,
121- "470930068003" ,
122- "470930068004" ,
123- "470930069001" ,
124- "470930069002" ,
125- "470930069003" ,
126- "470930070001" ,
127- "470930070002" ,
128- "470930071001" ,
129- "470930071002" ,
130- "470930071003" ,
131- ]
17+ bg_geoids = numpy .array (
18+ [
19+ "470930001001" ,
20+ "470930008001" ,
21+ "470930008002" ,
22+ "470930008003" ,
23+ "470930009011" ,
24+ "470930009021" ,
25+ "470930009022" ,
26+ "470930014001" ,
27+ "470930014002" ,
28+ "470930014003" ,
29+ "470930015001" ,
30+ "470930015002" ,
31+ "470930015003" ,
32+ "470930016001" ,
33+ "470930016002" ,
34+ "470930017001" ,
35+ "470930017002" ,
36+ "470930018001" ,
37+ "470930018002" ,
38+ "470930019001" ,
39+ "470930020001" ,
40+ "470930020002" ,
41+ "470930020003" ,
42+ "470930021001" ,
43+ "470930021002" ,
44+ "470930022001" ,
45+ "470930022002" ,
46+ "470930022003" ,
47+ "470930023001" ,
48+ "470930023002" ,
49+ "470930024001" ,
50+ "470930024002" ,
51+ "470930026001" ,
52+ "470930026002" ,
53+ "470930027001" ,
54+ "470930027002" ,
55+ "470930028001" ,
56+ "470930028002" ,
57+ "470930029001" ,
58+ "470930029002" ,
59+ "470930030001" ,
60+ "470930030002" ,
61+ "470930030003" ,
62+ "470930031001" ,
63+ "470930031002" ,
64+ "470930032001" ,
65+ "470930032002" ,
66+ "470930033001" ,
67+ "470930034001" ,
68+ "470930034002" ,
69+ "470930035001" ,
70+ "470930035002" ,
71+ "470930035003" ,
72+ "470930037001" ,
73+ "470930037002" ,
74+ "470930037003" ,
75+ "470930038011" ,
76+ "470930038012" ,
77+ "470930038013" ,
78+ "470930038021" ,
79+ "470930038022" ,
80+ "470930039011" ,
81+ "470930039012" ,
82+ "470930039021" ,
83+ "470930039022" ,
84+ "470930040001" ,
85+ "470930040002" ,
86+ "470930041001" ,
87+ "470930041002" ,
88+ "470930042001" ,
89+ "470930042002" ,
90+ "470930043001" ,
91+ "470930043002" ,
92+ "470930044011" ,
93+ "470930044012" ,
94+ "470930044031" ,
95+ "470930044032" ,
96+ "470930044033" ,
97+ "470930044041" ,
98+ "470930044042" ,
99+ "470930045001" ,
100+ "470930045002" ,
101+ "470930045003" ,
102+ "470930045004" ,
103+ "470930046081" ,
104+ "470930046082" ,
105+ "470930046151" ,
106+ "470930046152" ,
107+ "470930047001" ,
108+ "470930047002" ,
109+ "470930048001" ,
110+ "470930048002" ,
111+ "470930048003" ,
112+ "470930050001" ,
113+ "470930050002" ,
114+ "470930050003" ,
115+ "470930066001" ,
116+ "470930066002" ,
117+ "470930067001" ,
118+ "470930067002" ,
119+ "470930067003" ,
120+ "470930068001" ,
121+ "470930068002" ,
122+ "470930068003" ,
123+ "470930068004" ,
124+ "470930069001" ,
125+ "470930069002" ,
126+ "470930069003" ,
127+ "470930070001" ,
128+ "470930070002" ,
129+ "470930071001" ,
130+ "470930071002" ,
131+ "470930071003" ,
132+ ]
133+ )
132134
133135bg_vals = {
134136 "dims" : (113 , 18 ),
@@ -147,7 +149,7 @@ def test_parse_bg_fips_by_tract():
147149 year = year ,
148150 targets = trt_geoids ,
149151 )
150- known = bg_geoids
152+ known = bg_geoids . sort ()
151153 numpy .testing .assert_array_equal (observed , known )
152154
153155
@@ -161,11 +163,11 @@ def test_invalid_geo():
161163
162164@pytest .skip_if_no_censusapikey
163165def test_extract_bg ():
164- bg_geoids = parse_bg_fips_by_tract (
166+ _bg_geoids = parse_bg_fips_by_tract (
165167 year = year ,
166168 targets = trt_geoids ,
167169 )
168- bg = extract_geographies (year , bg_geoids , geo = "bg" )
170+ bg = extract_geographies (year , _bg_geoids , geo = "bg" )
169171 observed = {"dims" : bg .shape , "bbox" : bg .total_bounds }
170172
171173 observed_dims = observed ["dims" ]
You can’t perform that action at this time.
0 commit comments