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 the map.

    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.

    Select the SubPlace Boundaries layer.

    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.

    Click the Field button.

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

    Select the 2021 Total Population field.

  5. Click Add.

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

    The 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).

    Choose 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.

    The map with Counts and Amounts (color) symbology

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

    Bus stops and subplace populations

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 (light) toolbar, click  Analysis.

    Click Analysis.

    The Analysis pane appears.

  2. In the Analysis pane, click Tools.

    The Analysis pane

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

  3. Under Summarize data, choose Summarize Within.

    Choose the 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.

    Click Layer.

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

    Choose the Bus Stops layer.

    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.

    The 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.

    Click Estimate credits.

    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.

    Click the Zoom to button.

    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.

    Choose the Display extent option.

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

    Click the 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.

    Turn off the Bus Stops and SubPlace Boundaries layers.

    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.

    A map with the 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.

    Click the 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.

    Choose Overlay Layers.

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

  16. Under Input features, for Input features, choose Bus Stops by SubPlace.

    Set Input features to Bus Stops by SubPlace.

    Next, you'll choose the layer that will clip the Input features. For this analysis, it is the city's boundaries.

  17. For Overlay features, choose City of Cape Town Boundaries.

    The Overlay features parameter

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

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

    The tool will consume about 1 credit.

  20. 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.

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

    Remove the Bus Stops by SubPlace layer.

    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.

    Select the Cape Town SubPlaces layer.

  2. On the Settings (light) 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.

    Choose the 2021 Total Population field.

    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.

    The 2021 population for each subplace as colored polygons

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

    Click the Style options button.

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

    The Divided by setting

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

    A 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.

    Turn on the Bus Stops layer's visibility.

    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.

    Reorder the layers.

    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.

    The Rename option

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

    Update the layer's title.

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

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

    Choose Style options.

    The Styles pane appears.

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

    Click the Edit button.

    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.

    Change the hexadecimal color code.

    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.

    Change the Outline width 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. On the Contents (dark) toolbar, click Save and open. Choose Save.

    Choose the Save option.

Share your results

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

  1. On the Contents (dark) toolbar, click Create app. Choose Instant Apps.

    Choose Instant Apps.

    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. You'll create a Basic app.

  2. Find the Basic template and click Choose.

    Choose the Basic app template.

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

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

    Provide a title for your app.

  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.

    Configuring an app using Instant Apps

    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.

    Click 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.

    The Header option

    The name of your app appears in the preview.

    The header is added to your app.

    You're done with Step 2. About.

  7. Click Next.

    The 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.

    Select the 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.

    The Publish button

    The Publish window appears. This step creates your app.

  11. In the Publish window, click Confirm.

    The Confirm button

    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.

    The Change share settings link

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

    Choose Organization.

  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.

    The 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.

    Click the Share button.

    The Share window appears.

  18. In the Share window, click Launch.

    The Launch 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.