Draft, 12 April 2016
This page should be in a useful state, but still needs work before it's finished.
A common mapping task is to calculate and display the number of points that are located within certain boundaries or regions – eg the number of public toilets within each postcode region. This is easy to do in CartoDB.
In this exercise we’ll be mapping the number of playgrounds in the ACT by administrative district. We’ll use two datasets from data.act.gov.au:
Download these datasets to your computer and save them somewhere obvious (such as your desktop).
Follow the instructions in the ‘Uploading data’ section of Getting started with CartoDB to load both datasets into CartoDB.
You may notice that when you upload the administrative boundaries to CartoDB you end up with three datasets. That’s because there’s three levels in the administrative hierarchy of the ACT – the territory itself, its 20 districts, and its 121 divisions. Each dataset in CartoDB provides the boundaries for one of these administrative levels.
We’ll be using the divisions. The easy way to identify it is to look at the number of rows in the dataset. The divisions dataset has 121 rows. Click on the title to open it.
For convenience, let’s rename the dataset. Click on the title at the top left of the table and enter a new name, such as ‘ACT divisions’. Click save.
Things to notice:
the_geomfield in the divisions dataset. Instead of coordinates it says ‘Polygon’. The geospatial data in this dataset represents a set of boundaries rather than a single point.
Things to note:
intersect_countcolumn. This is how many playgrounds were found within each division.
the_geomthe only other field in the dataset is the
divisionlabel that we selected during the merge process. If you want other fields to be included you have to remember to select them before you merge.
Now we have a dataset with regions and counts – time to make a choropleth map!
The choropleth map gives us a quick visual representation of the density of playgrounds across ACT divisions, but what if we want to see more details about individual playgrounds? Let’s add another layer to our map: