diff --git a/src/covid19/blueprints/owid/owid_model.py b/src/covid19/blueprints/owid/owid_model.py index b8e18c6e5606e0689449edf6cd88352424c952b8..591028bc73d48e650dfd6bf9269375f1dbc69869 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 66f06de3b1757a236be0232dbdd694405eff617d..2201e96322e68e45998b535667f97aed279ddabb 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 5542272c318458a0308eba75e5ce56975bd70b7d..516a86a2ea389e4d0818e9f7b9ae90198990566b 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 bf12136f15ff5e23a03696be855cf1676ffef437..be6613db0b10dffcf74e2b4d7c027a30f58250a7 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 51a05fe9ec97cc6a3ecdeadb5fb1f47d8fa2449e..da2849a74b0744f18793fbf0ebbbd90d64068382 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 5162b7c1100292910a355521c33d92a0aebd668c..f4b976a292a97638ce809d879989026b984c1e5b 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 693ab18daae9b6b5f71b0f7cf147125814a29167..73f2ed3529e7d1ab0ec4fef6960af9d9de202a77 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 347f2e5bae7573845c192d40d74f91c95a55d32b..ee244e6a17f8f099ed9e9d54c84a84a23bd0b270 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 fed302720efc142bd880383cb7bec5976a7df924..0dec37019161a87a9aa8ef742457a6fab6a2bfb1 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 bab918b75250102ba20769adea111a7809918c27..148ac80ae0648c2a26ac4348777ce4e9a260e87b 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