mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-27 17:31:17 -07:00
ACS data baked in for map (#153)
* starting etl for score * projection fix * projection flags * proper ejscreen etl csv generation * failing CSV merge -- investigating * checkpoint * some etl changes * completed ticket * small typo
This commit is contained in:
parent
eed9bd311d
commit
78615e9b1a
11 changed files with 321 additions and 356 deletions
20
score/scripts/utils.py
Normal file
20
score/scripts/utils.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# common usage functions
|
||||
import csv
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get_state_fips_codes():
|
||||
data_path = Path.cwd() / "data"
|
||||
fips_csv_path = data_path / "fips_states_2010.csv"
|
||||
fips_state_list = []
|
||||
with open(fips_csv_path) as csv_file:
|
||||
csv_reader = csv.reader(csv_file, delimiter=",")
|
||||
line_count = 0
|
||||
|
||||
for row in csv_reader:
|
||||
if line_count == 0:
|
||||
line_count += 1
|
||||
else:
|
||||
fips = row[0].strip()
|
||||
fips_state_list.append(fips)
|
||||
return fips_state_list
|
Loading…
Add table
Add a link
Reference in a new issue