Skip to content

The CovidPi API will show you different interactive maps and graphs that describe the geographical spread of the virus around the world.

Notifications You must be signed in to change notification settings

Nachosori/CovidPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Descripción de la imagen

CovidPI

The CovidPi API will show you different interactive maps and graphs depicting the geographical spread of the virus around the world.


Contents of this file

  • Introduction
  • Requeriments
  • Instructions
  • API Reference

Introduction

The following API is responsible for analyzing data from different countries of the world, during the years 2021 and 2020, in it you can find, for the realization of the API have been used three different databases:

  • confirmed_global
  • deaths_global
  • recovered_global

The database was obtained from the following link:


Requeriments

You need to have all the libraries from the requirements.txt file installed. Once everything is installed, you can start running the covid dashboad.

To start, go to the Dashboard folder from the console and run the following command:

streamlit run streamlit.py

To be able to use the administrator section from the Dashboard it is necessary to include a file with the users that are going to have these permissions, this file will be placed inside the .streamlit folder with the name secrets.toml and will have the following format:

#.streamlit/secrets.toml

[passwords]
# Follow the rule: username = "password"
username = "password"

Instructions

On the dashboard you can find an interactive menu located in the sidebar, with four different sections:

Descripción de la imagen

In the country analysis section, we can find different ways to receive the data:

  • For day
  • Acumulates
  • Date range

In the subsection for a day we will be able to observe the data of the dead, recovered and active per day. In addition we can choose two different types of graphs to reflect the data.

Descripción de la imagen


Descripción de la imagen

The accumulated subsection shows the accumulated data from the beginning of the pandemic until the selected date.

In the last subsection, we can choose the accumulated data we want in a specific time range and receive a graph where we can observe the growth of the cases, etc.

Descripción de la imagen

In the country analysis section, we can choose to compare the data between countries and display the data and a comparative graph.

Descripción de la imagen

Finally we can find an administrator menu where we can add, modify and delete data from the API and that are modified directly in the database.

Descripción de la imagen


Descripción de la imagen


API Reference

Get all countries

  GET /api/countries
Parameter Type Description
api_key list Required. Your API key

Get coord

  GET /api/coord/{country}
Parameter Type Description
country string Required. name of country

Get all dates

  GET /api/all/dates
Parameter Type Description
api_key list Required. Your API key

Get confirmed range

  GET /api/confirmed/dates/{country}/{start}/{end}
Parameter Type Description
country, start, end list Required. name of country, start date end date

Get confirmed day

  GET /api/confirmed/day/{country}/{start}
Parameter Type Description
country, start int Required. name of country, start date

Get confirmed data acumulated

  GET /api/confirmed/{country}/{date}
Parameter Type Description
country, date int Required. name of country, date

Get Get death range

  GET /api/death/dates/{country}/{start}/{end}
Parameter Type Description
country, start, end list Required. name of country, date

Get confirmed day

  GET /api/death/day/{country}/{start}
Parameter Type Description
country, start int Required. name of country, start date

Get death data acumulated

  GET /api/death/{country}/{date}
Parameter Type Description
country, date int Required. name of country, date

Get Get recovered range

  GET /api/recovered/dates/{country}/{start}/{end}
Parameter Type Description
country, start, end list Required. name of country, date

Get recovered day

  GET /api/recovered/day/{country}/{start}
Parameter Type Description
country, start int Required. name of country, start date

Get recovered data acumulated

  GET /api/recovered/{country}/{date}
Parameter Type Description
country, date int Required. name of country, date

Post country

  POST /api/add/country
Parameter Type Description
api_key str Required. Your API key

Put name country

  PUT /api/name/country/{name}
Parameter Type Description
name str Required. Name country

Put date confirmed

  PUT /api/confirm/data/{name}/{date}
Parameter Type Description
name,date str Required. Name country, date

Put recover confirmed

  PUT /api/recover/data/{name}/{date}}
Parameter Type Description
name,date str Required. Name country, date

Put death confirmed

  PUT /api/fatal/data/{name}/{date}
Parameter Type Description
name,date str Required. Name country, date

Delete country

  DELETE /api/delete/country"}
Parameter Type Description
api_key str Required. Your API key

About

The CovidPi API will show you different interactive maps and graphs that describe the geographical spread of the virus around the world.

Topics

Resources

Stars

Watchers

Forks