Identifying amenity hotspots in Stockholm
Last updated
Last updated
To run this example you'll need:
An active CARTO organization
The latest version of the Analytics Toolbox Advanced installed in your Snowflake database
CARTO Academy - Data for tutorials and examples from Snowflake's Marketplace. With this free listing, users can access a set of sample tables with geospatial data that can be used to test and evaluate the CARTO geospatial analytics platform running natively on Snowflake
In this example we are going to identify hotspots of amenity POIs in Stockholm using OpenStreetMap data and the GETIS_ORD_H3 function of the statistics module. POI data can be found in the publicly available CARTO_ACADEMY_DATA.CARTO.OSM_POIS_STOCKHOLM
table.
The process consists of three simple steps:
First, we retrieve all POIs from OpenstreetMaps which belong to the category “amenity”.
Next, we find the H3 cell of resolution 9 to which each POI belongs and count the number of amenity POIs inside each cell.
Finally, we call the GETIS_ORD_H3 function, which returns the Getis-Ord Gi* statistic for each H3 cell, calculated over N_AMENITY_POIS
(number of amenity POIs in the cell).
The results can be explored in the map below, where we can use the histogram widget to narrow down the cells with the highest Gi* values, which correspond to the location of the hotspots of amenity POIs in Stockholm.
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 960401.