related article: https://vulcansql.com/use-cases/customer-facing-analytics/streamlit
This sample project is based on VulcanSQL. VulcanSQL is a Data API Framework that helps data folks build scalable data APIs using only SQL templates without any backend skills required.
In this project, we expose some apis based on COVID 19 Global Data downloaded from WHO Coronavirus (COVID-19) Dashboard, and WHO-COVID-19-global-data.csv
is the downloaded file.
- Install VulcanSQL from NPM
npm install
in the root of project directoryvulcan start --watch
andvulcan catalog
in two seperate shell windows, and you can now access API documentation athttp://localhost:3000/docs
and catalog athttp://localhost:4000
There are a lot of deployment options as of now, we provide Fly.io as an example since we can deploy the project for free, we can easily prevent apps from hibernation and it's simple to use!
- COVID-19 global data APIs(VulcanSQL):
- install fly.io
fly auth login
vulcan package --output docker
cd dist
(We provide it for demonstration purpose, and you can ignore it in.gitignore
if you want)- notice that you need to copy
profiles.yaml
and other necessary files manually if you do it yourself.- You can check
Dockerfile
for further details
- You can check
- notice that you need to copy
fly launch
- Please take a look at
fly.toml
, which is a configuration file from Fly.io. It will be auto-generated if you runfly launch
. We provide it here for your reference.
- Please take a look at
fly deploy
- COVID-19 data dashboard(Streamlit):
- please check here
/countries
: get a list of countries and their country codes/max_cases
: get a list of countries or WHO regions that have the most cases on a given date range/max_deaths
: get a list of countries or WHO regions that have the most deaths on a given date range/min_cases
: get a list of countries or WHO regions that have the minimum cases on a given date range/min_deaths
: get a list of countries or WHO regions that have the minimum deaths on a given date range/reports
: get a list of COVID-19 reports by countries and date range/who_regions
: get a list of WHO regions
Field name | Type | Description |
---|---|---|
Date_reported | Date | Date of reporting to WHO |
Country_code | String | ISO Alpha-2 country code |
Country | String | Country, territory, area |
WHO_region | String | WHO regional offices: WHO Member States are grouped into six WHO regions -- Regional Office for Africa (AFRO), Regional Office for the Americas (AMRO), Regional Office for South-East Asia (SEARO), Regional Office for Europe (EURO), Regional Office for the Eastern Mediterranean (EMRO), and Regional Office for the Western Pacific (WPRO). |
New_cases | Integer | New confirmed cases. Calculated by subtracting previous cumulative case count from current cumulative cases count. |
Cumulative_cases | Integer | Cumulative confirmed cases reported to WHO to date. |
New_deaths | Integer | New confirmed deaths. Calculated by subtracting previous cumulative deaths from current cumulative deaths. |
Cumulative_deaths | Integer | Cumulative confirmed deaths reported to WHO to date. |