Dark theme

Arc Toolbar


This practical we'll be building a small crime analysis Python toolbar, based on work by the Manchester police.

Manchester police, based on work by a variety of people, have found that in general, if somewhere is burgled, there is an increased risk of burglary for the houses within 400m of the burgled house for up to 4 weeks. Our toolbar will buffer a burglary file and then list the houses in an area by chance of burglary. Those houses that fall inside the most buffers will have the largest burglary risk. As our area is a rather small corner of the East End of London, we'll use 80m buffers. Ultimately our addin will display the houses with the highest risk as a choropleth map, coloured by risk, and an associated sorted table. To do this, we'll need:

  • An addin toolbar with a button to start the process.
  • A model to do the buffering and join the buffers with the houses.
  • Some code to sort the resulting data and display it.
  • One (or more) scripts to run the model and sorting code.

First, let's build our python toolbar.


First of all, work through the same process as last time for making an addin project (called "Crime toolbar"), and make yourself a new toolbar:
ID: BurglaryToolbar
Caption: Burglary tools
Show initially: Tick for yes

Once you've got that, make an addIn Button on the toolbar with the following properties:

Class Name: RiskButton
ID: RiskButton
Caption: Risk calculation


Once you've done all this, dump some "Hello World" code into the button and test your new toolbar. Provided it works, move on to Part Two where we'll start adding some functionality.


  1. This page
  2. Build the model <-- next
  3. Get the model working
  4. Sort the table
  5. Display the data