Skip to content

Commit

Permalink
set defaults to single year, limited counties to temporarily have scr…
Browse files Browse the repository at this point in the history
…ipt finish in <1 for autorefresh test
  • Loading branch information
ajaits committed Dec 5, 2023
1 parent eb2bb75 commit 4f62013
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/us_usda/quickstats/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@
flags.DEFINE_string(_USDA_API_KEY, None, 'USDA quickstats API key.')
flags.DEFINE_integer(
'start_year',
os.getenv('start_year', 2000),
'Year from whihc data is processed.',
os.getenv('start_year', datetime.now().year),
'Year from which data is processed.',
)
flags.DEFINE_integer(
'num_counties',
os.getenv('num_counties', 5000),
os.getenv('num_counties', 100),
'number of counties for which data is processed.',
)
flags.DEFINE_string(
'output_dir',
'output',
'Output firectory for generated files.')


def process_survey_data(year, svs, out_dir):
Expand Down Expand Up @@ -295,7 +299,7 @@ def get_multiple_years():
start = datetime.now()
print('Start', start)

out_dir = 'output'
out_dir = _FLAGS.output_dir
svs = load_svs()
years = range(_FLAGS.start_year, datetime.now().year + 1)
for year in years:
Expand Down

0 comments on commit 4f62013

Please sign in to comment.