Create a web map

ArcGIS Living Atlas, a curated collection of geographic content from around the globe, provides satellite imagery layers that can be used for analysis. In this tutorial, you'll use one of these layers, Sentinel-2 Level-2A, for your analysis of algae blooms. You'll create a web map and add the imagery layer to it. Then, you'll locate your study area: Clear Lake, California.

Add imagery to a web map

First, you'll create a web map and add satellite imagery from ArcGIS Living Atlas to it.

  1. Sign in to your ArcGIS organizational account.
    Note:

    If you don't have an organizational account, see options for software access.

  2. On the ribbon, click Map.

    Map tab

    A new web map appears in Map Viewer.

  3. In the Layers pane, click Add.

    Add button

  4. In the Add layer pane, click My content and choose Living Atlas.

    Living Atlas option

    For this analysis, you'll need a multispectral imagery layer that contains spectral bands at wavelength ranges that are sensitive to chlorophyll, a green pigment found in plants and algae. The Sentinel-2 satellite collects light in the red edge and red bands, which can detect chlorophyll in algae based on the way that the algae reflect sunlight. You'll search for a Sentinel-2 layer to add to the map.

    Note:

    Sentinel-2 is a satellite mission launched by the European Space Agency in 2015. It produces multispectral imagery with 13 spectral bands, several of which have a 10-meter resolution. The images cover Earth's land surfaces, and every place on Earth is captured at least once every five days.

    To learn more about multispectral imagery and spectral bands, see the Get started with imagery tutorial.

  5. In the search bar, type Sentinel-2 and press Enter.
  6. In the list of results, for the Sentinel-2 Level-2A layer, click Add.

    Add button for the Sentinel-2 Level-2A layer

    The imagery layer appears in the web map.

    Sentinel-2 layer on the map

  7. In the Add layer pane, click the Back button to return to the Layers pane.

    Back button

    The Sentinel-2 Level-2A layer is listed in the Layers pane.

    Layers pane

Navigate to the area of interest

Next, you'll navigate to the study area and save your web map.

  1. On the map, click the Search button.

    Search button

  2. In the search bar, type Clear Lake, CA, USA and press Enter.

    Clear Lake in the list of search results

    The map zooms to the study area and a pop-up appears.

  3. Close the Search result pop-up.

    Close button

  4. If necessary, zoom and pan around so that the entire lake is visible and fills the display of the map.

    Clear Lake on the map

    Note:

    As new images are constantly being added to the Sentinel-2 Level-2A layer, your map might look slightly different than the example images.

    Next, you'll save your map.

  5. On the Contents (dark) toolbar, click Save and open and choose Save as.

    Save as option

  6. In the Save map window, enter the following information:
    • For Title, type Algae changes in Clear Lake, CA 2019 vs. 2024.
    • For Tags, type Imagery, Multispectral, and Sentinel-2, pressing Enter after each tag.
    • For Summary, type This is a map of the difference in chlorophyll concentrations due to algae activity in Clear Lake between 2019 and 2024.
  7. Click Save.

You created a web map, added imagery from ArcGIS Living Atlas to it, and located your study area.


Find and prepare images for analysis

The Sentinel-2 Level-2A layer contains hundreds of thousands of images captured between 2016 and the present. You'll select specific images in that dataset and prepare them for your analysis.

Algal blooms commonly occur in Clear Lake in the spring and late summer. This is when the water is warm and there is a good amount of sunlight. In these periods, there is also more nutrient pollution entering the lake in the form of agricultural runoffs and other human activities. In mid-May 2024, there was a particularly strong case of algal bloom in Clear Lake. So, you decide to compare an image taken in May 2024 to an image taken five years earlier in May 2019.

Note:

Learn more about this topic in the article Clear Lake Clouded by Algae.

Build a filter

First, you'll build a filter to reduce the number of images in the Sentinel-2 Level-2A dataset based on the year and month they were taken. This will make it easier to find specific images for your analysis. You'll filter the dataset to images taken in either May 2019 or May 2024.

Note:

Learn more about filter expressions and how to create a filter.

  1. On the Settings (light) toolbar, click Filter.

    Filter button

  2. In the Filter pane, click Add new.

    Add new button

    An empty condition appears.

    Empty condition

    First, you'll build the condition to find the May 2019 images.

  3. Under Condition, click name. In the Replace field window, scroll down and click Year.

    Year field

  4. In the third box, type 2019.

    The condition reads: Year is 2019.

  5. Next to Condition, click the Options button and choose Add condition.

    Add condition option

    The condition becomes a condition group with two separate conditions connected by an AND statement.

  6. In the second condition (after AND), change name to Month. In the third box, type 5 (May is the fifth month of the year).

    The complete condition reads: Year is 2019 AND Month is 5.

    Month is 5 expression

    Next, you'll build the condition to find the May 2024 images.

  7. Next to Condition group, click the Options button and choose Duplicate.

    Duplicate option

    The condition group is duplicated so that there are two condition groups connected by an AND statement. Since it's not possible that the same image was taken in 2019 and in 2024, you need to connect the condition groups with an OR statement.

  8. At the top of the Filter pane, for Show features where, choose Any of the following are true, which corresponds to an OR statement.

    Any of the following are true option

    The first condition group and second condition group are now connected by OR.

  9. In the second condition group (after OR), update the year to 2024.

    The second condition group reads Year is 2024 AND Month is 5.

    Condition group

  10. At the bottom of the pane, click Save.

    Save button

    You have created a filter so that the Sentinel-2 Level-2A layer is now limited to images taken in May 2019 or May 2024.

Select images taken in 2019 and 2024

You'll find two images, one taken in May 2019 and the other in May 2024. You'll do this using the Image collection explorer.

  1. On the Settings toolbar, click Image collection explorer.

    Image collection explorer button

    You'll update a few display settings to help you select images more effectively.

  2. In the Image collection explorer pane, click the List settings button.

    List settings button

  3. In the List settings window, uncheck objectid and name.

    List settings window

  4. Check acquisitiondate. Turn on the Show thumbnails toggle button and click Done.

    Show thumbnails option

    The image cards in the Image collection explorer pane update to show the acquisition date, that is, the date each image was acquired by the sensor. They also display thumbnails of each image. You can use these thumbnails to preview the image before adding them to your map.

  5. In the Image collection explorer pane, click the Sort by button.

    Sort by button

    You'll sort the images to prioritize those with low cloud cover. Especially in May, clouds frequently obscure the full extent of Clear Lake, which could affect the analysis.

  6. In the Sort window, for Sort by field, choose cloudcover and click Done.

    Sort by cloudcover field

    The images are now ordered from the least to the most cloud cover. First, you'll choose an image taken in May 2024.

  7. In the Image collection explorer pane, scroll through the results.

    The further down you scroll, the more clouds appear in the thumbnail.

  8. Locate the image taken on May 16, 2024 (S2A_MSIL2A_20240516T185921_N0510_R013_T10SEJ_20240517T174345).

    May 16, 2024 image

    This image was taken in mid-May 2024 when the strong algae bloom was observed, and it still has rather low cloud cover. You'll choose it for your analysis.

    Note:

    In addition to the time filter you applied to the layer, the image cards available in the Image collection explorer pane are based on the display extent of the map. If the image above does not appear early in the list, try zooming in so that the lake fills the entire map.

    You'll add this image to the map.

  9. For the image taken on May 16, 2024 , click the Add image to map button.

    Add image to map button

  10. In the Title window, type After image (05/16/2024) and click Done.

    Title field

    In the Layers pane, the image appears as a new layer, and it also displays on the map.

    Layers pane

    Next, you'll choose an image taken in May 2019.

  11. In the Layers pane, click the Sentinel-2 Level-2A layer to select it.
  12. In the Image collection explorer pane, find the first result taken in 2019 ( S2B_MSIL2A_20190505T184929_N0212_R113_T10SEJ_20201006T103206, acquired on May 5, 2019), confirm there is low cloud cover over the study area, and add it to the map.

    May 5, 2019 image

  13. In the Title window, type Before image (05/05/2019) and click Done.

    Title field

    To better see the images you added, you'll turn off the Sentinel-2 Level-2A layer.

  14. In the Layers pane, point to the Sentinel-2 Level-2A layer and click the visibility button to hide it.

    Visibility button for Sentinel-2 Level-2A

  15. Turn the Before image (05/05/2019) layer on and off repeatedly to compare the two images visually.

    Visibility button for Before image (05/05/2019)

    In the 2024 image (right), you can see the algal blooms forming green swirls in the lake.

    Two images on the map

  16. When you are done observing, turn the Before image (05/05/2019) layer back on.
  17. Save your map.

Prepare the imagery for analysis

Next, you'll change the display of the images to make all the spectral bands available for analysis. By default, a processing template that displays the layer using the natural color spectral bands (red, green, and blue) is applied to the layer. This processing template limits the bands available for analysis, so you'll ensure that no processing template is applied.

Caution:

The analysis you'll run in the next module will fail if all the spectral bands are not available for analysis.

  1. If necessary, in the Layers pane, click the Before image (05/05/2019) layer to select it.
  2. On the Settings toolbar, click the Processing templates button.

    Processing templates button

  3. In the Processing templates pane, scroll to the end of the list, choose None, and click Done.

    None option

    The image updates to display as solid gray. However, this is just temporary.

  4. In the Layers pane, click the After image (05/16/2024) layer to select it.
  5. Similarly, change the processing template for the after image to None and click Done.

    You'll double-check that all the spectral bands for the two images are now accessible for analysis. You'll start with the After image (05/16/2024) layer, which is currently selected.

  6. On the Settings toolbar, click the Styles button.

    Styles button on the Settings toolbar

  7. In the Style pane, on the RGB style card, click Style options.

    Style options button

  8. In the Style options pane, click B4_Red.

    B4_Red selection

    A list of 13 spectral bands appears.

    List of spectral bands

    When you applied the None processing template to your images, you made all the spectral bands associated with this image available to work with, which is why they are listed here.

  9. Similarly, ensure all the spectral bands for Before image (05/05/2019) are accessible for analysis.
    Note:

    When you entered the Style options, the two images changed back from solid gray to a regular display.

  10. Save the map.

You filtered the Sentinel-2 Level-2A layer for images taken in May 2019 and May 2024. You found two images and changed their display settings to prepare them for analysis. Next, you'll use these images as input to a raster function template that analyzes change in chlorophyll concentrations.


Calculate differences in chlorophyll concentration

You'll analyze the images you prepared to understand the change in chlorophyll concentrations in Clear Lake between May 2019 and May 2024. Then, you'll style and explore the results of your analysis.

Open the raster function template

To analyze your images, you'll use them as input to a raster function template (RFT), which is several raster functions chained together. You'll use a preexisting RFT that was shared in ArcGIS Online. First, you'll find the RFT and examine its contents.

  1. On the Settings toolbar, click Analysis.

    Analysis button

  2. In the Analysis pane, click Raster Function Templates.

    Raster Function Templates button

  3. In the Raster Function Templates pane, click the Browse Raster Function Templates button.

    Browse Raster Function Templates button

  4. In the Browse Raster Function Templates window, click My content and choose ArcGIS Online.

    ArcGIS Online option

  5. In the search bar, type Algae analysis owner:Esri_Tutorials.
  6. Click the Algae bloom analysis – RFT result to select it and click Confirm.

    Algae bloom analysis – RFT result

    The template opens in Raster Function Editor.

    Monitor algae raster function template

    The RFT contains several functions chained together. It starts with the input data (in green); the first function in the chain processes the input data, and that output is used as input to the second function in the chain. Processing continues from left to right until the chain ends, and then the final output is added to the map.

    Note:

    Learn more about how to create a raster function template in Map Viewer.

  7. In the Raster Function Editor window, click the Zoom in button until you can see the function titles.

    Zoom in button

  8. Click the Pan button and pan around the window to explore the RFT.

    Pan button

    This RFT performs the following processes:

    The first nodes, Old image and New image, represent the input data.

    RFT parameters

    The following group of raster functions identifies the water pixels in each input image and extracts them to locate the water bodies (for instance, Clear Lake):

    RFT parameters part 2

    The Algal growth index NDCI function uses the red edge and red spectral bands to compute the Normalized Difference Chlorophyll Index (NDCI), which measures chlorophyll concentration, in each image. The Remove outliers function removes any values outside the expected NDCI range.

    RFT parameters part 3

    Finally, the Max algae concentration between two years function calculates the difference in NDCI between the 2019 and 2024 images.

    RFT parameters part 4

    The output of this RFT is an imagery layer in which each pixel represents the change in NDCI from 2019 to 2024.

    Note:

    To learn more about each function, double-click the function in Raster Function Editor to view its properties.

Run the analysis

Now that you understand how the RFT processes the input data, you'll run the analysis.

Caution:

A hidden layer cannot be used as input to analysis. Before running analysis, make sure the two image input layers have their visibility turned on in the Layers pane.

  1. In the Raster Function Editor window, click the Open to run button.

    Open to run button

    The RFT pane appears.

    Waterbodies extraction layers

    The two variables, New image (After) and Old image (Before), will enable you to specify your input images.

    Note:

    Any raster function with exposed parameters, or variables, will appear in the template pane when you open it to run. You may need to modify or provide input to variables before the RFT can run. You can choose which parameters to expose as variables by modifying the raster function properties in Raster Function Editor.

  2. In the RFT pane, for the New image (After) variable, choose After image (05/16/2024).

    After image (05/16/2024) option

  3. For the Old image (Before) variable, choose Before image (05/05/2019).
  4. Under the Result layer group, for Output name, type MonitorAlgaeResult followed by your name or initials.

    Output name parameter

    Note:

    As you create any new layer in ArcGIS Online, you must ensure its name is unique across your organization. In this tutorial, you'll do that by adding your name or initials to the end of its name.

  5. Expand the Environment settings group and verify Processing extent is set to Display extent.

    Display extent option

    This option indicates that only the area currently shown in your map will be processed. This ensures that you won't process a very large extent without realizing it, which would take longer and cost you more credits.

  6. If necessary, on the map, adjust the current view to ensure that it is mostly filled with the lake.

    Adjusted map extent

  7. At the bottom of the pane, click Estimate credits.

    Estimate credits button

    Tip:

    Always estimate the credit consumption of an analysis run to prevent unnecessary credit usage, especially for large imagery datasets, like Sentinel-2 Level-2A.

    After a few moments, the number of credits the analysis will cost appears. This analysis costs approximately 2 credits. If the credit consumption you see does not match this estimation, try zooming in so that only the lake fills the extent of the map. The RFT is ready to run.

    Note:

    This RFT may take around 2 to 7 minutes to run. If you want to save time, instead of running the RFT, you can add a result layer that has already been prepared for you. In the Layers pane, click Add Layer. Click My content and choose ArcGIS Online. In the search bar, type Clear Lake analysis owner:Esri_Tutorials. For the Clear Lake analysis final result layer, click the Add button. Then, skip the next three steps.

  8. Click Run.
    Note:

    If this step fails, it is likely because the Raster Analysis with Living Atlas data option is not enabled for your organization. If necessary, talk to your system administrator.

  9. At the top of the pane, click the History tab.

    History tab

    When the process is complete, the status message updates to say so.

    Completed process message

    The result layer appears in the Layers pane.

    New layer in the Layers pane

  10. In the Raster Function Editor window, click the Close button.

    Close button

    The result appears in your web map.

    Algae analysis result

    By default, the result layer appears in gray tones. To better visualize it, you'll change its style.

Style and explore the results

Currently, the result layer appears in gray tones with the Stretch style applied. You'll switch to the Classify style to better visualize the data and change the color scheme. Then, you'll explore the results of your analysis.

Note:

The Classify option allows you to group pixel or cell values into a specified number of classes and display each class with a given color. Learn more about the Classify and Stretch styles.

First, you'll use the layer Sentinel-2 Level-2A layer as the background.

  1. In the Layers pane, turn off the Before image and After image layers, turn on the Sentinel-2 Level-2A layer, and confirm the MonitorAlgaeResult layer is turned on.

    Four layers in the Layers pane

    Next, you'll style the result layer.

  2. In the Layers pane, confirm that the MonitorAlgaeResult layer is selected.
  3. On the Settings toolbar, click the Styles button.

    Styles button

  4. In the Style pane, click the Classify style card.

    Classify style

    The map updates with the new style.

    Classify symbolized map

  5. On the Classify style card, click Style options.
  6. In the Style options pane, for Class breaks, confirm Method is set to Natural breaks.

    The default classification method finds natural breaks in the data by identifying groups of pixels with similar values.

  7. For Number of classes, keep the default value of 5.

    Style options parameters

    Note:

    To learn more about classification methods, including Natural Breaks, see the Classification methods documentation page.

    Next, you'll change the color scheme.

  8. In the Style options pane, click the Color scheme color bar.

    Color scheme option

  9. In the Color scheme window, click the Colors color bar.
  10. In the Ramp window, click the Yellow to Dark Red color ramp.

    Yellow to Dark Red color ramp

  11. Click Done. Close the Color scheme window.

    The map updates.

    Yellow to red symbology

    Next, you'll add meaningful labels to the five classes.

  12. In the Style options pane, under Data range, review the label for the first class interval.

    Label for the first class interval

    The class, symbolized using a dark red color, includes pixel values with the largest positive difference in NDCI from 2019 and 2024. This corresponds to areas where the chlorophyll concentration has significantly increased between these two dates.

  13. For the first class, click the label, replace the existing text with Very high increase, and press Enter.

    Very high increase label

  14. Change the other class labels so that they form the following list:
    • Very high increase
    • High increase
    • Moderate increase
    • Low increase
    • Decrease or no increase

    New labels

    Note:

    If you ran the analysis over a slightly different extent, the value ranges on the example images above may not exactly match what you have. Intervals that contain positive values represent increases in concentration. Intervals that contain negative values represent decreases in concentration. Use this information to label the classes appropriately.

  15. In the Style options pane, click Done. Click Done again.

    You'll turn on the legend to better interpret the results.

  16. On the Contents toolbar, click Legend.

    Legend button on the Contents toolbar

    The Legend pane appears.

    Legend result

    Some areas of the lake appear in dark red, for instance in the central and southeastern parts, indicating that algae activity has significantly increased there. This information will be key to help the community track down the causes for algae bloom, such as nutrient pollution entering the lake in the form of wastewater or agricultural runoffs. As they plan for remediation strategies to improve the lake's health, they could repeat the same analysis on future satellite imagery to monitor progress.

  17. Save the map.
    Note:

    Going further, you could use this raster function template to perform analysis for a different study area (large, shallow lakes work best), with a different dataset (like the analysis-optimized Landsat Level-2 and NAIP layers), or for different time periods (for example, besides May, August-October are also reliable dates to find algae blooms in Clear Lake).

In this tutorial, you used multispectral imagery to analyze changes in chlorophyll caused by algae activity in Clear Lake, California. You created a web map and added analysis-optimized Sentinel-2 imagery from ArcGIS Living Atlas to it. You used a query to filter the imagery, selected two images taken in May 2019 and 2024, and changed the image display settings to prepare them as input to analysis. You used the two images as input to a raster function template that calculates the difference in chlorophyll concentrations, styled the result layer, and explored the results of the analysis for Clear Lake.

You can find more tutorials about imagery in the Introduction to Imagery & Remote Sensing tutorial collection and the Use imagery in ArcGIS Online tutorial series.

You can find more tutorials in the tutorial gallery.