Hi, this notebook page was written to analyse the 2019-2020 pandemic outbreak in Europe of the SARS-CoV-2 virus.
It was written to:
The disease COVID-19 is caused by the virus SARS-CoV-2 (Severe Accute Respiratory Syndrome 2).
This notebook served me to practice some older skills and eventually reach out to an interested audience.
In case you have a suggestion on how to improve the usefulness of the notebook, I will be thankful ( nuno.aja@gmail.com ).
Kind regards, The author.
NOTICE: ongoing work
In this section we focus on getting the current datasets, process and load them.
For convenience and security we implemented the adequate code to present the data.
import modules_loader
from modules.analytics.sars_cov2_2019_20 import analytics
analysis = analytics.scenario()
available_countries = analysis.download_source_datafiles(force = True)
target_cases = analysis.process_dataset(available_countries)
We now select countries by active cases number and plot the resulting data on a bar chart.
Our function plots the data automatically whilst saving the chart as well.
An equivalent code would be the following:
top_20_countries_active_cases = analysis.statistics_by_country.sort_values(by='Active', ascending=False).head(20)
top_20_countries_active_cases.iplot(kind='bar', subplots=False, title='The (20) countries with most active cases');
top_20_countries_active_cases = analysis.show_top_cases(20, feature = 'Active')
Following with the data for these selected countries.
display(analysis.statistics_by_province.loc[list(top_20_countries_active_cases.index)].sort_values(by='Active', ascending=False))
We now plot the data for some countries using a composition of features.
analysis.display_locations(countries = [ 'Italy', 'Portugal', 'Spain', 'US' ],
fill = False,
logy = False)
Now we present the interactive maps where you can select the region/subregion of the cases for more details.
analysis.display_sunburst_chart(label = 'Active')
analysis.display_sunburst_chart(label = 'Recovered')
analysis.display_sunburst_chart(label = 'Deaths')
We now execute some queries to our dataset for countries with most recoveries and over 2k infections with additional locations.
interesting_locations = {
('United Kingdom', ''),
('Brazil', ''),
}
analysis.display_locations(
locations = interesting_locations,
query='Infected > 50000000 & Active < Recovered & Deaths > 200000',
provinces = False
)
Now we present the additional charts of the cases around the world.
analysis.display_locations(countries = 'Netherlands', logy=False, provinces = True)
Now we present the animation of the cases around the world since January of 2020. Presented on https://blog.njaniceto.com/demos/geographic-evolution-2019-20-pandemic/.
# Generate an animated geographic map
#analysis.display_geomap()
Nuno André Jeremias de Aniceto is a Technology Consultant with experience in Software Engineering; Software Architecture and DevOps.
Holds a Master degree in Computer Science Engineering with focus on Computer Vision; Big Data; Multimedia and 3D Simulations.
Has specializations on Deep Learning and on Data Engineering on Google Cloud Platform.
The datasets are compiled by the Johns Hopkins University and the datasources themselves may present some issues (such as Canada province "Recovered").
As of 2020-03-28 the datasources are: