You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
On the dashboard you can find an interactive menu located in the sidebar, with four different sections:
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.
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.
In the country analysis section, we can choose to compare the data between countries and display the data and a comparative graph.
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.
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.