In this assignment, our goal is to analyze COVID-19 data provided by European Centre for Disease Prevention and Control.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In this assignment, our goal is to analyze COVID-19 data provided by European Centre for Disease Prevention and Control.

Post by answerhappygod »

In This Assignment Our Goal Is To Analyze Covid 19 Data Provided By European Centre For Disease Prevention And Control 1
In This Assignment Our Goal Is To Analyze Covid 19 Data Provided By European Centre For Disease Prevention And Control 1 (188.22 KiB) Viewed 25 times
In This Assignment Our Goal Is To Analyze Covid 19 Data Provided By European Centre For Disease Prevention And Control 2
In This Assignment Our Goal Is To Analyze Covid 19 Data Provided By European Centre For Disease Prevention And Control 2 (241.59 KiB) Viewed 25 times
In this assignment, our goal is to analyze COVID-19 data provided by European Centre for Disease Prevention and Control. We will use data containing 30 countries' populations (as well as the age groups), daily/weekly cases (together with age groups), and daily deaths. We will practice file reading, parsing, sorting data, and object-oriented programming. In the end, we will be able to calculate (per country): Cases/deaths per 1M, • Exposure per age group, and the most/least infected age groups. . Probability of belonging a new case to an age group, The distribution Ideaths according to age groups Finally, we will report extreme cases according to these statistics. Q1) Reading a File and Storing Data (30 pts) You can access the COVID-19 data using [this link] (https://www.ecdc.europa.eu/en/publicati ... ea-country). We will be working on these two datasets: • (data.json) The daily number of new reported COVID-19 cases and deaths by EU/EEA country: The data file contains information on newly reported COVID-19 cases and deaths in EU/EEA countries. Each entry contains the corresponding data for a certain day per country. You can also look at [this document] (https://www.ecdc.europa.eu/sites/defaul ... orting.pdf) to get more information. • (agecases.json) 14-day age-specific notification rate of new COVID-19 cases: It contains information on the 14-day notification rate of newly reported COVID-19 cases per 100,000 population by age group, week and country. Each entry contains the corresponding data for a certain week and a country. You can also look at this document to get more information.

Go to init function f Covid19Analyzer under at covid_db.py file. Our first goal is to read a json file and convert it to some data structure that can be used within Python. list of records. . Using a with open statement, read and load the data.json file using json.load() function. This loader retums you a nested lists of dicts under the records key. After that, you have • Iterate over the list of records. Each record corresponds to a dictionary, which includes the following information: { "dateRep" "15/05/2021", "day": "15", "month": "85", "year": "2021", "cases": 721, "deaths" 14, "countriesAndTerritories": "Austria", "geoId" : "AT", "countryterritoryCode" : "AUT", "popData2020": "8901064", "continent Exp": "Europe" Refer to the documentation that we linked before for the definitions of the keys and the values. • Inorder to store and process this data, we're going to use the power of object-oriented programming. In Covid19Analyzer class, there is an empty dictionary object called self.db. While iterating over the records, you must create a Country object with the parameters name (the full name of the country) and the population (int) if it doesn't exist and save it to the dictionary self.db with the key geoID as the representative of a unique country code. This way, we can access each country through our database dictionary. • We're going to save each record to a relevant Country object by using save_daily_data(), which takes three arguments: date (string), cases (int), and deaths (int) and appends the data to daily_records list as a dictionary. Here, we are going to process the data from March 7, 2021 to May 3, 2021 (both are not included.) • You can create specific dates by using datetime library of python. Adding, subtracting and comparing dates with standard operators are valid. This is called operator overloading in programming languages. To build a datetime object, you should decompose the string in a record given by dateRep key to days, month, and year. Hint: You can check strptime function.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply