Carto Tutorial

Before you begin: download this spreadsheet of data (burglaries of businesses in Harlem in 1935)

1. Visit Carto.  Create a free account. Check your email and verify your account

2. Login to your account.

3. Click on Maps (top left)

4. Click on ‘New Map’

Login to Map window
5.  Click on ‘Connect Dataset’
Connect dataset

6. Drag and drop the spreadsheet you downloaded into the box next to the blue ‘Browse’ button

NOTE: You can also connect directly to Google Drive or Dropbox to access a spreadsheet you have saved there

7. CartoDB will build a map based on the data in the spreadsheet

Remember, having CartoDB map information is the easy part. Gathering and formatting that information in the spreadsheet is what takes time- which is why we’re not asking you to do that during the workshop

8. Click on Data View to switch from Map View to Data view

Data View

    • CartoDB arranges the data alphabetically by the name of the column, so the spreadsheet is laid out differently than your Googlesheet. Renaming the column is the only way to reorder the display of your data
    • A new column named ‘cartodb_id’ has been created, based on the row number of each record.
    • A column labeled ‘the-geom’ has been created that combines the latitude and longitude information in the spreadsheet
    • CartoDB recognizes four types of data: number, date, and text (string). Numbers in one of the standard formats for dates are reformatted into the format used by CartoDB: yyyy-mm-dd recognized the Date column as a date (since we put the dates in the format CartoDB uses).
    • If CartoDB does not correctly identify the data type, you can change it by clicking on the triangle next to the column name

9. Click on Map View to return to your map

1. Click on any of the points – a pop-up box will appear, called an ‘infowindow.’ You will be directed to select the fields you wish to display.

No infowindow

2. Click on ‘Select fields’ to open the section of the slide menu on the right identified with a speech bubble icon.

    • Notice that CartoDB allows you to set different information to appear when you click than when you hover over a point. Click on the appropriate tab to set up each option.

infowindows

3. For now, click on the ‘Hover’ tab, scroll down to and slide the slider to the right to activate the ‘place’ field so you can see what the location that the point is supposed to be. Then click on the ‘Click’ tab and and slide the slider to the right to activate the ‘address’ field

    • If you tick the title checkbox, the column title for that information will also appear in the infowindow display.
    • You can change the settings on the two types of info windows at any time — but you can’t reorder the fields unless you rename the fields (which display in alphabetical order, like the columns in data view) or change the html [you can access that function by clicking on the </> button]

Create Maps

A) Simple Maps

Simple Map

  • In’ Marker Fill’
    • adjust the number to make the point larger or smaller
    • click on IMG to select or upload an icon to use instead of a dot
    • click on the color to change to color of the point
  • In ‘Composite operation’, you can select an option from the pulldown for how to represent multiple points at the same location (darker, lighter etc)
  • In ‘Label text,’ you can select a column title to appear as a label next to the point [CartoDB does not allow you to use dates or numbers as titles]
    •  If you select a title, an additional set of options will appear to allow you to format the appearance and location of the title

B) Torque Maps — Torque maps animate to show change over time if you have date/time data – and we do.

Torque Map

  • To change the map type, click on the paintbrush icon in the right-hand slide menu to open the ’Map Wizard.’
  • Select ‘Torque map’ type.
  • Click on ‘Time Column’ and select ‘date.’
    • On those settings the points in each time frame appear and then fade (the higher you set ‘Trails,’ the longer each cluster takes to fade)
  • Click on ‘Cumulative’ – each point now remains on the map after it appears, so the total map displays at the end of the animation.
    • ‘Blend mode’ sets how the map represents overlapping points.
    • ‘Duration’ sets the length of time the animation takes to play.
    • ‘Steps’ sets the number of time frames the data is divided into – you can see what that covers reflected in the box that appears on your map.

C) Cluster Map

Cluster Map

  • Click on the ‘Cluster’ map – the numbers that appear indicate how many records/rows are clustered around that location.
    • Adjusting the ‘Buckets’ defines how many groupings your data will have – fewer buckets means more clusters.
    • Zooming in and out will also change the groupings.
    • Note that the speech bubble icon in the slide menu is grayed out – infowindows are not available in Cluster maps.
    • Click on the ‘Intensity’ map – it is also a cluster map, but one that uses colors not numbers to show density. It does allow infowindows, but only for one record at each location.

D) Heatmap

Heatmap

  • Click on ‘Heatmap’ – this map type also shows clusters of records at particular locations , the darker the color the greater the number.
    • Adjusting the “Marker size” changes the area covered by each cluster.
    • Zooming in and out will also change the area covered.
  • A heatmap can be animated to show change over time – click on ‘Animated’ & in ‘Time Column’ select ‘date’ – the options are the same as those for the Torque map.
    • On those settings the clusters in each time frame appear and then fade (the higher you set the Trails, the longer each cluster takes to fade).
    • ‘Cumulative’ has each cluster remain on the map after it appears, so the total map displays at the end of the animation.
    • ‘Duration’ sets the length of time the animation takes to play.
    • ‘Steps’ sets the number of time frames the data is divided into – you can see what that covers reflected in the box that appears on your map.
    • Note that the speech bubble icon in the slide menu is grayed out – infowindows are not available in Heatmaps.

E) Category Map

Category Map

  • Click on ‘Category’ – this map type displays your records in different colors for different information in a single column of your data. The categories in this data are ‘Number of people involved’ and ‘type of business.’
  • Click on ‘column’ and select one of columns that contain category data
    • CartoDB can display up to ten different categories – if you have more than ten, it displays nine and groups the rest into a category called “others”
    • Empty rows in a column are categorized as ‘null.’
  • Click on ‘Torque Cat’ map type – this is also a category map, which you can animate to show change over time if you have date/time data, as we do
    • Click on ‘Time Column’ & select ‘date.’
    • On those settings the points in each time frame appear and then fade (the higher you set ‘Trails,’ the longer each cluster takes to fade).
      • Note: there is no cumulative option for Torque Cat [it also does not seem to work for large numbers of categories].
    • ‘Blend mode’ sets how the map represents overlapping points.
    • ‘Duration’ sets the length of time the animation takes to play.
    • ‘Steps’ sets the number of time frames the data is divided into – you can see what that covers reflected in the box that appears on your map

Add data to your map

1. Add a new point to your map

Add Feature

  • Clicking on the ‘add feature button’ on the bottom right in the slide menu.
  • Click on the map at the location where you want to place that point.
  • If the point is where you want it to be, click ‘done’ in the box that appears; if not, click ‘discard.’
  • To see the new point in the data view, select ‘data view’ and scroll to the bottom of the data.  It will be the only row with just the geometry field.

2. Add a New Layer of Data to Your map

Why use layers? If you have so much information that the map becomes crowded and difficult to read, you could break the data up into layers, which allows someone reading the map to select which layers to view, and simplify the map.

  • Download this spreadsheet (Robberies of businesses, 1935)
  • Click on the blue ‘+’ on the top of the slide menu

Add layer

    • You can select / upload and select another dataset or click ‘Add an empty layer’
    • At the top of slide menu are now tabs labeled ‘1’ & ‘2’ – the new data you just added is ‘1,’ the data already on the map is ‘2’. Each layer can be changed independently by clicking on the number [in the slide menu, the name of each dataset appears next to its number[.
    • Note: the free version of CartoDB only allows up to 4 layers

You also need to use layers if you want to have lines or polygons, as well as points on your map. In CartoDB only one kind of feature — point, line, polygon — can appear in each layer

    • If you add an empty layer, you can add lines or polygons directly to your map
    • Click on the ‘add feature’ button at the bottom of the left hand menu
    • Select the feature you want to add
    • Add the feature by clicking on the map
    • When adding lines, each click extends the line until you click ‘done’
    • Clicking on the line brings up the same editing box as with points – you can set up an info window + click on the ‘edit geometry’ button to change the location of the line by dragging it on the map

Map display options

1. Change basemap

  • Click on ‘Change baseman’ on the bottom left of the window

basemap

  • Select one of the options
    • Nokia Terrain Day is useful for indicating the terrain, which is the same as it would have been in the 19th century
    • Positron, the default basemap is useful in that it makes modern features less obvious than other options
    • NB The problem with many of the other basemaps is that they include highways that were not there in the 19th century, and do not necessarily include the towns and cities present at that time. It is possible to upload historical maps to overlay on top of the basemaps, but that requires more time than we have in this course

2. Options (these are features that allow a reader to manipulate the map)

  • Click on ‘Options,’ next to ‘Change basemap’ on the bottom left

options

  • Select the options you want by dragging the button to the right
  • Not all these options are necessary for the maps we are making for your projects, and you can include or omit them depending upon your preferences and opinions about how the map looks (e.g. search, share)
    • Fixed Title could be useful when you come to put the map in your exhibit – it adds a title bar across the top of the map

3. Add Elements (these are elements added on top of the map)

    • NB Elements are not fixed on the map – they change position if the map is resized. As a result, they can be difficult to use when embedding a map in a site, as you will be doing in your projects. Be prepared for problems if you try to use them
  • Click on Add Element in the top right, above the map

Elements

  • Click on any of the elements – a box will appear on the map. You can drag the box to where you want it to appear, and click in it to add text or a url for an image
    • A title is a large box for text, a text overlay is a smaller box for text
    • An annotation is a box for text with a line leading to a point
    • An image is a box which can display an image available online through a url
  • To remove an element, click on it, then click on the X that appears on the top left of the box

4. Exporting your map to use in your blog or project

  • For an image of a map
    • Click on Export Image on the top right above the map

Export

    • An black frame will appear – you can adjust what appears in the window by zooming the map and by dragging the edges of the frame
    • When you have the image you want, click the export button in the middle below the frame
    • CartoDB will generate an image; click on the url, and then control-click and download to your computer
        • NB An image of the map does not allow the viewer to access the infowinodows or animations
  • An interactive map
    • Click on ‘Publish’ in the top right of the window

PUblish

    • CartoDB allows you to share the interactive map via a link and by embedding it in your blog or website, including in Omeka
    • When you are ready to add a map to your project, you click on the box under ‘Embed it’ and copy the code
    • NB An embedded map is a live version of the map you create in CartoDB – it will change as you change the original map. But you cannot change the features of a map from where it is embedded – so, for example, if you publish it as a torque map, someone viewing it can’t change it to a simple map. But you can make multiple maps based on the same dataset, and publish each separately