Construct an interactive COVID-19 comparison program which will compare the virus data between two countries. The data should be up-to-date and give options for the user to choose the two countries. The graphs should be line charts and include total cases and mortalities. The generated graph should also be interactive and allow the user to click on the graph to display additional information.
Built a program using the Python matplotlib and requests library. The program utilizes the World Health Organization CSV database for update information on the COVID-19 pandemic. The requests module reads the data in CSV format and retrieves the relevant information back to the user. The data is then aggregated, cleaned, and positioned to be used in a linear chart format using the matplotlib library. The program meets the interactive component of the requirements by allowing the user the to click within the grid lines for exact values at the selected position; as the COVID data is large and is usually portrayed in millions and hundreds of thousands this is helpful to get information to the dot.
subplots
which allows to create several graphs within a single window.annotate
method of the matploblib library you can add annotations to the plot on click. The cursor tracking is maintained via the onclick method in the program.Site by Maxim Shelepov. Icons by Icons8.