Creating the Neighborhood Bar Chart tool
The Neighborhood Bar Chart tool will visualize the number of crimes for each major neighborhood in Seattle in the form of a bar chart. This tool will be added to the existing Crime Analysis toolbox created in the previous chapter. It will use a combination of ArcPy
and Plotly
to create the graph.
Note
The Plotly Python library will need to be installed before any of the tools in this chapter can be created. Use pip to install the Plotly Python library using the following command. If you haven't installed pip yet, refer to Chapter 1, Extracting Real-Time Wildfire Data from ArcGIS Server with the ArcGIS REST API, for detailed instructions on installing pip. Here's the command:
pip install plotly
The Create Neighborhood Bar Chart tool will accept several parameters, including an input feature class and fields that provide a reference to a polygon layer containing neighborhood boundaries with the aggregated crime data, chart title, and output file name...