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.
- Open the Bus Stops web map.
You are asked to sign in to your ArcGIS account.
- Sign in to your ArcGIS organizational account.
Note:
If you don't have an organizational account, see options for software access.
- 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.

Next, you'll save a copy of this map to your account.
- On the Contents (dark) toolbar, click Save and open. Choose Save as.

The Save map window appears.
- 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.
- On the Contents (dark) toolbar, click Layers. In the Layers pane, select the SubPlace Boundaries layer.

Now, you'll symbolize the subplaces based on their population.
- On the Settings (light) toolbar, click Styles.

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

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

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

You'll update the symbology to show the population count as shades of color that fill the subplace polygons.
- In the Styles pane, under Pick a style, click 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.

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

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

The Analysis pane appears.
- In the Analysis pane, click Tools.

The Tools pane appears. All the tools for analyzing your data are available here.
- Under Summarize data, choose Summarize Within.

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.
- In the Features to summarize section, under Input features, click Layer.

- In the Select layer window, choose Bus Stops.

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

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.
- In the Summary areas section, for Summary polygon layer, click Layer. Choose SubPlace Boundaries.

There are 22,108 features in the boundaries dataset.
Next, you'll provide a name for the output dataset.
- In the Result layer section, for Output name, type Bus Stops by SubPlace.

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

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

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.
- In the Layers pane, for the Bus Stops layer, click Options. Choose Zoom to.

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

Next, you'll have the Summarize Within tool only process features within this map extent.
- In the Summarize Within pane, expand Environment settings. For Processing extent, choose Display extent.

- Next to Estimated credits, click the Refresh button.

Now, the tool will only use about 2 credits for this analysis.
- 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.
- In the Layers pane, 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.

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.
- In the Summarize Within pane, 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.
- In the Tools pane, expand Manage data. Choose Overlay Layers.

For the first parameter, you'll choose the layer that you want to clip.
- Under Input features, for Input features, choose 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.
- For Overlay features, choose City of Cape Town Boundaries.

Finally, you'll provide a name for the output dataset.
- Under Result layer, for Output name type Cape Town SubPlaces.
- Click Estimate credits.
The tool will consume about 1 credit.
- 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.
- In the Layers pane, for Bus Stops by SubPlace layer, click Options. Choose Remove.

The Cape Town SubPlaces layer is visible.

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.
- In the Layers pane, ensure that the Cape Town SubPlaces layer is selected.

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

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.

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

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

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

The map updates to show 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.
- In the Layers pane, turn on the Bus Stops layer.

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.
- Click and move the Bus Stops layer above the Cape Town SubPlaces layer.

The bus stops are visible.

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.
- In the Layers pane, remove the SubPlace Boundaries layer.
- Turn on the City of Cape Town Boundaries layer. Move it to the top of the Layers list.

The city's boundary is now visible.
Next, you'll rename the Cape Town SubPlaces layer to better explain what this layer displays.
- For the Cape Town SubPlaces layer, click Options. Choose Rename.

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

Next, you'll update the bus stops' symbology.
- In the Layers pane, select the Bus Stops layer.
- On the Settings (light) toolbar, click Styles.
- In the Styles pane, under Pick a style, under Location, click Style options.

The Styles pane appears.
- In the Styles window, under Symbol style, 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.
- In the Symbol style window, for Fill color, click the Edit button.

The Select color window appears. You'll change the fill color to white by using a hexadecimal color code.
- In the Select color window, for the hexadecimal color code, type ffffff and click Done.

The bus stops have a white fill color. Now, you'll adjust the outline width of the points.
- In the Symbol style window, for Outline width, type 0.5.

- Close the Symbol style window.
The bus stops are now shown as white dots, and the subplaces with bus stops are visible.

Now, you'll save your map.
- On the Contents (dark) toolbar, click Save and open. Choose Save.

Share your results
As a final step, you'll share the results of your analysis using ArcGIS Instant Apps.
- On the Contents (dark) toolbar, click Create app. Choose Instant Apps.

A browser tab opens with 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.
- Find the Basic template and click Choose.

The Create app - Basic window appears. You'll provide your app with a name.
- In the Create app - Basic window, for Give your app a title, type Bus Stop Distribution.

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

Since you created this app from the Map Viewer, Step 1. Map is complete. You'll start with Step 2. About.
- In the Express pane, 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.
- In the About pane, turn on Header.

The name of your app appears in the preview.

You're done with Step 2. About.
- Click Next.

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.
- 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.
- In the Theme & Layout pane, for Select a preset theme, choose Ocean.

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

Your app is complete; you're ready to publish and share it.
- In the Theme & Layout pane, click Publish.

The Publish window appears. This step creates your app.
- In the Publish window, click Confirm.

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.
- In the Share window, click Change share settings.

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

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

- 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.
- In the configuration panel, click Share.
The Share window appears.
- In the Share window, click Launch.

A browser tab opens with your finished app.
- Explore your 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.
