Skip to content

Commit 3764c00

Browse files
committed
feature: add example
1 parent 338edc0 commit 3764c00

28 files changed

+340780
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# vulcan-sql-examples
1+
# VulcanSQL Examples
2+
3+
This repo contains source code of VulcanSQL examples.

covid19-global-data-api/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
tmp
3+
.DS_Store

covid19-global-data-api/README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# COVID 19 Global Data API
2+
3+
## Project Introduction
4+
5+
This sample project is based on [VulcanSQL](https://github.com/Canner/vulcan-sql/). VulcanSQL is a Data API Framework that helps data folks build scalable data APIs using only SQL templates without any backend skills required.
6+
7+
In this project, we expose some apis based on COVID 19 Global Data downloaded from [WHO Coronavirus (COVID-19) Dashboard](https://covid19.who.int/data), and `WHO-COVID-19-global-data.csv` is the downloaded file.
8+
9+
## Setup
10+
11+
- [Install VulcanSQL from NPM](https://vulcansql.com/docs/get-started/installation#install-from-npm)
12+
- `npm install` in the root of project directory
13+
- `vulcan start --watch` and `vulcan catalog` in two seperate shell windows, and you can now access API documentation at `http://localhost:3000/docs` and catalog at `http://localhost:4000`
14+
15+
## APIs introduction
16+
17+
- `/countries`: get a list of countries and their country codes
18+
- `/max_cases`: get a list of countries or WHO regions that have the most cases on a given date range
19+
- `/max_deaths`: get a list of countries or WHO regions that have the most deaths on a given date range
20+
- `/min_cases`: get a list of countries or WHO regions that have the minimum cases on a given date range
21+
- `/min_deaths`: get a list of countries or WHO regions that have the minimum deaths on a given date range
22+
- `/reports`: get a list of COVID-19 reports by countries and date range
23+
- `/who_regions`: get a list of WHO regions
24+
25+
## Data introduction
26+
27+
|Field name|Type|Description|
28+
|---|---|---|
29+
|Date_reported|Date|Date of reporting to WHO|
30+
|Country_code|String|ISO Alpha-2 country code|
31+
|Country|String|Country, territory, area|
32+
|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).|
33+
|New_cases|Integer|New confirmed cases. Calculated by subtracting previous cumulative case count from current cumulative cases count.|
34+
|Cumulative_cases|Integer|Cumulative confirmed cases reported to WHO to date.|
35+
|New_deaths|Integer|New confirmed deaths. Calculated by subtracting previous cumulative deaths from current cumulative deaths.|
36+
|Cumulative_deaths|Integer|Cumulative confirmed deaths reported to WHO to date.|
37+
38+
## Data Visualizations
39+
40+
- [Streamlit](visualizations/streamlit/)

0 commit comments

Comments
 (0)