All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.
All our activities include solutions with explanations on how they work and why we chose them.
In this activity, you will create a line chart to analyze the trend of new COVID-19 cases in Denmark over time. The x-axis will represent the Date_reported
, and the y-axis will display the number of new cases. The goal is to visualize how the number of cases fluctuated throughout the reported period in the dataset.
Figure size : 10 by 6
Title : New COVID-19 Cases in Denmark
x-axis label: Date
y-axis label: New Cases
Line label: "New Cases"
In this activity, you will create a pie chart using the region_counts
series to display the distribution of countries across different WHO regions from the dataset. Use the following parameters to format your chart:
Figure size: 8 x 8
Title: WHO Regions Distribution
Percentage display (autopct): %1.1f%%
Finally, apply .tight_layout()
and display the plot.
Plot a histogram to visualize the distribution of cumulative deaths using the Cumulative_deaths
column. Use the following parameters to format your histogram:
Figure size : 10 by 6
Title: Distribution of Cumulative Deaths
x-axis label: Cumulative Deaths
y-axis label: Frequency
Color: Red
Bins : 10
Apply .tight_layout()
and display the plot.
Redo the line plot of new COVID-19 cases in Denmark from the previous section using the series monthly_cases
with the following customizations:
Figure size : 10 by 6
Line color: Green
Line style: --
Line width: 3
Title: New COVID-19 Cases in Denmark
(Use font size 16 and set the font weight to bold)
x-axis : Date
(Use font size 12)
y-axis labels: New Cases
(Use font size 12)
x-axis rotation: Set the rotation of the x-axis labels to 45 degrees
Apply .tight_layout()
and display your plot.
In this task, you will create a pie chart to visualize the distribution of WHO regions, with a special emphasis on the EURO region by exploding its slice by a fraction of 0.1. Use the region_counts
series and apply the following customizations:
%1.1f%%
Additional settings:
.tight_layout()
for proper formatting and display the plotIn this task, you will create a histogram to visualize the distribution of cumulative deaths, with customized bin size and formatting. Follow the steps below:
Figure size : 12 by 7
Bins: Divide the data into 15 bins
Bar color: Red, with black outlines
Transparency: Set alpha to 0.7 for the bars
Title: "Distribution of Cumulative Deaths" (Font size: 18, Font weight: bold, Color: dark blue)
x-axis label: "Cumulative Deaths" (Font size: 14, Color: purple)
y-axis label: "Frequency" (Font size: 14, Color: green)
Grid: Add dashed lines (--) with linewidth=0.6 and alpha=0.8
Tick customization:
Finally, use .tight_layout()
to ensure proper formatting and display the plot.
In this activity, you'll use the Series daily_cases
to create a pie chart, despite it being an inappropriate choice for this data type. The goal is to highlight the limitations of using a pie chart for time series data like daily COVID-19 cases. Use the following parameters to plot the chart:
Figure size : 8 by 8
Start angle: 90 degrees
Percentage display (autopct): %1.1f%%
Title: "New COVID-19 Cases Over Time"
Apply .tight_layout()
and display the plot.
Using the region_cases
Series, which records the number of new COVID-19 cases in each WHO (World Health Organization) region, construct a bar chart to present this data visually.
Figure size: 8 x 6
Title: New COVID-19 Cases by WHO Region
y-axis label: New Cases
Apply .tight_layout()
and display the plot.
In this activity, you will generate a scatter plot to visualize the cumulative COVID-19 cases for countries within the EMRO region using the DataFrame case
.
Figure size: 10 x 6
x-axis : Country, fontsize=12
y-axis : Cumulative Cases, fontsize=12
Color : green
Title: Cumulative Cases in EMRO (Incorrect - Scatter Plot), fontsize = 16
Rotate the x-axis labels by 45 degrees for better readability and use .tight_layout()
to display the plot
In this activity, you will create a line plot to visualize both new COVID-19 cases and new deaths. You will work with the df_grouped
DataFrame, which aggregates the daily new cases and deaths. . Follow the parameters outlined below:
Figure Size: 10 x 6
New cases
New Deaths
Legend
Title - Text: "New COVID-19 Cases and Deaths Over Time (7-Day Rolling Average)" - Font Size: 16
Finally, apply .tight_layout()
and display the plot.
In this activity, you will create a visually engaging scatter plot to represent the trend of new COVID-19 cases over time, utilizing a colormap for better insight into the data. Use the scatter function to plot Date_reported
on the x-axis and New_cases
on the y-axis with the following parameters:
Figure size : 10 by 6
cmap : viridis
size : Set the size of the scatter points to 50.
alpha : 0.8 for slight transparency.
Colorbar Addition:
Include a colorbar to provide a reference for the color mapping, labeling it as "Number of New Cases" to clarify the representation of color intensity.
Title : "Scatter Plot of New COVID-19 Cases" with a font size of 16 to ensure visibility.
Label the x-axis as "Date Reported" and the y-axis as "New Cases," both with a font size of 12 for clarity.
Rotate the x-axis ticks by 45 degrees to improve readability of date labels, and use .tight_layout()
to ensure all elements are displayed without overlap.