The CovidPi API will show you different interactive maps and graphs depicting the geographical spread of the virus around the world.
- Introduction
- Requeriments
- Instructions
- API Reference
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:
#.streamlit/secrets.toml
[passwords]
# Follow the rule: username = "password"
username = "password"
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.
GET /api/countries
Parameter | Type | Description |
---|---|---|
api_key |
list |
Required. Your API key |
GET /api/coord/{country}
Parameter | Type | Description |
---|---|---|
country |
string |
Required. name of country |
GET /api/all/dates
Parameter | Type | Description |
---|---|---|
api_key |
list |
Required. Your API key |
GET /api/confirmed/dates/{country}/{start}/{end}
Parameter | Type | Description |
---|---|---|
country , start , end |
list |
Required. name of country, start date end date |
GET /api/confirmed/day/{country}/{start}
Parameter | Type | Description |
---|---|---|
country , start |
int |
Required. name of country, start date |
GET /api/confirmed/{country}/{date}
Parameter | Type | Description |
---|---|---|
country , date |
int |
Required. name of country, date |
GET /api/death/dates/{country}/{start}/{end}
Parameter | Type | Description |
---|---|---|
country , start , end |
list |
Required. name of country, date |
GET /api/death/day/{country}/{start}
Parameter | Type | Description |
---|---|---|
country , start |
int |
Required. name of country, start date |
GET /api/death/{country}/{date}
Parameter | Type | Description |
---|---|---|
country , date |
int |
Required. name of country, date |
GET /api/recovered/dates/{country}/{start}/{end}
Parameter | Type | Description |
---|---|---|
country , start , end |
list |
Required. name of country, date |
GET /api/recovered/day/{country}/{start}
Parameter | Type | Description |
---|---|---|
country , start |
int |
Required. name of country, start date |
GET /api/recovered/{country}/{date}
Parameter | Type | Description |
---|---|---|
country , date |
int |
Required. name of country, date |
POST /api/add/country
Parameter | Type | Description |
---|---|---|
api_key |
str |
Required. Your API key |
PUT /api/name/country/{name}
Parameter | Type | Description |
---|---|---|
name |
str |
Required. Name country |
PUT /api/confirm/data/{name}/{date}
Parameter | Type | Description |
---|---|---|
name ,date |
str |
Required. Name country, date |
PUT /api/recover/data/{name}/{date}}
Parameter | Type | Description |
---|---|---|
name ,date |
str |
Required. Name country, date |
PUT /api/fatal/data/{name}/{date}
Parameter | Type | Description |
---|---|---|
name ,date |
str |
Required. Name country, date |
DELETE /api/delete/country"}
Parameter | Type | Description |
---|---|---|
api_key |
str |
Required. Your API key |