Creating Data Observatory tilesets
In this guide you will learn how to create tilesets from your Data Observatory datasets. Tilesets are necessary for the visualization of those datasets that are too big to be visualized directly in Builder, which are those that have the Create map action disabled in Your Subscriptions page.
Besides creating your own tilesets, you can also use any of the tilesets in our collection of ready-to-use Data Observatory tilesets from public datasets, available in the BigQuery project
carto-do-public-tilesets. You can access here the full list of tilesets and a gallery of example visualizations.
Create a BigQuery connection
In order to be able to create a tileset from your Data Observatory dataset you first need to create a connection of type OAuth from your CARTO Dashboard. To do so, go to Your Connections page, click on New Connection and then choose the one of type BigQuery:
Then, choose to create a connection of type OAuth and follow the steps to complete the configuration. Please note that the email associated with your CARTO account should be the same as the one you use to create the BigQuery connection.
Once your BigQuery connection has been set up, the Google user that you have used to create it should now have access to both the CARTO Spatial Extension and your Data Observatory subscriptions directly from BigQuery.
Access your Data Observatory dataset in BigQuery
Go to Your Subscriptions page and identify the dataset that you want to create the tileset from. Click on the three dots to expand the menu and then on Access in BigQuery.
The following information will be displayed:
- Location of the data table in BigQuery, in the format
- Location of the geography table in BigQuery, in the format
- Example query to join the data and geography tables.
Please copy the example query, as you will need it in the next step of the process.
Run the Tiler
The next step is to use any of the available procedures in the Spatial Extension for BigQuery to create a tileset. You can create two types of tilesets:
- Simple: this is the right choice if you are looking to visualize the original features of the dataset. To get started, find here a set of examples on how to create simple tilesets using the
- Aggregation: choose this type when your dataset is composed of points and you want to see them aggregated. To get started, find here a set of examples on how to create aggregation tilesets using the
Both of the aforementioned procedures take as input a SQL query specifying the data that you want to transform into a tileset. If the case of Data Observatory datasets, you can use the example query provided as part of the “Access in BigQuery” functionality (see the previous section) as a starting point. We recommend that in order to minimize the cost and avoid reaching BigQuery internal limits, you only include in your input query the data columns that you strictly need for your visualization.
Here is a GIF showcasing how the full process would look like:
Create a visualization
The final step is visualizing the tileset. Tilesets can be visualized directly from your CARTO Dashboard following this guide or integrated into your custom spatial applications using CARTO for deck.gl following this example code.
Here is an example of a tileset visualization of Worldpop’s dataset created from the Dashboard: