Overview | Develop | Deploy | Data |
TOURIST-TO-RESIDENT RATIO
World Bank, Google BigQuery, Google Cloud Storage, GoogleMapsAPI-GeoChart
Use BigQuery to query World Bank public dataset and calculate the tourist-to-local ratio for all countries in 2017 to be displayed on the homepage of the shared-world app using Google Maps API.
- Ratio: (tourist arrivals / population)
- Percentage: Ratio * 100
Steps
(1) Get Ratio from WorldBank using BigQuery:
- Get the “Populaion, total” from the indicator data for all countries and years available.
- Get the “International tourism, number of arrivals” from the indicator data for all countries and years available.
- Join these two views for all countries that have both data and create a column for the percentage and the 1 local to resident ratio.
(2) Create and save table on Cloud Storage:
- Create a table using ratio view and filter by the latest year (2017) and order by the highest percentage in descending.
- Save table by exporting as csv to Cloud Storage (snippet below)
(3) Display with GeoChart Map:
- Enable GeoChartAPI
- Enter data in Google GeoChart in React
- Display GeoChart map with countries coloured according to ratio