GEOG 865
Cloud and Server GIS

Uploading data to CARTO and aggregating to hexbins

PrintPrint

Let's go through the steps of uploading a basic dataset to CARTO and making a web map.

First, download the data for this lesson. This folder contains datasets that I derived from Portland Maps Open Data and OpenDataPhilly. They are stored in GeoJSON, a popular format based on JavaScript syntax that is used for interchanging vector data on the web.

Then follow these steps:

  1. To log into Carto, in a web browser, visit carto.com
    1. Click the Try For Free button to create a 14-day trial account.
    2. Login to the Carto Platform through the login page.
    3. If you are promtped to create an Organization, create a new unique one with your name or Penn State Access ID.

      (There is an option to create a free student account via GitHub, but I have had almost no success getting that to work in previous semesters due to GitHub's verification process. They seem to have issues with us being in an online program and not physically at University Park, PA.)
       
  2. After you log in, you will see options along the left of the CARTO homepage including Maps and Data Explorer. We'll use the Data Explorer link to upload and view our datasets, and the Maps link to design some maps from them.
  3. Click Data Explorer and click the Import Data button.
    1. Browse to csa_farm_dropoffs.geojson on your computer.
    2. Uncheck the Auto-Guessing slider.
    3. Upload the data.

      You should now see the dataset in the Data Explorer list. These are locations where local farms around Portland will bring their produce into the city. They drop it off at these points for urban residents who have signed up for community-supported agriculture (CSA) subscriptions. Mapping these points is one way to see which areas of Portland are currently being served by CSAs (and which ones are not).
       
  4. In the main menu along the left, enter the Map section and click the button to Create Your First Map.
  5. In the map window, use the Add Source From button to add your farm dataset to the map. You'll see the points overlayed on a basemap of Portland. You're now in CARTO Builder, which is a map design center similar to the ArcGIS.com map viewer or Mapbox Studio (although Builder is more for styling thematic maps rather than basemaps).
  6. At the very top of the window, give your map a name, and notice the Updated indicator beside it. Your map will be saved automatically as you work.
  7. Click the Basemap link and explore the variety of basemaps offered by CARTO. For example, try the Dark Matter layer. These are built from OpenStreetMap data. You can choose your favorite one for use in this exercise.
  8. Go back to the layer list, and click on the farm points layer.
  9. Play around with changing the fill, outline, and other properties of the points.

    Sometimes it's easier to visually make sense of a bunch of dense points by aggregating them to polygons of uniform size. Hexagons are a popular choice because they are compact and tessellate (fit together) easily. Let's aggregate these points to hexagons, or "hexbins" as cartographers sometimes call them.
     
  10. Still viewing the properties of the csa_farm_dropoffs layer, choose the Hexbin option, and select a color ramp and size for the hexbins that appeals to you. This is somewhat of an art; if the hexbins are too small, you won't learn much more than if you viewed the raw points, and if the hexbins are too large, the patterns in the data will be muted.
  11. Click the color ramp, and notice the options to change the number of classes that the data is divided into. You can also change the classification scheme. Right now it's set at Quantile, which ensures that there will be an equal number of hexbins in each class, or color.
  12. Set a classification scheme and number of buckets that you feel best tells the story about where Portland is serviced by CSAs. Notice how much power you have over the message implicit in the map patterns. This is true with all cartography and not just online tools, yet interactive web GIS of this nature brings the power of the cartographer to the forefront.
  13. Use the Share button at the top of the window to Publish your map and generate a Public Share Link. Paste that url link into a new browser window to see how your map may be viewed by other users. You'll also include this link as part of your assignment submission.