File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import pandas as pd
55import us
66from housing_data .build_data_utils import impute_2025_population
7- from housing_data .data_loading_helpers import get_url_text
87from housing_data .fips_crosswalk import load_fips_crosswalk
98
109
@@ -119,11 +118,7 @@ def get_county_fips_crosswalk(data_repo_path: Path) -> pd.DataFrame:
119118
120119
121120def get_county_populations_1990s (data_path : Path ) -> pd .DataFrame :
122- table_text = get_url_text (
123- "https://www2.census.gov/programs-surveys/popest/tables/1990-2000/counties/totals/99c8_00.txt" ,
124- data_path ,
125- encoding = "latin_1" ,
126- )
121+ table_text = (data_path / "99c8_00.txt" ).read_text (encoding = "latin_1" )
127122
128123 table_text = table_text [: table_text .index ("Block 2" )].strip ()
129124
Original file line number Diff line number Diff line change 44import pandas as pd
55import us
66from housing_data .build_data_utils import impute_2025_population
7- from housing_data .data_loading_helpers import get_url_text
87
98DIVISIONS = {
109 "New England" : [
@@ -75,10 +74,7 @@ def _line_to_cols(row: str) -> list[str]:
7574
7675
7776def get_state_populations_1980s (data_path : Path ) -> pd .DataFrame :
78- states_80s_text = get_url_text (
79- "https://www2.census.gov/programs-surveys/popest/tables/1980-1990/state/asrh/st8090ts.txt" ,
80- data_path ,
81- )
77+ states_80s_text = (data_path / "st8090ts.txt" ).read_text ()
8278 handle = StringIO (states_80s_text )
8379
8480 for _ in range (10 ):
You can’t perform that action at this time.
0 commit comments