From Map to Analysis
  • I want to make a map
  • I think I need GIS
  • Geospatial Analysis

On this page

  • Our goal for today
  • Introduction to ArcGIS Online
    • Log on to ArcGIS Online
    • Tour of the user interface
    • The Map Viewer
    • Map main components
    • Basemap
    • Feature layers
    • Save your work - Save early, save often
  • UCSB bike infrastructure map
    • Step 1: Add layers to your map
      • Import lines Feature layer (bike paths)
      • “about the data” here?
      • Reorder layers
      • Accessing the underlying data
    • Step 2: Customize symbology & transparency
      • Adjust style based on attribute
      • Adjust layer transparency based on attribute
      • Select a better basemap
    • Step 3: Annotate the map
      • Drawing points in a sketch layer
      • Challenge: Drawing lines and circles in a sketch layer
    • Step 4: Prepare the map for publication
      • Fine tune symbols
    • Step 5: Share your map
  • Other approaches
  • Caveats of using ArcGIS Online

I want to make a map

The goal of this lesson is to demonstrate how to make a simple map, suitable for inclusion in a publication, using ArcGIS Online. As an exercise, you will be creating a map that reflects your personal experience biking on the UCSB campus. We will follow a typical workflow of:

  1. Start with a basemap
  2. Add feature layers from the UCSB campus
  3. Draw annotations on top of the map
  4. Prepare the map for presentation and export it

As we will describe under Other approaches at the end of this lesson, there are many tools and techniques that can be used to create such a map. An advantage of using a GIS tool such as ArcGIS Online, and the central motivation for using GIS in this lesson, is that a GIS tool allow maps elements to be interpreted and manipulated as data, and in this way spatial analysis becomes possible.

ArcGIS Online is but one of many GIS tools in existence. We use it in this lesson because it is in wide use in both commercial and academic settings. However, it is important to recognize that it is a proprietary and closed system that requires a paid subscription to use. We note limitations and ramifications of using ArcGIS Online on the reproducibility and citability of one’s work under Caveats of using ArcGIS Online at the end of this lesson.

Our goal for today

Our goal is to develop a map of the UCSB campus that illustrates the current bicycle infrastructure, specifically highlighting bike paths and racks. Additionally, the map will incorporate information about related incidents (crash, theft, …) and proposed improvements.

At the end of our session we should end up with something like this

Figure 1: Preliminary version of the possible result


Our final interactive map is also embedded below:

As we will discuss at the end of this lesson, there are many ways of making such a map without using a GIS tool. In fact, in many cases GIS is overkill, both because most of the features GIS tools provide will not be used and because the GIS interface can be cumbersome. But an advantage of GIS is that it opens up the possibility of treating map elements as data, and that in turn opens up and provides an introduction to the world of spatial analysis.

Introduction to ArcGIS Online

A brief tour of the interface.

Log on to ArcGIS Online

https://ucsb.maps.arcgis.com

Sign on with your UCSB NetID. You may need to enter “ucsb” into the url box. Do not use the ArcGIS login! This is for users who do NOT have a UCSB Net ID.

Figure 2: ArcGIS Online login page for UCSB users

You should have a similar landing page indicating that you are using the ArcGIS online under the UCSB license. You may need to authenticate with DUO on your phone.

Tour of the user interface

The main organization page lists the campus administrative contacts and open data groups available on campus. You can also see the latest content published by users on your campus.

Along the top of the page, is the main tool bar.

Figure 3: ArcGIS Online main menu bar
  • Home will take you to the main landing page when you first sign in.
  • The Gallery contains items from our ‘featured content’ group
  • Groups are a list of groups which you can create or join. Some are invitation only. These are popular when you are working in group projects. For this workshop, we have created a group called From Maps to Analysis which contains most of the data layers we will be using.
  • Content is where your created or uploaded content is listed. You can make folders in here to organize your layers and features.
  • Notebooks is ESRI’s version of a Jupyterhub-like environment. You can use ArcPy here. This may not be available to you based on your user role.
  • Organization will take you back to our main page. This is not the same as Home.
  • Scene, or Scene Viewer is where you can create 3D GIS scenes, such as neighborhood models and digital twins.
  • Map, or Map Viewer is where you can create 2D maps. We will be focusing on using the Map Viewer for this workshop.

The Map Viewer

Open a new, empty map by clicking Map on your top menu bar.

Figure 4: Opening a new empty map

Map main components

In the Map Viewer there is a menu bar in the left column. This is where you can add components to your map. The way to think about a map is that it is made of different layers that are added on top of each others. Each layer add a specific information to your map. In our example, we will have a layer for the bike paths, one for the bike racks, one for the buildings, and so on… The base layer is special and often made of an image (but does not have to be). It is called a ‘basemap’. Here are the main components of your map:

  • Basemap (background)
  • Feature Layers (your own or imported from others)
  • Symbology & legend
  • Save and open…

Basemap

The goal of a basemap, is to provide some context in terms of location and/or thematic. In ArcGIS online, a new map will always open with a basemap. Esri has about 20 different basemaps available. We will start with the default: the Topographic basemap.

Figure 5: Default basemap

In general, make sure you choose a basemap that is easy to follow and is accurate in relation to the goal of your map. Avoid using busy basemaps that provide a lot of information not be relevant to the purpose of your map and can become confusing as you add your other layers on top of it.

Feature layers

Feature layers are the layers you add on top of your basemap. They are the main information your map is aiming at communicating. In ArcGIS, When you add an existing layer to your map, it will show up under your Layers. When you want to see the layer properties, you can either use the menu on the right hand column to view its properties or use the ... (we call this a “meatball” menu) next to the layer to open the same panel.

Save your work - Save early, save often

open your menu bar to find the “save” icon

open your menu bar to find the “save” icon
  • There will be a blue dot next to the “save” icon until you save
  • Once you save, more options will be available
  • ArcGIS Online will not auto-save your map

UCSB bike infrastructure map

With that introduction, you now have the opportunity to start creating your own map. The goal here is to create a map of the bike infrastructure on campus (bike lanes and line, bike racks as points, buildings as polygons) and to then annotate on top of that some of your personal experience as a bicyclist or pedestrian on campus.

Step 1: Add layers to your map

Import lines Feature layer (bike paths)

From the Layers panel, click on the add layer button. Search My organization for ‘UCSB OSM Paths’. There should be only one result.

Figure 6: Adding a layer
TipChallenge: Repeat the above steps to add the feature layer bike_racks_ucsb to your map.

Import points layer (bike racks)

Figure 7: Add UCSB bike racks layer
TipChallenge: Find the ‘From Maps to Analysis’ group and add the UCSB Campus Buildings layer from there.

Add a layer via Groups

Figure 8: Add UCSB buildings layer

“about the data” here?

Reorder layers

After importing the three layers, you’ll notice they might not display optimally. There’s a GIS convention for layer ordering that helps ensure all features remain visible:

Layer Order Convention (top to bottom):

  • Points (e.g., bike racks) - should be on top
  • Lines (e.g., bike paths) - in the middle
  • Polygons (e.g., buildings) - at the bottom

This ordering ensures that smaller features aren’t hidden beneath larger polygon areas.

For our map, the recommended order from top to bottom should be:

  1. bike_racks_ucsb (top)
  2. UCSB OSM Paths (middle)
  3. UCSB Campus Buildings (bottom)

To reorder the layers, click and hold on a layer name in the Layers panel, drag it to the desired position, and release.

Figure 9: Reorder feature layers

Accessing the underlying data

Feature layers are driven by data. Each point, line, or polygon has associated with it a row in an attribute table providing information on that specific record.

For example, if you click on the three dots on the right of a feature layer you can access their attribute table by selecting Show table.

Figure 10: Attribute table of UCSB buildings layer

We will see later how you can leverage these attributes to set the symbology of a layer according to categories or quantities provided by the attribute table. You can also compute new attributes either based on other attributes or geospatial information. However this will be for our second workshop.

NoteSave early. Save often.

Now that you have added the layers to your map, save it by looking for the folder icon in the left menu bar and then selecting the Save as option.

Figure 11: Save as dialog in ArcGIS Online

In there, you can add a title, tags, and a short description of your map.

Step 2: Customize symbology & transparency

After adding our three layers, we have some work to do to make the map more readable. First, let’s adjust the symbology of the bike racks layer to reduce its size and change its symbol to a bike icon.

  • Click on the layer bike_racks_ucsb to open its properties panel.
  • On the panel Symbology, click on Edit layer style.
  • Look for the ② Pick a style option and select Style options.
  • Click on the pencil icon next to Symbol style to open the symbol selector.

There, we have multiple options to customize the symbol. Let’s click on the current symbol chevron to open the full symbol gallery.

From the menu, we can select several categories of symbols. Let’s select the Government category and look for a bike parking icon. Click on the Done button to apply the changes and return to the symbol style panel.

Figure 12: Selecting a bike parking symbol from the Government category

To change the size of the symbol, we can use the Size slider to reduce it to a more appropriate size. First, select “Adjust size automatically” to ensure the symbols to scale as you zoom in and out of the map. Then, you can use a custom size by moving the slider or entering a value; in our case, we selected 5.68 px.

WarningSize slider quirk

In ArcGIS Online, every time you select the “Adjust size automatically” option, it will reset the size slider to a default value. So make sure to select your desired size after enabling that option.

Figure 13: Symbol size settings with adjust size automatically option

Adjust style based on attribute

Now, what if we wanted to adjust the symbology based on an attribute? Let’s say we wanted to fill each building with a different color based on its use (academic, residential, administrative, etc.). We can do that by changing the style of the UCSB Campus Buildings layer.

  • Click on the layer UCSB Campus Buildings to open its properties panel.
  • On the panel Symbology, click on Edit layer style.
  • Look for the ① Choose attributes option and select + Field.
  • Select the attribute b_use, which stands for building use, and click on Add.
Figure 14: Adjusting symbology style by attribute

As a result, you will see that the buildings are now filled with different colors based on their use. You can further customize the colors by clicking on the color ramp and selecting a different one.

Figure 15: Buildings colored by their use category
Warningb_temp? b_phase

These field names are pretty cryptic. This is often the case with public data. If you want to learn more about this data, navigate over to the feature layer’

Adjust layer transparency based on attribute

Finally, let’s say we wanted to adjust the transparency of cycleways based on the max speed allowed on each bike path. We can do that by changing the style of the osm_cycleways layer.

  • Click on the layer osm_cycleways to open its properties panel.
  • On the panel Symbology, click on Edit layer style.
  • Look for the ② Pick a style option and select Style options.
  • Open the panel Transparency by attribute and switch the toggle to set the transparency based on attribute values.
  • Select the attribute maxspeed.

As a result, you will see that the bike paths are now more transparent for higher speed limits and less transparent for lower speed limits.

To increase the visibility of the bike paths, we can increase the width of the lines by editing the Width slider on the Symbol style panel. We selected 3.75 px for this example.

Figure 16: Setting transparency by maxspeed attribute

Here is the final result of our symbology adjustments:

Figure 17: Map with all symbology adjustments applied

Select a better basemap

After adding the layers and customizing their symbology, we have a good, almost ready map. However, the current basemap (Topographic) is a bit too busy and makes it hard to see the features we added. Let’s change it to a simpler basemap using the Basemap option in the left menu bar.

Figure 18: Basemap option in the left menu bar

From the basemap gallery, we can select a simpler basemap. For this example, we selected the Light Gray Canvas basemap, which provides a clean background that makes our features stand out.

Figure 19: Map with Light Gray Canvas basemap

Don’t forget to save your map after making these changes!

Step 3: Annotate the map

In addition to bringing external sources of information into a map (whether in the form of a basemap or additional feature layers), it is common to want to add new information. In many cases it is better to think of the new information as data, and to store it in its own feature layer. We will be describing this approach in the next workshop. For our purposes here, though, we will take the more straightforward approach of simply drawing on the map. The hand-drawn features will appear in what ArcGIS Online calls a “sketch layer.”

Figure 20: Sketch layer option in the left menu

After adding the sketch layer to your workspace, a new menu will appear in the right column with drawing tools and configuration options.

Figure 21: Sketch layer drawing tools menu

Drawing points in a sketch layer

  • Draw points where you were in a (near-)accident on a bike path, either as bicyclist of pedestrian.

Zoom in to the location and add a point with the point drawing tool. You can customize the symbol, size, and color of the point in the sketch layer menu before adding it to the map. Put as many points as you like.

In our example, we add the following settings to the point symbol:

  • Size: 48 px
  • Vector marker (background): Blue (#2132cf)
Figure 22: Point symbol customization settings

Challenge: Drawing lines and circles in a sketch layer

  • Draw a line where you think there should be a bike path but isn’t.

From the sketch layer menu, select the line drawing tool. Click on the map to start drawing the line, and click again to add vertices. Double-click to finish the line.

Figure 23: Drawing a line on the map

You can customize the line symbol in the sketch layer menu before adding it to the map. In our example, we add the following settings to the line symbol:

  • Width: 5 px
  • Dotted line pattern
  • Color: Light blue (#00c8ff)
Figure 24: Line symbol customization settings
  • Draw a circle where you think there should be a bike parking lot but isn’t.

Similarly to the line drawing tool, select the circle drawing tool from the sketch layer menu. Click on the map to draw the circle, and click on the select tool to finish the shape. You can also customize the symbol after drawing it by selecting it and changing its properties in the sketch layer menu. In our example, we add the following settings to the circle symbol. You can type in the values, or interactively select as in the animated figure.

  • Fill color: Red (#d13434)
  • Fill transparency: 38%
Figure 25: Drawing a circle on the map

Finally, let’s rename the sketch layer to “Annotations” to better reflect its purpose. Click on the three dots next to the sketch layer and select Rename. Enter the new name and click OK.

Save your map after making these changes

Step 4: Prepare the map for publication

Almost there! At this point you’re ready to start packaging your map for publication.

Fine tune symbols

Some of the bike racks are too close together. For point data, we have the option of using ‘proportional symbols’ or ‘clustered symbols’ to solve this visual clutter.

To do: Instructions for using clustered symbols for the bike racks layer to reduce visual clutter.

To do that, you need to look for the Print option in the left menu bar.

Figure 26: Print option in the left menu bar

For exporting the map you have two options:

  • Layout: This option allows you to create a more complex layout with additional map elements such as title, legend, scale bar, north arrow, etc. You can choose from several pre-defined templates or create your own custom layout.
  • Map only: With this option, you can export just the map itself without any additional elements. You can choose the file format (PNG, PDF, etc.) and the resolution of the exported map.

For our purposes, we will select the Layout option to create a more complete map for publication.

In the layout menu, you can change the title of the map, select a Template (which is basically a standard page size and orientation), and select the File format for the export (e.g., PNG, PDF).

You can also customize more the layout by enabling the Advance options panel. You can set the scale, add an author name, include copyright information, increase or decrease the resolution, indicate the output spatial reference, and select to include legend, north arrow, and scale bar.

Adjust the zoom and position of the map in the preview window to ensure everything is visible and well-framed.

Figure 27: Map export layout configuration panel

Step 5: Share your map

When you’re satisfied with the layout and settings, click on the Export button to generate the map. Depending on the selected file format and resolution, it may take a few moments to process the export.

The result will be list on the Exports panel, where you can save the file to your computer by clicking on the three dots next to the export and selecting Save as.

Figure 28: Saving exported map from the Exports panel

This will save the exported map to you ArcGIS Online content. You can access it later from the Content menu in the top menu bar. The new item will be available as an Image file that you can download to your computer.

Figure 29: Downloading the exported map image from ArcGIS Online content

Jon’s results are a bit different

Jon’s results are a bit different

NOTE: Public sharing is a little more complicated, it requires that all of the layers used in the map are also shared with the public.

Other approaches

There are many ways of making a simple map. Here are some alternative approaches.

  • By screen grabbing: Create a base layer by screen grabbing a source map displayed in a web browser window (e.g., Google Maps). Then, using a drawing tool (a dedicated drawing tool such as Adobe Illustrator, or any program that provides drawing tools such as Microsoft PowerPoint), import the screen grab and draw on top of that. [The following is probably too detailed…] It is possible to capture the base layer at higher-than-screen resolution by zooming in, panning and screen grabbing it in pieces, and merging the pieces using a tool like Adobe Photoshop. And by measuring distances between known points, and/or carefully keeping track of scale, it is possible to accurately position figures and annotations.

  • Google Earth: An in-browser tool that allows you to view and add data layers with high-resolution google imagery. There are some fee based services in Google Earth, and you may need a plan to view some features. Historical satellite imagery is available.

  • MapBox: Mapbox has more features available for mobile users. Maps can be viewed and edited on mobile devices.

  • OpenStreetMaps: OpenStreetMaps is open source, managed and created by users worldwide. This data can also be downloaded and added to GIS software like ArcGIS Pro or QGIS.

  • CalTopo comes with a variety of base layers, including multiple types of topographic maps, and it provides a number of drawing and annotation tools. Certain features may require a subscription.

Caveats of using ArcGIS Online

Two central concepts of open science are reproducibility, by which we mean the ability to inspect (if not re-execute or replicate) all the data sources, code, protocols, and other materials used in a study, and citation, the ability to persistently and openly refer to and access those same data sources, code, protocols, and other materials. Unfortunately, a proprietary, closed tool like ArcGIS Online fails to support open science in three important ways.

  • The artifacts one works with in ArcGIS Online (layers, maps, StoryMaps, etc.) are stored internally and inaccessibly in an unknown, proprietary format. The data can be viewed or otherwise accessed through ArcGIS Online to be sure, and perhaps edited if one has a paid subscription, but the data in its raw form is inaccessible.

  • The storage, commitment to persistence, and access costs of artifacts stored in ArcGIS Online are entirely dependent on a commercial company.

  • Artifacts such as maps can be identified by URLs, but not by the DOI identifiers that are commonplace in scholarly communication, and which are often required by publishers, citation tracking systems, and academic promotion committees.

An additional caveat that applies to all UI-based GIS tools, not just ArcGIS Online, is that operations are performed interactively. Unfortunately, interactive use does not create any kind of historical log of actions performed. While this style of interface allows for free and fast exploration, it comes at the cost of being able to reliably re-create processing steps. Notice in this workshop that the sequence of actions used to create your map are not recorded anywhere. For a map this may not matter, nor may it matter for a one-off analysis, but if you wanted to, say, apply the same set of steps to a new map, or if your work within ArcGIS Online involved spatial analysis, it will likely be critical that the processing steps be recorded in such a way that they can be inspected if not re-run.

ArcGIS Online is a powerful too, to be sure. But to use it in a way that supports open, reproducible science, we recommend that you:

  • Export newly-created feature layers as Shapefiles, and/or export attributes tables as CSV files, and make those files preserved and citable by storing in a data repository. Do not consider ArcGIS Online to be any kind of long-term repository.

  • Express significant computations programmatically, so that they can be inspected and re-run.

Source Code
---
title: "I want to make a map"
lightbox: true
---

The goal of this lesson is to demonstrate how to make a simple map, suitable for inclusion in a publication, using ArcGIS Online. As an exercise, you will be creating a map that reflects your personal experience biking on the UCSB campus. We will follow a typical workflow of:

1.  Start with a basemap
2.  Add feature layers from the UCSB campus
3.  Draw annotations on top of the map
4.  Prepare the map for presentation and export it

As we will describe under [Other approaches](#sec-other-approaches) at the end of this lesson, there are many tools and techniques that can be used to create such a map. An advantage of using a GIS tool such as ArcGIS Online, and the central motivation for using GIS in this lesson, is that a GIS tool allow maps elements to be interpreted and manipulated as data, and in this way spatial analysis becomes possible.

ArcGIS Online is but one of many GIS tools in existence. We use it in this lesson because it is in wide use in both commercial and academic settings. However, it is important to recognize that it is a proprietary and closed system that requires a paid subscription to use. We note limitations and ramifications of using ArcGIS Online on the reproducibility and citability of one's work under [Caveats of using ArcGIS Online](#sec-caveats) at the end of this lesson.

# Our goal for today

Our goal is to develop a map of the UCSB campus that illustrates the current bicycle infrastructure, specifically highlighting bike paths and racks. Additionally, the map will incorporate information about related incidents (crash, theft, ...) and proposed improvements.

[At the end of our session we should end up with something like this](https://arcg.is/0iD4jS0){target="_blank"}

![Preliminary version of the possible result](images/export-finish-map-2.png){#fig-prelim width="80%" fig-align="center"}

<br>

Our final interactive map is also embedded below:

<iframe width="900" height="700" allow="local-network-access; geolocation" title="Workshop campus bike map" src="https://ucsb.maps.arcgis.com/apps/mapviewer/index.html?configurableview=true&amp;webmap=2b16d246ee4c4321852712b9b4652b74&amp;theme=light&amp;scroll=false&amp;center=-119.847894,34.414117&amp;scale=9027.977411">

</iframe>

As we will discuss at the end of this lesson, there are many ways of making such a map without using a GIS tool. In fact, in many cases GIS is overkill, both because most of the features GIS tools provide will not be used and because the GIS interface can be cumbersome. But an advantage of GIS is that it opens up the possibility of treating map elements as data, and that in turn opens up and provides an introduction to the world of spatial analysis.

# Introduction to ArcGIS Online

A brief tour of the interface.

## Log on to ArcGIS Online

[https://ucsb.maps.arcgis.com](https://ucsb.maps.arcgis.com){target="_blank"}

**Sign on with your UCSB NetID**. You may need to enter "ucsb" into the url box. **Do not use the ArcGIS login!** This is for users who do NOT have a UCSB Net ID.

![ArcGIS Online login page for UCSB users](images/arcgis-login.png){#fig-arcgis width="40%" fig-align="center"}

You should have a similar landing page indicating that you are using the ArcGIS online under the UCSB license. *You may need to authenticate with DUO on your phone*.

## Tour of the user interface

The main organization page lists the campus administrative contacts and open data groups available on campus. You can also see the latest content published by users on your campus.

Along the top of the page, is the main tool bar.

![ArcGIS Online main menu bar](images/main-menu-bar.png){#fig-menubar width="90%" fig-align="center"}

-   `Home` will take you to the main landing page when you first sign in.
-   The `Gallery` contains items from our 'featured content' group
-   `Groups` are a list of groups which you can create or join. Some are invitation only. These are popular when you are working in group projects. For this workshop, we have created a group called [From Maps to Analysis](https://ucsb.maps.arcgis.com/home/group.html?id=92f4de804b2c46eaa70cebc517ecb067#overview){target="_blank"} which contains most of the data layers we will be using.
-   `Content` is where your created or uploaded content is listed. You can make folders in here to organize your layers and features.
-   `Notebooks` is ESRI's version of a Jupyterhub-like environment. You can use ArcPy here. This may not be available to you based on your user role.
-   `Organization` will take you back to our main page. This is not the same as Home.
-   `Scene`, or `Scene Viewer` is where you can create 3D GIS scenes, such as neighborhood models and digital twins.
-   `Map`, or `Map Viewer` is where you can create 2D maps. ***We will be focusing on using the Map Viewer for this workshop.***

## The Map Viewer

Open a new, empty map by clicking `Map` on your top menu bar.

![Opening a new empty map](images/new_empty_map.png){#fig-emptymap size="50%" fig-align="center"}

## Map main components

In the Map Viewer there is a menu bar in the left column. This is where you can add components to your map. The way to think about a map is that it is made of different layers that are added on top of each others. Each layer add a specific information to your map. In our example, we will have a layer for the bike paths, one for the bike racks, one for the buildings, and so on... The base layer is special and often made of an image (but does not have to be). It is called a 'basemap'. Here are the main components of your map:

-   Basemap (background)
-   Feature Layers (your own or imported from others)
-   Symbology & legend
-   Save and open...

## Basemap

The goal of a basemap, is to provide some context in terms of location and/or thematic. In ArcGIS online, a new map will always open with a basemap. Esri has about 20 different basemaps available. We will start with the default: the **Topographic** basemap.

![Default basemap](images/current-basemap.png){#fig-defaultmap width="90%" fig-align="center"}

In general, make sure you choose a basemap that is easy to follow and is accurate in relation to the goal of your map. Avoid using busy basemaps that provide a lot of information not be relevant to the purpose of your map and can become confusing as you add your other layers on top of it.

## Feature layers

Feature layers are the layers you add on top of your basemap. They are the main information your map is aiming at communicating. In ArcGIS, When you add an existing layer to your map, it will show up under your `Layers`. When you want to see the layer properties, you can either use the menu on the right hand column to view its properties or use the `...` (we call this a "meatball" menu) next to the layer to open the same panel.

## Save your work - Save early, save often

![open your menu bar to find the "save" icon](images/save.png)

-   There will be a blue dot next to the "save" icon until you save
-   Once you save, more options will be available
-   ArcGIS Online **will not auto-save** your map

# UCSB bike infrastructure map

With that introduction, you now have the opportunity to start creating your own map. The goal here is to create a map of the bike infrastructure on campus (bike lanes and line, bike racks as points, buildings as polygons) and to then annotate on top of that some of your personal experience as a bicyclist or pedestrian on campus.

## Step 1: Add layers to your map

### Import lines Feature layer (bike paths)

From the **Layers** panel, click on the add layer button. Search `My organization` for 'UCSB OSM Paths'. There should be only one result.

![Adding a layer](images/Workshop1/Step1/add-a-layer.gif){#fig-addinglayer width="90%"}

::: {.callout-tip collapse="true"}
## Challenge: Repeat the above steps to add the feature layer `bike_racks_ucsb` to your map.

### Import points layer (bike racks)

![Add UCSB bike racks layer](images/Workshop1/Step1/select-feature-point-layer.png){#fig-bikeracks width="80%"}
:::

::: {.callout-tip collapse="true"}
## Challenge: Find the 'From Maps to Analysis' group and add the `UCSB Campus Buildings` layer from there.

### Add a layer via Groups

![Add UCSB buildings layer](images/Workshop1/Step1/select-feature-polygon-layer.png){#fig-buildinglayers width="90%"}
:::

### "about the data" here? 

### Reorder layers

After importing the three layers, you'll notice they might not display optimally. There's a GIS convention for layer ordering that helps ensure all features remain visible:

**Layer Order Convention (top to bottom):**

-   Points (e.g., bike racks) - should be on top
-   Lines (e.g., bike paths) - in the middle\
-   Polygons (e.g., buildings) - at the bottom

This ordering ensures that smaller features aren't hidden beneath larger polygon areas.

For our map, the recommended order from top to bottom should be:

1.  `bike_racks_ucsb` (top)
2.  `UCSB OSM Paths` (middle)
3.  `UCSB Campus Buildings` (bottom)

To reorder the layers, click and hold on a layer name in the Layers panel, drag it to the desired position, and release.

![Reorder feature layers](images/Workshop1/Step1/reorder-layers.gif){#fig-reorderlayers width="90%" fig-align="center"}

### Accessing the underlying data

*Feature layers* are driven by data. Each point, line, or polygon has associated with it a row in an attribute table providing information on that specific record.

For example, if you click on the three dots on the right of a feature layer you can access their *attribute table* by selecting `Show table`.

![Attribute table of UCSB buildings layer](images/Workshop1/Step1/attribute-table.png){#fig-attribute width="90%"}

We will see later how you can leverage these attributes to set the symbology of a layer according to categories or quantities provided by the attribute table. You can also compute new attributes either based on other attributes or geospatial information. However this will be for our second workshop.

::: {.callout-note collapse="false" title="Save early. Save often."}
Now that you have added the layers to your map, save it by looking for the folder icon in the left menu bar and then selecting the `Save as` option.

![Save as dialog in ArcGIS Online](images/Workshop1/Step1/save-as.png){#fig-saveas width="40%" fig-align="center"}

In there, you can add a title, tags, and a short description of your map.
:::

## Step 2: Customize symbology & transparency

After adding our three layers, we have some work to do to make the map more readable. First, let's adjust the symbology of the bike racks layer to reduce its size and change its symbol to a bike icon.

-   Click on the layer `bike_racks_ucsb` to open its properties panel.
-   On the panel `Symbology`, click on `Edit layer style`.
-   Look for the `② Pick a style` option and select `Style options`.
-   Click on the pencil icon next to `Symbol style` to open the symbol selector.

There, we have multiple options to customize the symbol. Let's click on the current symbol chevron to open the full symbol gallery.

From the menu, we can select several categories of symbols. Let's select the `Government` category and look for a bike parking icon. Click on the `Done` button to apply the changes and return to the symbol style panel.

![Selecting a bike parking symbol from the Government category](images/Workshop1/Step2/symbology-select-symbol.png){#fig-bikeparking width="90%" fig-align="center"}

To change the size of the symbol, we can use the `Size` slider to reduce it to a more appropriate size. First, select "Adjust size automatically" to ensure the symbols to scale as you zoom in and out of the map. Then, you can use a custom size by moving the slider or entering a value; in our case, we selected 5.68 px.

::: {.callout-warning collapse="true" title="Size slider quirk"}
In ArcGIS Online, every time you select the "Adjust size automatically" option, it will reset the size slider to a default value. So make sure to select your desired size **after** enabling that option.

![Symbol size settings with adjust size automatically option](images/Workshop1/Step2/symbology-point-size.png){#fig-symbolsize width="70%"}
:::

### Adjust style based on attribute

Now, what if we wanted to adjust the symbology based on an attribute? Let's say we wanted to fill each building with a different color based on its use (academic, residential, administrative, etc.). We can do that by changing the style of the `UCSB Campus Buildings` layer.

-   Click on the layer `UCSB Campus Buildings` to open its properties panel.
-   On the panel `Symbology`, click on `Edit layer style`.
-   Look for the `① Choose attributes` option and select `+ Field`.
-   Select the attribute `b_use`, which stands for building use, and click on `Add`.

![Adjusting symbology style by attribute](images/Workshop1/Step2/symbology-by-attribute.png){#fig-symbolstyle width="90%" fig-align="center"}

As a result, you will see that the buildings are now filled with different colors based on their use. You can further customize the colors by clicking on the color ramp and selecting a different one.

![Buildings colored by their use category](images/Workshop1/Step2/symbology-by-attribute-result.png){#fig-buildingscolor width="90%" fig-align="center"}

::: {.callout-warning collapse="true" title="b_temp? b_phase"}
These field names are pretty cryptic. This is often the case with public data. If you want to learn more about this data, navigate over to the feature layer'
:::

### Adjust layer transparency based on attribute

Finally, let's say we wanted to adjust the transparency of cycleways based on the max speed allowed on each bike path. We can do that by changing the style of the `osm_cycleways` layer.

-   Click on the layer `osm_cycleways` to open its properties panel.
-   On the panel `Symbology`, click on `Edit layer style`.
-   Look for the `② Pick a style` option and select `Style options`.
-   Open the panel `Transparency by attribute` and switch the toggle to set the transparency based on attribute values.
-   Select the attribute `maxspeed`.

As a result, you will see that the bike paths are now more transparent for higher speed limits and less transparent for lower speed limits.

To increase the visibility of the bike paths, we can increase the width of the lines by editing the `Width` slider on the `Symbol style` panel. We selected 3.75 px for this example.

![Setting transparency by maxspeed attribute](images/Workshop1/Step2/symbology-transparency-by-attribute.png){#fig-transparency width="90%" fig-align="center"}

Here is the final result of our symbology adjustments:

![Map with all symbology adjustments applied](images/Workshop1/Step2/symbology-final-result.png){#fig-allsymbols width="90%" fig-align="center"}

### Select a better basemap

After adding the layers and customizing their symbology, we have a good, almost ready map. However, the current basemap (Topographic) is a bit too busy and makes it hard to see the features we added. Let's change it to a simpler basemap using the `Basemap` option in the left menu bar.

![Basemap option in the left menu bar](images/Workshop1/Step2/basemap-menu-location.png){#fig-basemapoption width="40%" fig-align="center"}

From the basemap gallery, we can select a simpler basemap. For this example, we selected the `Light Gray Canvas` basemap, which provides a clean background that makes our features stand out.

![Map with Light Gray Canvas basemap](images/Workshop1/Step2/basemap-light-gray-canvas.png){#fig-lightgray width="90%" fig-align="center"}

**Don't forget to save your map after making these changes!**

## Step 3: Annotate the map

In addition to bringing external sources of information into a map (whether in the form of a basemap or additional feature layers), it is common to want to add new information. In many cases it is better to think of the new information as data, and to store it in its own feature layer. We will be describing this approach in the next workshop. For our purposes here, though, we will take the more straightforward approach of simply drawing on the map. The hand-drawn features will appear in what ArcGIS Online calls a "sketch layer."

![Sketch layer option in the left menu](images/Workshop1/Step3/drawing-sketch-layer-menu.png){#fig-sketchlayer width="40%" fig-align="center"}

After adding the sketch layer to your workspace, a new menu will appear in the right column with drawing tools and configuration options.

![Sketch layer drawing tools menu](images/Workshop1/Step3/drawing-sketch-bar-menu.png){#fig-drawingtools width="40%" fig-align="center"}

### Drawing points in a sketch layer

-   Draw points where you were in a (near-)accident on a bike path, either as bicyclist of pedestrian.

Zoom in to the location and add a point with the point drawing tool. You can customize the symbol, size, and color of the point in the sketch layer menu before adding it to the map. Put as many points as you like.

In our example, we add the following settings to the point symbol:

-   Size: 48 px
-   Vector marker (background): Blue (#2132cf)

![Point symbol customization settings](images/Workshop1/Step3/drawing-point-vector.png){#fig-pointsymbol width="90%" fig-align="center"}

### Challenge: Drawing lines and circles in a sketch layer

-   Draw a line where you think there should be a bike path but isn't.

From the sketch layer menu, select the line drawing tool. Click on the map to start drawing the line, and click again to add vertices. Double-click to finish the line.

![Drawing a line on the map](images/Workshop1/Step3/drawing-line-vector.gif){#fig-drawingline width="90%" fig-align="center"}

You can customize the line symbol in the sketch layer menu before adding it to the map. In our example, we add the following settings to the line symbol:

-   Width: 5 px
-   Dotted line pattern
-   Color: Light blue (#00c8ff)

![Line symbol customization settings](images/Workshop1/Step3/drawing-line-style.png){#fig-linesymbol width="90%" fig-align="center"}

-   Draw a circle where you think there should be a bike parking lot but isn't.

Similarly to the line drawing tool, select the circle drawing tool from the sketch layer menu. Click on the map to draw the circle, and click on the select tool to finish the shape. You can also customize the symbol after drawing it by selecting it and changing its properties in the sketch layer menu. In our example, we add the following settings to the circle symbol. You can type in the values, or interactively select as in the animated figure.

-   Fill color: Red (#d13434)
-   Fill transparency: 38%

![Drawing a circle on the map](images/Workshop1/Step3/drawing-circle-vector.gif){#fig-drawingcircle width="90%" fig-align="center"}

Finally, let's rename the sketch layer to "Annotations" to better reflect its purpose. Click on the three dots next to the sketch layer and select `Rename`. Enter the new name and click `OK`.

**Save your map after making these changes**

## Step 4: Prepare the map for publication

Almost there! At this point you're ready to start packaging your map for publication.

### Fine tune symbols

Some of the bike racks are too close together. For point data, we have the option of using 'proportional symbols' or 'clustered symbols' to solve this visual clutter.

**To do**: Instructions for using clustered symbols for the bike racks layer to reduce visual clutter.

To do that, you need to look for the `Print` option in the left menu bar.

![Print option in the left menu bar](images/Workshop1/Step4/export-print-menu.png){#fig-printoption width="40%" fig-align="center"}

For exporting the map you have two options:

-   Layout: This option allows you to create a more complex layout with additional map elements such as title, legend, scale bar, north arrow, etc. You can choose from several pre-defined templates or create your own custom layout.
-   Map only: With this option, you can export just the map itself without any additional elements. You can choose the file format (PNG, PDF, etc.) and the resolution of the exported map.

For our purposes, we will select the `Layout` option to create a more complete map for publication.

In the layout menu, you can change the title of the map, select a `Template` (which is basically a standard page size and orientation), and select the `File format` for the export (e.g., PNG, PDF).

You can also customize more the layout by enabling the `Advance options` panel. You can set the scale, add an author name, include copyright information, increase or decrease the resolution, indicate the [output spatial reference](https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references/){target="_blank"}, and select to include legend, north arrow, and scale bar.

Adjust the zoom and position of the map in the preview window to ensure everything is visible and well-framed.

![Map export layout configuration panel](images/Workshop1/Step4/export-layout-menu.png){#fig-exportlayout width="90%" fig-align="center"}

## Step 5: Share your map

When you're satisfied with the layout and settings, click on the `Export` button to generate the map. Depending on the selected file format and resolution, it may take a few moments to process the export.

The result will be list on the `Exports` panel, where you can save the file to your computer by clicking on the three dots next to the export and selecting `Save as`.

![Saving exported map from the Exports panel](images/Workshop1/Step4/export-save-as.png){#fig-savingmap width="40%" fig-align="center"}

This will save the exported map to you ArcGIS Online content. You can access it later from the `Content` menu in the top menu bar. The new item will be available as an Image file that you can download to your computer.

![Downloading the exported map image from ArcGIS Online content](images/Workshop1/Step4/export-download-image.png){#fig-downloadmap width="90%" fig-align="center"}

![Jon's results are a bit different](images/export-finish-map-2.png){width="90%" fig-align="center"}

**NOTE**: Public sharing is a little more complicated, it requires that all of the layers used in the map are also shared with the public.

# Other approaches {#sec-other-approaches}

There are many ways of making a simple map. Here are some alternative approaches.

-   By screen grabbing: Create a base layer by screen grabbing a source map displayed in a web browser window (e.g., Google Maps). Then, using a drawing tool (a dedicated drawing tool such as Adobe Illustrator, or any program that provides drawing tools such as Microsoft PowerPoint), import the screen grab and draw on top of that. \[The following is probably too detailed...\] It is possible to capture the base layer at higher-than-screen resolution by zooming in, panning and screen grabbing it in pieces, and merging the pieces using a tool like Adobe Photoshop. And by measuring distances between known points, and/or carefully keeping track of scale, it is possible to accurately position figures and annotations.

-   [Google Earth](https://earth.google.com/): An in-browser tool that allows you to view and add data layers with high-resolution google imagery. There are some fee based services in Google Earth, and you may need a plan to view some features. Historical satellite imagery is available.

-   [MapBox](https://www.mapbox.com/): Mapbox has more features available for mobile users. Maps can be viewed and edited on mobile devices.

-   [OpenStreetMaps](https://www.google.com/maps): OpenStreetMaps is open source, managed and created by users worldwide. This data can also be downloaded and added to GIS software like ArcGIS Pro or QGIS.

-   [CalTopo](https://caltopo.com) comes with a variety of base layers, including multiple types of topographic maps, and it provides a number of drawing and annotation tools. Certain features may require a subscription.

# Caveats of using ArcGIS Online {#sec-caveats}

Two central concepts of open science are **reproducibility**, by which we mean the ability to inspect (if not re-execute or replicate) all the data sources, code, protocols, and other materials used in a study, and **citation**, the ability to persistently and openly refer to and access those same data sources, code, protocols, and other materials.  Unfortunately, a proprietary, closed tool like ArcGIS Online fails to support open science in three important ways.

- The artifacts one works with in ArcGIS Online (layers, maps, StoryMaps, etc.) are stored internally and inaccessibly in an unknown, proprietary format. The data can be viewed or otherwise accessed *through* ArcGIS Online to be sure, and perhaps edited if one has a paid subscription, but the data in its raw form is inaccessible.

- The storage, commitment to persistence, and access costs of artifacts stored in ArcGIS Online are entirely dependent on a commercial company.

- Artifacts such as maps can be identified by URLs, but not by the DOI identifiers that are commonplace in scholarly communication, and which are often required by publishers, citation tracking systems, and academic promotion committees.

An additional caveat that applies to all UI-based GIS tools, not just ArcGIS Online, is that operations are performed interactively.  Unfortunately, interactive use does not create any kind of historical log of actions performed.  While this style of interface allows for free and fast exploration, it comes at the cost of being able to reliably re-create processing steps.  Notice in this workshop that the sequence of actions used to create your map are not recorded anywhere.  For a map this may not matter, nor may it matter for a one-off analysis, but if you wanted to, say, apply the same set of steps to a new map, or if your work within ArcGIS Online involved spatial analysis, it will likely be critical that the processing steps be recorded in such a way that they can be inspected if not re-run.

ArcGIS Online is a powerful too, to be sure. But to use it in a way that supports open, reproducible science, we recommend that you:

- Export newly-created feature layers as Shapefiles, and/or export attributes tables as CSV files, and make those files preserved and citable by storing in a data repository. Do not consider ArcGIS Online to be any kind of long-term repository.

- Express significant computations programmatically, so that they can be inspected and re-run.