Mapping with CartoDB

Have some data you’d like to map using CartoDB? This post will walk you through the process.

These instructions assume you are using the  list of geocoded conference participant towns that you will find here (csv format). Just download the file to your machine.

Of course you are very welcome to use any other geocoded dataset you happen to have lying around. (If your data describes countries or street addresses but is not yet geocoded, CartoDB will – in theory – be able to handle geocoding them automatically. I hope to add a post on that sometime soon.)

Here goes.

  1. First, create an account on CartoDB (www.cartodb.com). To create an account you will need to provide a name and an email address. That’s all.
  2. Once you have an account and are logged in, look at the blue banner at the top – you will see your username. Use the dropdown arrow to select “Datasets”.
  3. Then click on the green “New Dataset” button.
  4. Drag your csv file over from Windows Explorer or navigate to it.
  5. At the bottom of the screen you will see a green “Connect Data” button – click.
  6. You should now see the data in “dataview”.

Want to map it?

  1. At the center of the blue banner on the top of the screen, click on “Map view”.
  2. At the lower left of the map screen you will see that CartoDB is suggesting two possible ways of looking at your data. Click on “Show”. Your choices are Heatmap or Bubble. Click on Heatmap.
  3. Doesn’t that look fancy? Sure does. Zoom in and out a few times to get a sense of how the heatmap changes.
  4. Now let’s look at the data in another way. Look at the vertical column on the right side of the screen. Click on the paintbrush icon (“wizards”).
  5. Use the arrows to navigate to “Bubble”. You will see that the “column” is automatically set to visualize the “latitude” field, which doesn’t make a whole lot of sense. Use the dropdown arrow to select “participants”. Now the bubble size will be determined by the number of participants from each location.
  6. You can play with the settings. Change the bubble radius or color or stroke type until you like the way everything looks.
  7. Just below the paintbrush icon click on the “infowindow” icon. This is where you control what a user will see when they click on a point on your map. I’ll toggle on “school”, “state”, and “town”. You can change the order in which they appear by resting the cursor on the label until you see the 4-arrowed icon and dragging the field up or down.
  8. Click anywhere on the map itself to make the editing box fold away.

Taking It Up a Notch

  1. Let’s pretend you are making a map of towns that sent more than one participant to the conference. You need to filter your data. Toward the bottom of the vertical editing column you will see a graph icon. Rest your cursor – the “filters” label will show up. Click on the icon.
  2. To filter on # of participants, select the participants column.
  3. Drag the slider to the right until the display reads 2.00-4.00.
  4. Click anywhere on the map itself to minimize the editing box.

Finish the Job

  1. In the upper right corner, click on “Visualize”
  2. Click “Create Map”
  3. In the bottom left you will see “Change basemap” and “Options”. Explore.
  4. In the upper left you will see “Add element”. Here is where you can add a map title, annotations, images, etc.
  5. When you are satisfied, click “Publish” in the upper right. Now you can harvest the URL or embed code for your map. That’s it!

 

Leave a comment