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

Create cases json fails if growth metric days is set to 3 #17

Open
mattparrilla opened this issue Apr 3, 2020 · 0 comments
Open

Create cases json fails if growth metric days is set to 3 #17

mattparrilla opened this issue Apr 3, 2020 · 0 comments

Comments

@mattparrilla
Copy link
Owner

Works when default is used:

(venv) matt@matt ~/git/chartingcovid [new-cases]$ python create_covid_json.py --growth_metric_days 3
Traceback (most recent call last):
  File "create_covid_json.py", line 423, in <module>
    args.growth_metric_days, args.output_fips_first)
  File "create_covid_json.py", line 397, in generate_json
    county_csv, state_data, growth_metric_days, output_fips_first)
  File "create_covid_json.py", line 383, in generate_covid_data
    growth_metric_days, latest_date, total_days_of_data)
  File "create_covid_json.py", line 227, in record_growth_metrics
    doubling_time = get_averaged_doubling_time(preceding_case_counts)
  File "create_covid_json.py", line 106, in get_averaged_doubling_time
    return mean([get_doubling_time(r) for r in growth_rates])
  File "/usr/lib/python3.6/statistics.py", line 311, in mean
    raise StatisticsError('mean requires at least one data point')
statistics.StatisticsError: mean requires at least one data point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant