Beispiel #1
0
#####

# get today's date
yesterdays_date_str = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')
print(f'Yesterday: {yesterdays_date_str}')

covid.n_bootstraps = None
covid.n_likelihood_samples = None
covid.moving_window_size = 21  # three weeks
covid.override_max_date_str = yesterdays_date_str
covid.opt_force_calc = False
covid.opt_force_plot = False
covid.opt_simplified = True  # set to True to just do statsmodels as a simplified daily service
covid.override_run_states = None # ['Spain', 'Iceland']#covid.load_data.current_cases_ranked_non_us_states[:50] # if you want to do countries instead

region_plot_subfolders = covid.run_everything()
print('region_plot_subfolders:')
print(region_plot_subfolders)

#####
# Step 3: Upload Figures to AWS
#####

# Or... 
# run in bash...
# TODO: get this part working using these fast CLIs rather than boto3 as below
# HYP_STR=2020_05_28_date_smoothed_moving_window_21_days_countries_region_statsmodels; aws s3 cp --recursive state_plots/$HYP_STR s3://covid-figures/$HYP_STR/
# HYP_STR=2020_05_28_date_smoothed_moving_window_21_days_US_states_region_statsmodels; aws s3 cp --recursive state_plots/$HYP_STR s3://covid-figures/$HYP_STR/
# HYP_STR=2020_05_28_date_smoothed_moving_window_21_days_US_counties_region_statsmodels; aws s3 cp --recursive state_plots/$HYP_STR s3://covid-figures/$HYP_STR/
# HYP_STR=2020_05_28_date_smoothed_moving_window_21_days_countries_region_statsmodels; aws s3 cp --recursive state_plots/$HYP_STR s3://covid-figures/$HYP_STR/
import covid_moving_window as covid

covid.n_bootstraps = 100
covid.n_likelihood_samples = 10000
covid.moving_window_size = 21  # three weeks
covid.max_date_str = '2020-05-16'
covid.opt_force_calc = False
covid.opt_force_plot = False
covid.opt_simplified = False  # set to True to just do statsmodels as a simplified daily service
covid.override_run_states = None

covid.run_everything()