From 13405b5596fa5bdbb5c757a35dcbeb46727b659d Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Sat, 8 May 2021 22:49:00 +0200 Subject: [PATCH] working on: 0.0.34 Release --- src/covid19/blueprints/owid/owid_model.py | 2 +- .../blueprints/owid/owid_service_import.py | 2 +- .../owid/country/owid_country_all.html | 2 +- .../owid/country/owid_country_all_table.html | 4 +- .../country/owid_country_one_germany.html | 2 +- .../owid_date_reported_all_table.html | 4 +- .../date_reported/owid_date_reported_one.html | 2 +- .../owid/imported/owid_imported.html | 2 +- .../owid/imported/owid_imported_table.html | 116 +++++++++--------- .../owid/owid_data/owid_data_table.html | 4 +- 10 files changed, 74 insertions(+), 66 deletions(-) diff --git a/src/covid19/blueprints/owid/owid_model.py b/src/covid19/blueprints/owid/owid_model.py index b8e18c6e..591028bc 100644 --- a/src/covid19/blueprints/owid/owid_model.py +++ b/src/covid19/blueprints/owid/owid_model.py @@ -68,7 +68,7 @@ class OwidDateReported(ApplicationDateReported): return db.session.query(cls).filter(cls.processed == False).all() @classmethod - def create_new_object_factory(cls, my_date_rep): + def create_new_object_factory(cls, my_date_rep: str): my_datum = date.fromisoformat(my_date_rep) (my_iso_year, week_number, weekday) = my_datum.isocalendar() my_year_week = "" + str(my_iso_year) diff --git a/src/covid19/blueprints/owid/owid_service_import.py b/src/covid19/blueprints/owid/owid_service_import.py index 66f06de3..2201e963 100644 --- a/src/covid19/blueprints/owid/owid_service_import.py +++ b/src/covid19/blueprints/owid/owid_service_import.py @@ -28,7 +28,7 @@ class OwidServiceImport: file_reader = csv.DictReader(csv_file, delimiter=',', quotechar='"') k = 0 for row in file_reader: - date_reported = row['date'], + date_reported = row['date'] d = OwidDateReported.create_new_object_factory(my_date_rep=date_reported) o = OwidImport( iso_code=row['iso_code'], diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_country_all.html b/src/covid19/blueprints/owid/templates/owid/country/owid_country_all.html index 5542272c..516a86a2 100644 --- a/src/covid19/blueprints/owid/templates/owid/country/owid_country_all.html +++ b/src/covid19/blueprints/owid/templates/owid/country/owid_country_all.html @@ -4,7 +4,7 @@ {{super()}} {% include 'owid/navigation/owid_navtabs.html' %} - <div class="container-fluid"> + <div class="container"> <div class="row"> <div class="col"> {% include 'owid/country/owid_country_all_pagination.html' %} diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html b/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html index bf12136f..be6613db 100644 --- a/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html +++ b/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html @@ -1,3 +1,4 @@ + <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead class="table-secondary"> <tr> @@ -57,4 +58,5 @@ </tr> {% endfor %} </tbody> - </table> \ No newline at end of file + </table> + </div> \ No newline at end of file diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html b/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html index 51a05fe9..da2849a7 100644 --- a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html +++ b/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html @@ -4,7 +4,7 @@ {{super()}} {% include 'owid/navigation/owid_navtabs.html' %} - <div class="container-fluid"> + <div class="container"> <div class="row"> <div class="col"> {% include 'owid/country/owid_country_one_pagination.html' %} diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html index 5162b7c1..f4b976a2 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html @@ -1,3 +1,4 @@ + <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead class="table-secondary"> <tr> @@ -35,4 +36,5 @@ <th scope="col" class="text-left">year</th> </tr> </tfoot> - </table> \ No newline at end of file + </table> + </div> \ No newline at end of file diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html index 693ab18d..73f2ed35 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html @@ -4,7 +4,7 @@ {{super()}} {% include 'owid/navigation/owid_navtabs.html' %} - <div class="container-fluid"> + <div class="container"> <div class="row"> <div class="col"> {% include 'owid/date_reported/owid_date_reported_one_pagination.html' %} diff --git a/src/covid19/blueprints/owid/templates/owid/imported/owid_imported.html b/src/covid19/blueprints/owid/templates/owid/imported/owid_imported.html index 347f2e5b..ee244e6a 100644 --- a/src/covid19/blueprints/owid/templates/owid/imported/owid_imported.html +++ b/src/covid19/blueprints/owid/templates/owid/imported/owid_imported.html @@ -4,7 +4,7 @@ {{super()}} {% include 'owid/navigation/owid_navtabs.html' %} - <div class="container-fluid"> + <div class="container"> <div class="row"> <div class="col"> {% include 'owid/imported/owid_imported_pagination.html' %} diff --git a/src/covid19/blueprints/owid/templates/owid/imported/owid_imported_table.html b/src/covid19/blueprints/owid/templates/owid/imported/owid_imported_table.html index fed30272..0dec3701 100644 --- a/src/covid19/blueprints/owid/templates/owid/imported/owid_imported_table.html +++ b/src/covid19/blueprints/owid/templates/owid/imported/owid_imported_table.html @@ -1,72 +1,73 @@ + <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead> <tr> - <th scope="col">iso_code</th> <th scope="col">continent</th> + <th scope="col">iso code</th> <th scope="col">location</th> <th scope="col">date</th> - <th scope="col">total_cases</th> - <th scope="col">new_cases</th> - <th scope="col">new_cases_smoothed</th> - <th scope="col">total_deaths</th> - <th scope="col">new_deaths</th> - <th scope="col">new_deaths_smoothed</th> - <th scope="col">total_cases_per_million</th> - <th scope="col">new_cases_per_million</th> - <th scope="col">new_cases_smoothed_per_million</th> - <th scope="col">total_deaths_per_million</th> - <th scope="col">new_deaths_per_million</th> - <th scope="col">new_deaths_smoothed_per_million</th> - <th scope="col">reproduction_rate</th> - <th scope="col">icu_patients</th> - <th scope="col">icu_patients_per_million</th> - <th scope="col">hosp_patients</th> - <th scope="col">hosp_patients_per_million</th> - <th scope="col">weekly_icu_admissions</th> - <th scope="col">weekly_icu_admissions_per_million</th> - <th scope="col">weekly_hosp_admissions</th> - <th scope="col">weekly_hosp_admissions_per_million</th> - <th scope="col">new_tests</th> - <th scope="col">total_tests</th> - <th scope="col">total_tests_per_thousand</th> - <th scope="col">new_tests_per_thousand</th> - <th scope="col">new_tests_smoothed</th> - <th scope="col">new_tests_smoothed_per_thousand</th> - <th scope="col">positive_rate</th> - <th scope="col">tests_per_case</th> - <th scope="col">tests_units</th> - <th scope="col">total_vaccinations</th> - <th scope="col">people_vaccinated</th> - <th scope="col">people_fully_vaccinated</th> - <th scope="col">new_vaccinations</th> - <th scope="col">new_vaccinations_smoothed</th> - <th scope="col">total_vaccinations_per_hundred</th> - <th scope="col">people_vaccinated_per_hundred</th> - <th scope="col">people_fully_vaccinated_per_hundred</th> - <th scope="col">new_vaccinations_smoothed_per_million</th> - <th scope="col">stringency_index</th> + <th scope="col">total cases</th> + <th scope="col">new cases</th> + <th scope="col">new cases smoothed</th> + <th scope="col">total deaths</th> + <th scope="col">new deaths</th> + <th scope="col">new deaths smoothed</th> + <th scope="col">total cases per million</th> + <th scope="col">new cases per million</th> + <th scope="col">new cases smoothed per million</th> + <th scope="col">total deaths per million</th> + <th scope="col">new_deaths per million</th> + <th scope="col">new deaths smoothed per million</th> + <th scope="col">reproduction rate</th> + <th scope="col">icu patients</th> + <th scope="col">icu patients per million</th> + <th scope="col">hosp patients</th> + <th scope="col">hosp patients per million</th> + <th scope="col">weekly icu admissions</th> + <th scope="col">weekly icu admissions per million</th> + <th scope="col">weekly hosp admissions</th> + <th scope="col">weekly hosp admissions per million</th> + <th scope="col">new tests</th> + <th scope="col">total tests</th> + <th scope="col">total tests per thousand</th> + <th scope="col">new tests per thousand</th> + <th scope="col">new tests smoothed</th> + <th scope="col">new tests smoothed per thousand</th> + <th scope="col">positive rate</th> + <th scope="col">tests per case</th> + <th scope="col">tests units</th> + <th scope="col">total vaccinations</th> + <th scope="col">people vaccinated</th> + <th scope="col">people fully vaccinated</th> + <th scope="col">new vaccinations</th> + <th scope="col">new vaccinations smoothed</th> + <th scope="col">total vaccinations per hundred</th> + <th scope="col">people vaccinated per hundred</th> + <th scope="col">people fully vaccinated per hundred</th> + <th scope="col">new vaccinations smoothed per million</th> + <th scope="col">stringency index</th> <th scope="col">population</th> - <th scope="col">population_density</th> - <th scope="col">median_age</th> - <th scope="col">aged_65_older</th> - <th scope="col">aged_70_older</th> - <th scope="col">gdp_per_capita</th> - <th scope="col">extreme_poverty</th> - <th scope="col">cardiovasc_death_rate</th> - <th scope="col">diabetes_prevalence</th> - <th scope="col">female_smokers</th> - <th scope="col">male_smokers</th> - <th scope="col">handwashing_facilities</th> - <th scope="col">hospital_beds_per_thousand</th> - <th scope="col">life_expectancy</th> - <th scope="col">human_development_index</th> + <th scope="col">population density</th> + <th scope="col">median age</th> + <th scope="col">aged 65 older</th> + <th scope="col">aged 70 older</th> + <th scope="col">gdp per capita</th> + <th scope="col">extreme poverty</th> + <th scope="col">cardiovasc death rate</th> + <th scope="col">diabetes prevalence</th> + <th scope="col">female smokers</th> + <th scope="col">male smokers</th> + <th scope="col">handwashing facilities</th> + <th scope="col">hospital beds per thousand</th> + <th scope="col">life expectancy</th> + <th scope="col">human development index</th> </tr> </thead> <tbody> {% for owid_import in page_data.items %} <tr> - <td>{{ owid_import.iso_code }}</td> <td>{{ owid_import.continent }}</td> + <td>{{ owid_import.iso_code }}</td> <td>{{ owid_import.location }}</td> <td>{{ owid_import.date }}</td> <td>{{ owid_import.total_cases }}</td> @@ -127,4 +128,5 @@ </tr> {% endfor %} </tbody> - </table> \ No newline at end of file + </table> + </div> \ No newline at end of file diff --git a/src/covid19/blueprints/owid/templates/owid/owid_data/owid_data_table.html b/src/covid19/blueprints/owid/templates/owid/owid_data/owid_data_table.html index bab918b7..148ac80a 100644 --- a/src/covid19/blueprints/owid/templates/owid/owid_data/owid_data_table.html +++ b/src/covid19/blueprints/owid/templates/owid/owid_data/owid_data_table.html @@ -1,3 +1,4 @@ + <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead class="table-secondary"> <tr> @@ -203,4 +204,5 @@ </tr> {% endfor %} </tbody> - </table> \ No newline at end of file + </table> + </div> \ No newline at end of file -- GitLab