From f66e3cae763b2e5f4f6471526d01b8f6aac9a515 Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Mon, 18 Jan 2021 15:09:40 +0100 Subject: [PATCH] ### 0.0.8 Release * Issue #13 /who/imported/ * Issue #14 /europe/imported/ * Issue #3 ORM: 3NF for ecdc_europa_data_import * Issue #4 data update for 3NF ecdc_europa_data_import --- org/woehlke/covid19/europe/europe_model.py | 10 ++++------ org/woehlke/covid19/europe/europe_service_import.py | 8 ++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/org/woehlke/covid19/europe/europe_model.py b/org/woehlke/covid19/europe/europe_model.py index 5ac2a4a3..ffc93156 100644 --- a/org/woehlke/covid19/europe/europe_model.py +++ b/org/woehlke/covid19/europe/europe_model.py @@ -6,17 +6,15 @@ class EuropeDataImportTable(db.Model): id = db.Column(db.Integer, primary_key=True) date_rep = db.Column(db.String(255), nullable=False) - day = db.Column(db.String(255), nullable=False) - month = db.Column(db.String(255), nullable=False) - year = db.Column(db.String(255), nullable=False) - cases = db.Column(db.String(255), nullable=False) - deaths = db.Column(db.String(255), nullable=False) + year_week = db.Column(db.String(255), nullable=False) + cases_weekly = db.Column(db.String(255), nullable=False) + deaths_weekly = db.Column(db.String(255), nullable=False) pop_data_2019 = db.Column(db.String(255), nullable=False) countries_and_territories = db.Column(db.String(255), nullable=False) geo_id = db.Column(db.String(255), nullable=False) country_territory_code = db.Column(db.String(255), nullable=False) continent_exp = db.Column(db.String(255), nullable=False) - cumulative_number_for_14_days_of_covid19_cases_per_100000 = db.Column(db.String(255), nullable=False) + notification_rate_per_100000_population_14days = db.Column(db.String(255), nullable=False) @classmethod def remove_all(cls): diff --git a/org/woehlke/covid19/europe/europe_service_import.py b/org/woehlke/covid19/europe/europe_service_import.py index d52aaf7b..d742d824 100644 --- a/org/woehlke/covid19/europe/europe_service_import.py +++ b/org/woehlke/covid19/europe/europe_service_import.py @@ -35,15 +35,15 @@ class EuropeServiceImport: for row in file_reader: o = EuropeDataImportTable( date_rep=row['dateRep'], - year=row['year_week'], - cases=row['cases_weekly'], - deaths=row['deaths_weekly'], + year_week=row['year_week'], + cases_weekly=row['cases_weekly'], + deaths_weekly=row['deaths_weekly'], countries_and_territories=row['countriesAndTerritories'], geo_id=row['geoId'], country_territory_code=row['countryterritoryCode'], pop_data_2019=row['popData2019'], continent_exp=row['continentExp'], - cumulative_number_for_14_days_of_covid19_cases_per_100000 + notification_rate_per_100000_population_14days =row['notification_rate_per_100000_population_14-days'] ) db.session.add(o) -- GitLab