mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 01:54:18 -08:00
* 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
20 lines
553 B
Python
20 lines
553 B
Python
# 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
|