Ask or search…
Comment on page

Creating a tileset from a data observatory subscription


In this tutorial we are going to showcase how to leverage the public data offering from our Data Observatory and use the data from a subscription to build an interactive dashboard in our map-making tool, Builder. In order to build this dashboard we are going to first create a tileset in order to be able to visualize a larger amount of data.

Steps To Reproduce

  1. 1.
    Go to the CARTO signup page.
    • Click on Log in.
    • Enter your email address and password. You can also log in with your existing Google account by clicking Continue with Google.
    • Once you have entered your credentials: click Continue.
  2. 2.
    Go to Data Observatory section to access our Spatial Data Catalog.
  3. 3.
    Browse the catalog to find the best spatial datasets to enrich your analysis. With the catalog filters you can explore the different datasets per country of coverage, category, type of license, data providers and placetypes.
  4. 4.
    For this example we are going to look for a dataset in Canada with a public license. In particular we are going to select the dataset from Statistics Canada in the “Demographic” category named “Sociodemographics - Canada (Census Division).
  5. 5.
    If we select that dataset, we can then access it’s particular page with all associated metadata (summary, data schema and map preview)
  6. 6.
    As this is a public dataset we can both access the free sample or directly subscribe to the dataset for free. In this case we are going to go ahead with the full subscription.
  7. 7.
    Once we confirm the subscription, we are going to have access to the data from its relevant section in the Data Explorer.
  8. 8.
    We have a look at the structure of the dataset to identify what are the main variables we are interested to analyze. For example: c0001_t (Population, 2016), c0005_t (Private dwellings occupied by usual residents), and c1677_t (Average value of dwellings).
  9. 9.
    Now, we are going to click on Create button. Note that the table of this dataset is too large to be loaded entirely in Builder of map creation. For this reason, CARTO offers you two options, either to create a map and add this dataset with the dynamic tile generation or creating a tileset and then leverage this tileset for building your map.
    Check the Accesing subscriptions reference documentation for a better understanding of how you can directly access your subscriptions from your data warehouse connected to CARTO. This is currently supported for BigQuery and Snowflake; Redshift and Databricks support is coming soon.
  10. 10.
    Click on Create a tileset. This will open a new modal screen for you to manage the tileset creation process. The first step is to set the location and name of the output tileset in a directory within the CARTO Data Warehouse where the user has write permissions. Once you have completed this configuration, click on Save here.
  11. 11.
    In the next step we should select the output zoom levels for which we want the tileset to work (which we are going to change to be between level 2 and level 10 for this example). We can also add a custom description to the tileset. Click on Continue.
  12. 12.
    Now it is time to select which columns we want to include in the tileset. In this example we are going to select: c0001_t (Population, 2016), c0005_t (Private dwellings occupied by usual residents), and c1677_t (Average value of dwellings). After selecting the columns we click on Continue.
  13. 13.
    We confirm that the details are correct and click on Create.
  14. 14.
    While the tileset creation process is running you can minimize the progress window and continue working in CARTO.
  15. 15.
    Once the process has completed, we can click and access the tileset in the Data Explorer.
  16. 16.
    In the Data Explorer, now that we have the tileset created, we click on Create Map.
  17. 17.
    In the Builder interface, you will see that a new map has been created with the tileset as the source of data.
  18. 18.
    We can change the name of the layer.
  19. 19.
    We can access the layer styling options to work in our visualization by clicking on “Layer style”.
  20. 20.
    We can for example style the layer based on the values of the Population field (c0001_t) and select the color palette and opacity that we want for our visualization.
  21. 21.
    We can also style the stroke around each polygon.
  22. 22.
    Once we are happy with the style of our layer we click on Back.
  23. 23.
    Next we are going to add a series of widgets to interact with the data. For that, we go to the “Widgets” section. We are going to add both a Formula and Histogram widget base on the c0001_t. For the Formula widget we are going to select the operation “SUM” and modify the Formatting to be in the format “12.3k”. We rename the widget to “Total Population, 2016”.
  24. 24.
    We then add a new widget with the Histogram type based on also on the “c0001_t” field (i.e. Population, 2016). We leave the buckets to 6.
  25. 25.
    We are now going to change the basemap. For that, we go to the “Base maps” section. We can change it for example to Google Maps in the Positron edition.
  26. 26.
    Finally we can click on Share and modify the privacy settings of our map. We can also make the map public, which can then be accessed online with an associated url.
  27. 27.
    Finally, we can visualize the result.