Analyze bus stop distribution

Before you can perform your analysis, you'll access and save a copy of an existing map with data from the City of Cape Town.

Access and save a map

First, you'll open an existing map in Map Viewer.

  1. Open the Bus Stops web map.

    You are asked to sign in to your ArcGIS account.

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

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

  3. Explore the map.

    The map has three layers, two of which are visible. The bus stops are represented as points, and subplace boundaries that divide the city are shown as polygons. A layer representing the city's boundaries is currently turned off and will be used later in the tutorial.

    Map of bus stops and subplace boundaries across the city

    Next, you'll save a copy of this map to your account.

  4. On the Contents (dark) toolbar, click Save and open. Choose Save as.

    Save as option

    The Save map window appears.

  5. Click Save.

    Click Save.

    You now have a copy of the map saved to your ArcGIS account.

Visualize subplace population

Before performing any analyses, you'll compare the locations of bus stops to the population count for each subplace.

  1. On the Contents (dark) toolbar, click Layers. In the Layers pane, select the SubPlace Boundaries layer.

    SubPlace Boundaries layer selected

    Now, you'll symbolize the subplaces based on their population.

  2. On the Settings (light) toolbar, click Styles.

    Click the Styles button.

  3. In the Styles pane, under Choose attributes, click the Field button.

    Field button

  4. In the Select fields window, select 2021 Total Population.

    2021 Total Population field selected

  5. Click Add.

    By default, the map displays the population as orange circles that are centered in the subplace that they represent.

    Default map symbology for the 2021 Total Population attribute

    You'll update the symbology to show the population count as shades of color that fill the subplace polygons.

  6. In the Styles pane, under Pick a style, click Counts and Amounts (color).

    Counts and Amounts (color)

    The map symbology updates. The areas with a higher population are a darker shade of blue than those with lower populations.

    Map with Counts and Amounts (color) symbology

    Next, you'll turn on labels for the bus stops.

  7. On the Settings toolbar, click Labels.

    Labels option

  8. Click Add label class.

    Label class for Stop Name added

    A label class using the Stop Name field is added and the labels appear on the map.

  9. Zoom in, pan around the map, and explore the populations near the bus stop locations.

    Bus stops and subplace populations

  10. In the Label features pane, click Enable labels to turn the labels off and close the Label features pane.

    You have opened and saved a web map, modified a layer's symbology, and enabled labels for the bus stops.

  11. On the Contents toolbar, click Save and open and choose Save.

Calculate bus stop distribution

Now that you've explored the subplace population and the bus stop locations, you'll use the Summarize Within tool to count the number of bus stops in each subplace.

  1. On the Settings toolbar, click  Analysis.

    Analysis tab

    The Analysis pane appears.

  2. In the Analysis pane, click Tools.

    Analysis pane

    The Tools pane appears. All the tools for analyzing your data are available here.

  3. Under Summarize data, choose Summarize Within.

    Summarize Within tool

    You'll set the parameters before you run the tool.

    The first input is for the features that you want to summarize. In this case, it's the bus stop locations.

  4. In the Features to summarize section, under Input features, click Layer.

    Layer button

  5. In the Select layer window, choose Bus Stops.

    Bus Stops layer selected

    The Bus Stops layer has been selected and there are 955 bus stops in this dataset.

    The Input features parameter

    Next, you'll choose how you want to summarize the bus stop locations. They will be summarized by the subplace polygons. In other words, each subplace will be given a count of the number of bus stops inside its boundaries.

  6. In the Summary areas section, for Summary polygon layer, click Layer. Choose SubPlace Boundaries.

    The Summary polygon layer parameter

    There are 22,108 features in the boundaries dataset.

    Next, you'll provide a name for the output dataset.

  7. In the Result layer section, for Output name, type Bus Stops by SubPlace.

    Output name parameter

    Before running the tool, you'll calculate the number of credits that this tool will use. The number of credits used varies by tool and the number of input features.

    Note:

    To learn more, see Credits by capability.

  8. Click Estimate credits.

    Estimate credits button

    With the default settings, this tool will consume over 23 credits.

    The estimated credit consumption

    Currently, this tool will consume 23 credits because of the number of features in the input layers. Specifically, the subplace boundary layer has more than 22,000 features. However, most of the subplace boundaries are not relevant to your analysis in Cape Town. To reduce the number of credits used, you'll only run the tool for your project area around the city. To do this, you'll ensure that only Cape Town and the surrounding area is visible on the map.

  9. In the Layers pane, for the Bus Stops layer, click Options. Choose Zoom to.

    Zoom to layer option

    The map extent updates to show Cape Town and some of the surrounding region.

    The map extent for Cape Town

    Next, you'll have the Summarize Within tool only process features within this map extent.

  10. In the Summarize Within pane, expand Environment settings. For Processing extent, choose Display extent.

    Display extent selected

  11. Next to Estimated credits, click the Refresh button.

    Refresh button

    Now, the tool will only use about 2 credits for this analysis.

  12. Click Run.
    Note:

    The tool may take a minute or two to run.

    The Bus Stops by SubPlace layer is added to the map. To increase this layer's visibility, you'll turn off some of the layer in the map.

  13. In the Layers pane, turn off the Bus Stops and SubPlace Boundaries layers.

    Bus Stops and SubPlace Boundaries layers turned off

    The number of bus stops in each subplace is symbolized by various shades of color. If a subplace has more bus stops, it is shaded with a darker color.

    Bus Stops by SubPlace layer

    However, this dataset covers an area larger than Cape Town. To reduce this dataset to the area of interest, you'll use the Overlay Layers tool.

  14. In the Summarize Within pane, click the Back button.

    Back button

    Next, you'll open the Overlay Layers tool. This tool will clip the Bus Stops by SubPlace layer to the City of Cape Town Boundaries layer.

    Note:

    If you want to see the boundaries for Cape Town displayed on the map, in the Layers pane, turn on the City of Cape Town Boundaries layer. The layer does not need to be visible to be used for analysis.

  15. In the Tools pane, expand Manage data. Choose Overlay Layers.

    Overlay Layers tool

    For the first parameter, you'll choose the layer that you want to clip.

  16. For the Overlay Layers tool, set the following parameters:
    • Under Input features, for Input features, click Layer and choose Bus Stops by SubPlace.
    • For Overlay features, click Layer and choose City of Cape Town Boundaries.

    Input features and Overlay features parameters set

  17. Under Result layer, for Output name type Cape Town SubPlaces.
  18. Click Estimate credits.

    The tool will consume about 1 credit.

  19. Click Run.
    Note:

    The tool may take a minute or two to run.

    When the tool finishes, the Cape Town SubPlaces layer is added to the map.

    Next, you'll remove the Bus Stops by SubPlace layer from the map. This layer is no longer needed.

  20. In the Layers pane, for Bus Stops by SubPlace layer, click Options. Choose Remove.

    Remove option

    The Cape Town SubPlaces layer is visible.

    The Cape Town SubPlaces layer

    Geographically, this layer contains only Cape Town's subplaces. For each subplace, the number of bus stops it contains and its population is recorded in the attribute table. You'll use this information to visualize bus stop distribution.

Visualize bus stop distribution

To make your results clearer, you'll update the Cape Town SubPlaces layer's symbology to show the number of people per bus stop in each subplace.

  1. In the Layers pane, ensure that the Cape Town SubPlaces layer is selected.

    Cape Town SubPlaces layer selected

  2. On the Settings toolbar, click Styles.
  3. In the Styles pane, under Choose attributes, click the Field button.
  4. In the Select fields window, select the 2021 Total Population field that appears at the top of the list. Click Add.

    2021 Total Population field selected

    Note:

    There are two fields titled 2021 Total Population. This is because the Overlay Layers tool combined the attributes from both input layers. Since both layers had an attribute named 2021 Total Population, it appears twice in the attribute table. However, the values stored in each attribute field are different. The total population value listed first refers to the population for each subplace. The second total population value is the population for the entire city. To show the number of people per bus stop in each subplace, you need to select the first 2021 Total Population field.

    The map updates to show the subplace populations across the city.

    Map of the population by subplace for Cape Town

  5. In the Styles pane, under Pick a style, click Counts and Amounts (color).

    Now, the symbology is updated, but it needs to be divided by the number of bus stops in each subplace.

    2021 population for each subplace as colored polygons

  6. Under Counts and Amounts (color), click Style options.

    Style options button

  7. Under 2021 Total Population, for Divided by, choose Count of Points.

    Divided by set to Count of Points

    The map updates to show the number of people per bus stop in each subplace.

    Map showing the number of people per bus stop in each subplace

    The darker areas have more people per bus stop. In other words, there are only a few bus stops to serve a large portion of the population. The subplaces that are not shaded do not contain bus stops. To illustrate this to your audience, you'll turn on the bus stop layer.

  8. In the Layers pane, turn on the Bus Stops layer.

    Bus Stops layer's visibility turned on

    The bus stops appear below the subplace layer and are difficult to see. You'll move the Bus Stops layer above the Cape Town SubPlaces layer so that the bus stops are visible.

  9. Click and move the Bus Stops layer above the Cape Town SubPlaces layer.

    Bus Stops layer moved to the top

    The bus stops are visible.

    The bus stops on top of the subplaces

Update your map

Before you make this map into an app, you'll adjust some of the layers to better show your findings. You'll start by removing, reordering, and renaming layers.

  1. In the Layers pane, remove the SubPlace Boundaries layer.
  2. Turn on the City of Cape Town Boundaries layer. Move it to the top of the Layers list.

    The City of Cape Town with its boundary

    The city's boundary is now visible.

    Next, you'll rename the Cape Town SubPlaces layer to better explain what this layer displays.

  3. For the Cape Town SubPlaces layer, click Options. Choose Rename.

    Rename option

  4. For Title, type Number of people per bus stop. Click OK.

    Layer name updated

    Next, you'll update the bus stops' symbology.

  5. In the Layers pane, select the Bus Stops layer.
  6. On the Settings  toolbar, click Styles.
  7. In the Styles pane, under Pick a style, under Location, click Style options.

    Style options button

    The Styles pane appears.

  8. In the Styles window, under Symbol style, click the Edit button.

    Edit button for the symbol style

    The Symbol style window appears. You'll change the outline and fill colors for the bus stops so they are more visible.

  9. In the Symbol style window, for Fill color, click the Edit button.

    The Fill color parameter

    The Select color window appears. You'll change the fill color to white by using a hexadecimal color code.

  10. In the Select color window, for the hexadecimal color code, type ffffff and click Done.

    Hexadecimal color code set to ffffff

    The bus stops have a white fill color. Now, you'll adjust the outline width of the points.

  11. In the Symbol style window, for Outline width, type 0.5.

    Outline width set to 0.5

  12. Close the Symbol style window.

    The bus stops are now shown as white dots, and the subplaces with bus stops are visible.

    The final map

    Now, you'll save your map.

  13. Save the map.

Share your results

As a final step, you'll share the results of your analysis using ArcGIS Instant Apps.

  1. On the Contents toolbar, click Create app and choose Instant Apps.

    Instant Apps option

    A browser tab opens with a gallery of app templates.

    A gallery of app templates

    There are many templates to choose from based on the data in your map.

  2. Find the Basic (Media Map) template and click Choose.

    Basic (Media Map) app template

    The Create app - Basic (Media Map) window appears. You'll provide your app with a name.

  3. In the Create app - Basic (Media Map) window, for Give your app a title, type Bus Stop Distribution.

    App title

  4. Click Create App.

    An app is created using your Bus Stops map. The steps used to build the app are listed alongside the app's preview.

    App showing the web map you created

    Since you created this app from the Map Viewer, Step 1. Map is complete. You'll start with Step 2. About.

  5. In the Express pane, click Step 2. About.

    Step 2. About

    In this step, you can add information to help others understand your map. You'll add a title to your app.

  6. In the About pane, turn on Header.

    Header option enabled

    The name of your app appears in the preview.

    Header added to the app

    You're done with Step 2. About.

  7. Click Next.

    Next button

    The Interactivity step allows you to control which tools are available on the map for others to explore and interact with your data. You'll leave the default settings.

  8. In the Interactivity pane, click Next.

    The Theme & Layout step allows you to change the app's appearance and the locations of the app's widgets. You'll update your app's theme to change the color of the header.

  9. In the Theme & Layout pane, for Select a preset theme, choose Ocean.

    Ocean preset theme

    The app's header changes from white to blue in the preview.

    The app's updated theme

    Your app is complete; you're ready to publish and share it.

  10. In the Theme & Layout pane, click Publish.

    Publish button

    The Publish window appears. This step creates your app.

  11. In the Publish window, click Confirm publish.

    The app is published. By default, you are the only person who has access to this app. As a next step, you'll share the app with everyone in your organization.

  12. In the Share window, click Change share settings.

    Change share settings link

  13. In the Share window, for Set sharing level, choose Organization.

    Organization setting

  14. Click Save.
  15. In the Item sharing successfully updated window, click Review Sharing.

    The Review sharing window appears. You're trying to share your app with your organization. However, the underlying web map and the dataset it contains are not shared with anyone. This window is informing you of this discrepancy between how your app, map, and dataset are being shared. In the next step, you'll update the sharing for the map and dataset listed. If you don't update this sharing, those with whom you share this app will receive an error when they open it.

    Review sharing window

  16. Click Update Sharing.

    The web map and feature layer are now shared to your organization. Now, you'll launch your app to see how it looks.

  17. In the configuration panel, click Share.

    Share button

    The Share window appears.

  18. In the Share window, click View published app.

    View published app button

    A browser tab opens with your finished app.

  19. Explore your app.

    The finished app

    Note:

    If you want to make changes to your app, return to the previous browser tab. There, you can update the app and republish the app.

In this tutorial, you determined the number of bus stops in each subplace within the City of Cape Town. Then, you visualized the size of the population served by each bus stop and created an interactive app to share your results. To further this analysis, you could consider additional factors such as the locations of residential areas, work places, and other demographic factors. A preliminary analysis such as this helps guide the creation of data-driven solutions in support of the Sustainable Development Goals.

You can find more tutorials in the tutorial gallery.