Plotly graphs about SARS-CoV-2 vaccination campaign in Catalunya using Python.

In this examples we will see a series of graphs using the plotly package. The plotly Python package exists to create, manipulate and render graphical figures (i.e. charts, plots, maps and diagrams) represented by data structures also referred to as figures. The rendering process uses the Plotly.js JavaScript library under the hood although Python developers using this module very rarely need to interact with the Javascript library directly, if ever.



Given the data of the Conselleria of Health until the 2nd of September, on vaccinations calculate:

  1. How many people have been vaccinated with the first vaccine? And with the second? And how many people have made an appointment and not attended?
  2. Create a graph showing the population vaccinated by ages with first and second dose.
  3. Create the graph mentioned above showing the percentages of groups using the data of January 1, 2021 on population by age of IDESCAT.
  4. Create a graph with the number of vaccines administered according to each manufacturer.
  5. Create a graph with the sum of fully vaccinated people and the number of vaccines that have been given daily depending on whether they are first or second dose.

The examples on this web are also in matplotlib but the matplotlib graph is a simple image. Otherwise with plotly you can export the python graph to Chart Studio cloud creating a free account. Chart Studio is a faster way to plublish embeded and interactive charts online.


Source Code:


1. How many people have been vaccinated with the first vaccine? And with the second? And how many people have made an appointment and not attended?

On September 2nd 2021 in Catalunya 5.694.103 first doses and 4.712.491 second doses have been administrated. There are also109.955 appointments not attended.


2.Create a graph showing the population vaccinated by ages with first and second dose.

3. Create the graph above showing the percentages of groups using the data of January 1, 2021 on population by age of IDESCAT.


4. Create a graph with the number of vaccines administered according to each manufacturer.

5. Create a graph with the sum of fully vaccinated people and the number of vaccines that have been given daily depending on whether they are first or second dose.