0% found this document useful (0 votes)
8 views

assignment 8_

Uploaded by

knights09876543
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

assignment 8_

Uploaded by

knights09876543
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

assignment 8:

Assignment: Data Visualization of COVID-19 Dataset


Overview:
Building upon the previous assignment where you performed data cleaning and basic analysis
on the COVID-19 dataset, your task now is to create insightful visualizations using Matplotlib
and build an interactive dashboard using Streamlit.

Requirements:
Data Visualization with Matplotlib:

Create various plots to visualize the cleaned COVID-19 data.


Visualizations should include:
Total confirmed cases, deaths, and recovered cases over time.
Top 10 countries/states with the highest number of cases.
Daily new cases and growth rates.
Save the plots as images.
Interactive Dashboard with Streamlit:

Build an interactive dashboard to display your visualizations.


Allow users to filter data by date range, countries/states, and case types (confirmed, deaths,
recovered).
Include widgets such as sliders, dropdowns, and date pickers for user interaction.
File Handling:

Ensure the cleaned data is loaded from clean_covid_data.csv.


Save and load visualization configurations if needed.
User-Defined Exceptions:

Use the previously defined exceptions (DataCleaningError) to handle any issues during the
visualization process (e.g., missing data columns).
Documentation:

Update the documentation to include steps for data visualization and dashboard creation.
Provide instructions on how to run the Streamlit app and interpret the visualizations.
Tasks:

Data Visualization Module (visualization.py):


Import necessary libraries: pandas, numpy, matplotlib.pyplot.
Load the cleaned dataset (clean_covid_data.csv).
Implement functions to create the required plots:
plot_total_cases(df): Plot total confirmed, deaths, and recovered cases over country.
plot_top_countries(df): Plot top 10 countries/states with the highest number of cases.
plot_daily_cases(df): Plot daily new cases and growth rates.
Save the plots as images (e.g., total_cases.png, top_countries.png, daily_cases.png).
Streamlit Dashboard (dashboard.py):

Import necessary libraries: streamlit, pandas, matplotlib.pyplot.


Load the cleaned dataset (clean_covid_data.csv).

Create Streamlit widgets for user interaction:


Date range picker for selecting the death range.
Dropdown for selecting countries/states.
Dropdown for selecting case types (confirmed, deaths, recovered).
Display the plots interactively based on user selections.
Implement functions to update plots based on user input.

File Handling Module (file_handling.py):


Ensure functions to read from and write to CSV files are in place.
Optionally, implement functions to save and load visualization configurations.

User-Defined Exceptions (exceptions.py):


Ensure DataCleaningError and other relevant exceptions are used appropriately during the
visualization process.
Main Analysis Script (analysis.py):

Ensure integration of data cleaning, visualization, and exception handling.


Provide a command-line interface to run data cleaning, create visualizations, and start the
Streamlit dashboard.
Documentation (README.md):

Explain the dataset used and its relevance.


Provide instructions on how to run the code and the Streamlit app.
Document the steps taken for data visualization and dashboard creation.
Include examples of code snippets demonstrating exception handling.
Submission:
Submit the following files:

data_cleaning.py
file_handling.py
exceptions.py
visualization.py
dashboard.py
analysis.py
clean_covid_data.csv (after cleaning)
README.md (documentation)
Saved plot images (e.g., total_cases.png, top_countries.png, daily_cases.png)

You might also like