Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set command line default to small import temporarily #937

Merged
merged 3 commits into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions scripts/us_usda/quickstats/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,17 @@
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 +298,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
Loading