def run_county(version: data_version.DataVersion, output, state=None): """Run county level model.""" min_date = datetime.datetime(2020, 3, 7) max_date = datetime.datetime(2020, 7, 6) run.run_county_level_forecast(min_date, max_date, output, country="USA", state=state) if not state: version.write_file("county", output) else: _logger.info("Skip version file because this is not a full run")
def run_county(state=None, deploy=False): """Run county level model.""" min_date = datetime.datetime(2020, 3, 7) max_date = datetime.datetime(2020, 7, 6) output_dir = build_params.OUTPUT_DIR if deploy: output_dir = WEB_DEPLOY_PATH run.run_county_level_forecast(min_date, max_date, country="USA", state=state, output_dir=output_dir) run.build_county_summary(min_date, state=state, output_dir=output_dir)
def run_county(version: data_version.DataVersion, state=None, deploy=False, summary_only=False): """Run county level model.""" min_date = datetime.datetime(2020, 3, 7) max_date = datetime.datetime(2020, 7, 6) output_dir = build_params.OUTPUT_DIR if deploy: output_dir = WEB_DEPLOY_PATH if not summary_only: run.run_county_level_forecast(min_date, max_date, country="USA", state=state, output_dir=output_dir) run.build_county_summary(min_date, state=state, output_dir=output_dir) # only write the version if we saved everything if not state and not summary_only: version.write_file('counties', output_dir) else: _logger.info('Skip version file because this is not a full run')