Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
n-h-diaz committed Nov 16, 2023
1 parent d8a50c3 commit 247b451
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/us_hud/income/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from absl import flags

FLAGS = flags.FLAGS
flags.DEFINE_string('output_dir', 'csv', 'Path to write cleaned CSVs.')
flags.DEFINE_string('income_output_dir', 'csv', 'Path to write cleaned CSVs.')

URL_PREFIX = 'https://www.huduser.gov/portal/datasets/il/il'

Expand Down Expand Up @@ -120,12 +120,12 @@ def main(argv):
with open('match_bq.csv') as f:
reader = csv.DictReader(f)
matches = {'dcs:' + row['fips']: 'dcs:' + row['city'] for row in reader}
if not os.path.exists(FLAGS.output_dir):
os.makedirs(FLAGS.output_dir)
if not os.path.exists(FLAGS.income_output_dir):
os.makedirs(FLAGS.income_output_dir)
today = datetime.date.today()
for year in range(2006, today.year):
print(year)
process(year, matches, FLAGS.output_dir)
process(year, matches, FLAGS.income_output_dir)


if __name__ == '__main__':
Expand Down

0 comments on commit 247b451

Please sign in to comment.