Crime Analysis with MapInfo Christopher W. Bruce

This document provides supporting material for a 24‐hour course covering beginning, intermediate and advanced topics on MapInfo for crime analysis.

This workbook was created using MapInfo Professional 8.0 on a machine running Windows XP. Students in classes using previous or later versions of Windows may find a few discrepancies between this instruction manual and their actual experiences.

This manual is meant to accompany instructor‐led, hands‐on training.

I am grateful to the Danvers Police Department for supplying the data used in the samples throughout this book.

Course Outline

Lesson 1: Foundations Importing incident data About crime mapping & analysis Geocoding addresses About MapInfo Troubleshooting geocoding problems Obtaining map data Dispersing points

Lesson 2: Exploring MapInfo Lesson 4: Editing Map Objects & Object Data Opening tables Moving around the map window How MapInfo saves files Layers and layer control Changing the appearance of features Styles Modifying data in the information tool Browser windows Search and replace Identifying features Adding and deleting map objects Finding addresses Editing map objects Measuring distances Table maintenance Cosmetic layer Workspaces Lesson 5: Querying and Selecting Data Zoom ranges Opening ArcView coverages Select queries Importing data from other map formats SQL queries Lesson 3: Geocoding Creating new layers Crime Analysis with MapInfo Christopher W. Bruce

Creating a new table Selecting by radius Lesson 8: Map Presentation Selecting by buffers Rotating a map window Lesson 6: Thematic Maps and Analysis Clip regions Copying a map window Creating a grid Exporting a map window Aggregating data Creating a layout Calculating statistics Hotlinking Graduated symbol maps Point symbol maps Lesson 9: Other MapInfo and Related Choropleth maps Products Surface density maps 3‐D maps MapInfo Proviewer Statistical maps MapMarker MapInfo Discovery Lesson 7: Working with Images MapX MapXtreme Opening images CrimeInfo Registering images

2 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 1: About Crime Mapping & Analysis

Crime mapping describes the use of geographic information to identify and analyze crime and police data. Before the 1990s, “crime mapping” referred to any method of geographic analysis, even those that involved pushpins, colored dots, and paper maps. Now, however, “crime mapping” usually means the specific use of computerized geographic information systems (GIS).

Crime mapping seeks to answer the questions of “where,” much as temporal analysis answers the question of “when” and cause analysis answers the question of “why.” Crime maps are both 1) analytical tools, allowing the analyst to ask questions about spatial patterns and relationships, and 2) products, allowing the analyst to display information to his or her audience. In the current state of the profession, crime maps are probably overused as products and underused as tools of analysis.

History

Until recently, crime mapping was an exhausting process, requiring analysts to push pins into paper wall maps in order to track and identify clusters. Multiple data sets required multiple maps and multiple sets of pins. Changing any one of several parameters, such as crime type or time period, meant many hours of removing some pins and adding others. Buffers were drawn with compasses, distances measured with rulers, and linear maps created with string tied from one pin to another. More than one “layer” required plastic transparencies. Reproduction, except for small maps, was all but impossible.

This sad state of affairs changed in the 1990s with the widespread availability of A 1980s‐era crime bulletin from the Cambridge (MA) both personal computers and affordable Police Department. The bulletin was created by putting GIS programs. Today, an analyst can black dots on a paper map and physically “cutting” a section of the map and “pasting” it (with actual paste) on create hundreds of maps, in much greater a bulletin template. detail and analytical depth, in the same time that it used to take to create one.

3 Crime Analysis with MapInfo Christopher W. Bruce

Functions

Crime mapping has a number of functions and uses, which we attempt to itemize here:

1. To identify patterns and trends. An analyst might display a map of burglaries over the past month, seeking to identify geographic clusters, linear patterns, or other geographic patterns that would indicate the existence of a current crime pattern or series. Similarly, he might show burglaries over the course of a year to identify geographic trends.

2. To serve as a visual aid for information about patterns and trends. An analyst describing a crime pattern or trend can only convey so much with phrases like, “robbery in our city is concentrated in the southeast part of town,” and “the pattern is active in the area bordered by First Street, Broadway, Fifth Street, and Park Avenue.” Even assuming that readers have a good enough grasp of geography to visualize these areas, a map provides this information in a clearer way. It may not be worth a thousand words, but it’s at least worth a dozen.

Robbery Hot Spots in the Past Six Months

1. Oak Park: (District 7A, Beat 5). Packs of two or three white male juveniles robbing students at knifepoint between 22:00 and 02:00 on Friday and Saturday nights. Active from late October to early December.

2. Commerce Hill: (District 7A, Beat 3). A series of five daytime purse snatchings in this upscale shopping district between 12:00 and 15:00 on weekends. Active from September 1 to September 15. Suspect was a long-haired Hispanic male in his 40s wearing a leather jacket.

4. The Highlands: A group of late night (0200-0500) handgun robberies in this residential area between July and September; possibly related to increased drug activity in this area.

3. To identify correlations between two or more geographic variables. Do you want to try to understand why robberies occur where they do? Try displaying robberies on the same map as public transportation routes. No luck? Match robberies with public housing locations. Still no correlation? Try gang territories, poverty rates, locations of homeless

4 Crime Analysis with MapInfo Christopher W. Bruce

shelters, liquor stores, bars, street lights, police foot patrols, and owner‐occupied housing. Are you trying to identify possible suspects in a recent robbery series? Display a map of known offenders’ home addresses, work addresses, commuting paths, and known hangouts against the robbery series. Any two geographic data sets can be juxtaposed on the same map to seek either direct or inverse correlations. You may find these correlations by simply “eyeballing” the map, or you may use the GIS system to generate a precise mathematical correlation.

4. To show the relationship between geography and other factors. Certain maps, such as point symbol maps, can show not only geographic patterns, but also sub‐patterns based on time, crime type, or other factors.

5. To analyze spatial tendency. Is the offender in a crime series centering his activities in a particular area? Is he progressing in a linear pattern? Is he moving in an identifiable way from one place to another? Is he spelling his name across the city?

6. To query data by location. Regular databases make it simple to query data by crime type, date, time, specific address, offender description, victim description, and so on. But only GIS systems make it simple (and, in most cases, feasible) to specify a geographic area

5 Crime Analysis with MapInfo Christopher W. Bruce

and “collect” all of the incidents within it. Crime mapping makes it possible, for instance, to find all crimes within a certain radius of liquor stores, or to identify all registered sex offenders living within a mile radius of a school, or to simply draw a random polygon and select everything within it. (The first two cases are examples of buffering.)

7. To district. Intelligent districting requires careful consideration of geographic and environmental factors and the ability to gather data about current or proposed districts. GIS systems can quickly calculate incident volume, geographic area, road network distance, response times, and other factors crucial to the districting process. Moreover, analysts using crime mapping for districting can quickly view multiple data sets to consider their effects on a district.

8. To make maps. Police department sometimes simply need maps: a citywide map to hang on the wall of the chief’s office, a beat boundary map for new officers, a route map for deployment during a special event, or a map of local shelters and services to hand out to the community. The analyst, knowing the GIS system best, will probably be asked to produce most of these maps.

6 Crime Analysis with MapInfo Christopher W. Bruce

Types of Crime Maps

Pin maps (also known as spot maps) are the foundation for most other types of crime maps. They consist simply of mapped locations (for incidents, persons, or other geographic data) marked with a single symbol, such as a dot or star. A simple pin map might suffice to show the locations of incidents in a crime series, or residences of offenders near a school. But high‐volume data sets usually require one of the thematic map (maps with a theme, or that tell a story) types listed below.

Choropleth maps aggregate information into larger geographic areas, such as census block groups, grid cells, or A pin map of auto thefts in Lawrence, Massachusetts, August 2004 reporting districts. These geographic areas are color‐coded or patterned to reflect either volume (e.g., red areas have a high crime volume, blue areas are a low crime volume), or some other quantitative measure, such as the value of property stolen or average income of residents.

Point symbol maps start with a pin map, but change the symbol or color to represent other factors within the data. A map of in cidents in the past week in one neighborhood might use a “gun” symbol to identify robberies, a “fist” symbol to identify assaults, and so on. These symbols might be colored so that yellow symbols show daytime incidents and blue symbols show nighttime incidents.

Graduated symbol maps (called proportional symbol maps in other programs) expand upon pin maps by showing bigger pins at locations with greater volume. This solves some A choropleth map of vehicles stolen per capita in California counties, 1995 problems inherent in pin maps.

7 Crime Analysis with MapInfo Christopher W. Bruce

A point symbol map of accidents in Danvers in December 2001

Statistical maps superimpose charts and graphs over geographic areas to show more complex quantitative information than can be achieved with a choropleth map.

Surface density maps (also called continuous surface maps, or isopleth maps) accomplish a similar goal as choropleth maps, but with the definite (and sometimes arbitrary) boundaries on which choropleth maps rely. At A statistical map showing the percentage of housebreaks on each shift the same time, though, they for each sector in Cambridge, MA interpolate measurements in between areas of known value, so they must be used with care.

8 Crime Analysis with MapInfo Christopher W. Bruce

Conners Farm TOPSFIELD 9-59-5 ShiftShift

Reserv oir Ponte Vecchio North St Trailer Pk WENHAM

MIDDLETON Essex Aggie Rand Cir

CAB Danv ers Bev erly Plaza Airport

St. John's Danv ers Prep High State Hospital

Super 8 Cherry Hill Strike One BEVERLY

Hunt Center Honda Brighton Thorpe Gardens North School

Rio King's Grant Grande Calitri's Holton-Richmond School

Danv ers Th e Square To w e r Home Depot To w n Hall IFLL Motel 6

Lowe's Dyer Court DPYC Circuit City Costco Port DPD Corner Wal-Mart Nick & Liberty Tony's Tr e e Mall Endicott Plaza

Days Inn Sylvania PEABODY

Seaquel's SALEM

A surface density map depicting hot spots for calls for service on the 9‐to‐5 Shift in Danvers, MA

GIS systems can combine multiple types of maps in the same display, making it possible, for instance, to juxtapose a surface density map of poverty levels with a graduated symbol map of domestic violence.

Tools

Most crime analysts create crime maps with one of two products: ArcView by ESRI or MapInfo Professional by the MapInfo Corporation. Of the two, ArcView (which is one of several pieces of software in ESRI’s ArcGIS suite) is more widely used among law enforcement. MapInfo users profess that MapInfo is easier to use and more compatible with other Windows products; the advantages of ArcView include more availability of training, support, and customized scripts. More city and town GIS departments use ESRI software than MapInfo, but MapInfo allows quick and painless translation from other GIS formats through its Universal Translator tool.

9 Crime Analysis with MapInfo Christopher W. Bruce

These comparative advantages and disadvantages will change with each new release of either product.

No analyst will be crippled by his or her choice of GIS software: each product can perform similar tasks and uses similar concepts. Each product markets for a similar price (though it must be said that MapInfo contains more initial features than ArcView). Each product will also create al of the map types listed above, though some extensions may be required. Each product also allows users to write their own scripts: MapInfo features a scripting language called MapBasic, and ESRI allows users to write scripts in Avenue (in ArcView versions up to 3.3) or (in version 8.0 and later).

Other companies have written elaborate programs, specifically for crime mapping, that work with the MapInfo and ArcGIS engines. These programs, which cost up to $20,000, make it easier for police personnel to create crime maps without knowledge of the underlying GIS software. Examples are the Omega Group’s CrimeView (which uses ArcGIS) and Charles River Technologies’ (now QED’s) CrimeInfo (which uses MapInfo). Analysts, who should know how to use the GIS software, should not learn to rely on these custom programs.

Data Sources

In crime mapping, analysts are concerned with two primary sets of data: base map data and police records data. Base map data includes street networks, buildings, waterways, parks, railroads, and other layers that form the geography of the analysts’ jurisdictions. Police records data contain records of crimes, disorder, calls for service, police activity, and offenders and victims. Both must be merged within the GIS program to perform “crime mapping.”

Base map data can be obtained from several sources, including:

1) The United States Census Bureau’s TIGER files 2) Private companies 3) Digitized aerial photography 4) Analyst‐created

A much more difficult problem for analysts is often getting data out of their records management systems. Older systems may offer no obvious export function and may store data in databases inaccessible through ODBC. But for analysts with newer systems, MapInfo (and ArcView) can link to ODBC data sources.

There are two basic types of map data:

1. Raster data—pictures or images, with data stored in pixels, such as an aerial photograph of the city. The picture may be given geographic coordinates so that other types of data

10 Crime Analysis with MapInfo Christopher W. Bruce

can be mapped on top of it, but there will be no underlying tabular data associated with each feature.

2. Vector data—data stored as one or more pairs of coordinates. The GIS program creates lines and polygons by essentially “connecting the dots” (all behind the scenes). Most data used in crime mapping is vector data. Vector data can take three forms:

a. Points or symbols, to show crimes, trees, fire hydrants, and other fixed objects and locations b. Lines, to show streets, rivers, railroads, and other linear objects c. Polygons or areas, to show parks, lakes, buildings, police beats, and other areas

Each map layer generally contains only one type of data (though MapInfo does not restrict you from putting more than one in a layer). The layers are then overlaid on top of each other, like transparent sheets, to achieve the illusion of a single unified map.

Some Important Cartographic Information

Map purists insist that every map must contain five elements:

1. A title 2. A legend 3. A scale bar 4. A north arrow 5. Information about the data sources and who created it

Depending on the nature of the map and the audience, however, some of these elements may be eliminated. You should always have a title.

11 Crime Analysis with MapInfo Christopher W. Bruce

No flat map can perfectly depict the surface of the Earth. Some type of projection system is required to turn the curved surface into a flat map. All projections distort geography to some degree, but geographers use the projection scheme that makes the most sense for whatever area is to be mapped. Crime analysts typically do not have to worry about projection, since they’re working with small geographic areas in which the amount of distortion is minimal. However, analysts will frequently try to merge data from two sources, or convert data form one format to another, at which point knowing the projection may be important.

Any space on the Earth can be identified by its coordinates. A Cartesian coordinate system describes a pair of axes that intersect at any location and extend in all directions indefinitely. The horizontal axis is known as the “X” axis, and the vertical axis is known as the “Y” axis. Points are located by first giving the location along the X‐axis and then the Y‐axis (e.g., 142, 38). More useful coordinate systems for mapping include:

• Longitude and Latitude • Universal Transverse Mercator (UTM) • U.S. State Plane

Again, analysts rarely have to deal with coordinate systems but they may become important when merging or converting data.

12 Crime Analysis with MapInfo Christopher W. Bruce

About MapInfo Professional

MapInfo Professional is the flagship product of the MapInfo Corporation of Troy, New York. It is the second most widely‐used software for crime mapping in the United States. In Australia and the United Kingdom, it seems to enjoy a larger market share among police departments than ESRI, though we haven’t been able to compile exact statistics.

MapInfo Professional 8.0 is a Windows‐compliant application designed to take advantage of all the functionality of the Windows . Its files are recognized by ’s Object Linking and Embedding (OLE) protocols.

Most of what you need to accomplish with crime mapping is found within the MapInfo application, without need for add‐ons or extensions. The last section of this manual discusses some of MapInfo’s other products.

13 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 2: Exploring MapInfo

We begin by opening MapInfo Professional.

>>Step 1: Open MapInfo Professional 8.0 via the Windows “Start” menu. We are greeted by a dialog box that offers several options.

>>Step 2: Choose “Open a Table” and click “OK.”

>>Step 3: Navigate to C:\MICA\ SampleData. Highlight the “Streets” table and click “Open.”

>>Step 4: Maximize the resultant map window.

14 Crime Analysis with MapInfo Christopher W. Bruce

You now have MapInfo open and a Map Window active with one layer: the street centerlines of Danvers, Massachusetts. You’re zoomed in pretty close on some streets in the middle of the map.

You will have at least two toolbars floating on your screen or fixed at the top of the screen.

The Map Window

The window you see in front of you is the Map Window. It is one of at least six different types of windows you have available to you in MapInfo. Each window type has different options. Notice the “Map” menu on the menu bar—this menu changes names depending on what type of window you have active.

In MapInfo, you’ll probably do most of your work in the Map Window. The Map Window is where you view your maps, define layers and styles, zoom in and out, move around, and edit map objects. You can have multiple different Map Windows open at the same time.

We’ll take a few moments to move around the Map Window using the following tools and menu commands:

• The Pan tool allows you to “grab” the map window and move it around, without changing the zoom level. Use it to move throughout the map.

• The Zoom‐in and Zoom‐out tools let you change the scale of the map so you can view more or less of it.

• The menu command Map | View Entire Layer automatically adjusts the zoom level so that all of the objects in a particular layer are visible.

Play around with these tools to get a good sense of the street network in Danvers. Without opening any of the other data, what can you tell about the Town of Danvers based on the way the streets are laid out?

Opening Tables

Let’s add some additional tables to our current Map Window:

>>Step 1: Choose File | Open. If you’re not already there, navigate to C:\MICA\SampleData.

>>Step 2: Choose the water, buildings, schools, and Mass Cities & Towns tables. You can select multiple tables by holding down the CTRL key as you click each one.

15 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 3: Click “Open.” Several other layers are now available in front of you. Explore the map a little more, using the tools above.

Layers and Layer Control

A map is made up of one or more layers which are accessed through Layer Control.

You will use the Layer Control often to set properties and preferences for your Map Window. Each Map Window has its own Layer Control, and setting preferences in one will not affect the others.

>>Step 1: Choose Map | Layer Control to access the layer control dialog.

On top of all your data layers is MapInfo’s cosmetic layer—a place for you to drop text and drawing objects that enhance or highlight your map. The cosmetic layer is saved along with the workspace (though, if you want, you can save your cosmetic objects for use in future maps by choosing Map | Save Cosmetic Objects).

16 Crime Analysis with MapInfo Christopher W. Bruce

The order in which the layers appear in the Layer Control specifies the order in which they are drawn in your Map Window. The cosmetic layer is always on top. By default, MapInfo places layers with line objects below layers with point objects, and layers with polygon objects below layers with line objects. This reduces the chance that a polygon will cover important features. For instance, if your city boundary layer is a polygon with a “fill” (i.e., is not transparent), and it is on top of everything else, you will be unable to see any of your other map objects beneath it.

In our case, MapInfo has made an understandable mistake by putting the water layer above the streets layer. In our Map Window, bridges will now be covered by water. To change this:

>>Step 2: Click on the water layer and then click the “Down” button once. Return to the Map Window via “OK” and see the difference, then return to Map | Layer Control.

You can set certain properties for each layer by using the check boxes below each of four icons.

• The boxes below the “eye” icon specify whether the layer is visible. If the box is unchecked, you will not see that layer in your current map window.

• The boxes below the “pencil” icon specify whether the layer is editable. Only one layer can be editable at a time. When a layer is editable, you can add objects, delete objects, move objects, and change the appearance of objects in that layer. Doing so is permanent and universal—that layer will now appear differently in every workspace and Map Window—new and existing—in which you open it.

• The boxes below the “selector” icon indicate whether the layer is selectable. Only selectable layers may be queried, selected, and snapped to. In order to use the “Information” tool on an object (see below), its layer must be selectable.

• The boxes below the “label” icon specify whether the layer is auto‐labeled. Clicking this box will automatically generate labels for the objects in the layer, using the properties specified in the “Label” dialog box.

17 Crime Analysis with MapInfo Christopher W. Bruce

You can accomplish several tasks in Layer Control, but one of the most common is changing the display properties for a layer.

We’re going to change the style of the water layer. There are so many small streams in Danvers that we see water all over the map. Small streams are represented by lines and large bodies of water are represented by polygons. We’re going to change the styles so that MapInfo shows us only the polygons.

>>Step 3: Highlight the water layer and click the “Display” button to access the Display Options dialog.

>>Step 4: Check the “Style Override” box. Two buttons become available to you, one for the polygon styles and one for the line styles.

>>Step 5: Click the polygon style button and change the style to a light blue fill with no border. Then click “OK.” Now click on the line style button and change the style to “none.” “OK” everything to get back to your Map Window. You’ll see that a lot of the superfluous water has disappeared.

18 Crime Analysis with MapInfo Christopher W. Bruce

The changes are temporary and will apply to the current Map Window in the current workspace only, and not to other workspaces, nor to other Map Windows in the current workspace.

>>Step 6: The black border for the cities and towns makes that layer overwhelm the others. Go back to Layer Control and use the Style Override to change the border of the “Mass Cities and Towns” layer to a light gray.

The Browser Window

It is important to understand that the physical objects you see in your Map Window—streets, schools, buildings, water—are geographic representations of underlying tabular data. If all you could do was look at them, you wouldn’t be much better off than if you were using paper maps.

Each layer has a table associated with it, and each object has a record in the table. You can view these tables with the Browser Window.

>>Step 1: Choose Window | New Browser Window.

>>Step 2: Select the schools table and click “OK”

You will now see a table—much a like a spreadsheet or an Access database table—showing you records for all of the schools on our map.

19 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 3: Choose Window | Tile Windows so you see the Browser Window and the Map Window side‐by‐side.

>>Step 4: Select a record in the Browser Window by clicking on the box to the left of it. Notice that the associated object is selected in the Map Window.

>>Step 5: Select an object in the Map Window by clicking on it with your “selector” tool . Notice that the associated record is selected in the Browser Window. If you want, you can hold down the SHIFT key to select multiple objects and records. When you’re done, close the Browser Window.

Identifying Features

You don’t have to open the Browser Window to view the features of a particular object—that would be too cumbersome. To see the underlying tabular data for one object, you can use the information tool.

>>Step 1: If you’re not there, return to the Map Window. Zoom in close enough that you can distinguish individual objects.

>>Step 2: Click on the Information tool . Your cursor will change to a cross‐hair.

20 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 3: Click on the Information tool . Your cursor will change to a cross‐hair. Click on any object—a school, a street, a building, or a town.

>>Step 4: Probably, no matter where you click, MapInfo won’t know what layer you want. You may have to specify what layer you were intending to click in the dialog box. Select one of the layers and you’ll see the attribute data for that object.

You can edit the data in the “Info Tool” dialog box, but we’ll cover that in another lesson. For now, click around the map and see the different attribute data available for the different layers you have open.

Labeling Features

In addition to identifying features, and seeing the data associated with each object, you can also label features on the map, using one or more of the attribute fields. You can label objects automatically or manually, one at a time. You can only label layers that are marked selectable in layer control.

To begin, we’ll label some of our streets manually.

>>Step 1: Click on the “Label” tool on the main toolbar. Your cursor will change to a crosshair.

21 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 2: Click on several street segments, one at a time. (Try to click exactly on the street segments; otherwise, MapInfo will label the Mass Cities & Towns layer.)

Valuable, but time‐consuming, right? We can also tell MapInfo to auto‐label the features, saving us from having to click on each one.

>>Step 3: Open Layer Control. In the row for the streets layer, check the “Auto Label” box . Then click “OK” and see what happens.

Useful, but not terribly attractive, is it?

MapInfo is labeling the features with the default attribute field, the default fonts, and other default settings. You can adjust these settings in Layer Control.

>>Step 4: Open Layer Control. Highlight the streets layer and click on the “Label” button in the lower right‐hand corner.

You see numerous options available to you, including the field from the attribute table that MapInfo uses as its label: the “Street” field. You can write an expression in this box to get MapInfo to label the features with more than one field, but for now, the “Street” field is okay.

22 Crime Analysis with MapInfo Christopher W. Bruce

You have the option to set a zoom range so that the labels are only displayed when you’re zoomed at a particular level. We’ll explore this option more later.

Clicking “Allow Duplicate Text” will allow the same feature to be labeled more than once. Clicking “Allow Overlapping Text” will allow you to assign labels that overlap other labels, making a mess of everything. You can also set a “Maximum Label” number to keep the number of auto‐labels to a manageable level while still providing a good geographic dispersion of labels.

Clicking on the text button under the “Styles” heading will allow you to set the font, style, and size for the labels. Finally, the “Position” box allows you to specify where the label appears relative to the object being labeled, and how far away from the object it appears.

>>Step 5: Set the “Label Offset” to 0. Set the text style to Arial, 7‐point, dark gray. Specify “None” for the “Label Lines.” Finally, set a “Maximum Labels” value of 250. Click “OK” and “OK” when finished.

Now the size and volume of the labels is a little less obtrusive.

Finding an Address or Feature

Finding a specific address or feature is our first step towards geocoding, which we’ll cover in the next section.

You can use the Query | Find command (CTRL‐F) to locate a certain feature or to create a quick pin map. We’ll do both in this section.

23 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 1: Use your “Zoom‐out” tool until you’re zoomed out enough that you can see the boundaries of several cities and towns.

>>Step 2: Choose Query | Find. Search the Mass Cities & Towns table for objects in the “Town” column. Then click “OK”

>>Step 3: In the dialog box that appears, search for “Bedford” and click “OK.”

>>Step 4: MapInfo zooms you to Bedford. Label Bedford and some surrounding towns so you can see where you are.

Now we’ll create a quick pin map in Danvers.

>>Step 5: Choose Query | Find again. This time, we don’t want to search for a town, so click the “Respectify” button to change the original options.

>>Step 6: Search the streets table for objects in the “Street” column. Change the symbol style to an 18‐ point red dot (or whatever you prefer). Then click “OK.”

24 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 7: Type “120 Ash St” in the dialog box that appears and click “OK.”

MapInfo zooms you back over to Danvers, but you’re probably seeing several towns. We only need to see Danvers.

>>Step 8: Choose Map | View Entire Layer. Select the streets layer and click “OK.”

>>Step 9: Choose Query | Find again, and search for each of the addresses on the list below, one at a time:

12 Collins St 5 Pine St 24 Adams St 189 Pine St 25 Wadsworth St

>>Step 10: Use your “Zoom‐in” tool to draw a box around the pins.

If this was a pattern of housebreaks, would this pin map help illustrate the pattern for a bulletin or report?

L s y t D R i r M n o w r c a B a A k R e ple ge m S u o lid b t Coo s o d p y d d t r

a t R R R S B

T d t S U B t t n S n t a S d r R M m r ed n o u u s o n o n t b d t a m c r s a h u a l h a e S s k S R m s e h p C c W e a x i o a e r v W o R h O c r t S F A h F t n I a e a S h n i u S l t n y l w g r t o s d d W t e r w o r p l o e a s l S s i i y Br t o p N o l e e S t okva t l e n Li t le s i v n W D S r k d r r a nu t C V A ll A a S t i t t v r y d P e e S es D r l R a P t h y e o t t ur p C d on F v la S a B r S n t o t a t e l S r bbo d n e B t t a A d S e s R R e k r D B R c t e t o u h lo T tl a S er i m S d o A S n e n v H t W s B e b la hi a t n pp e r y gh ir le St o O i r B v m S i L C o g e e l u H r t k a u r to k l e u a a l s e i t P b lv S P i v a a A d S o B S i e u B w r m c t o l e v t C r e w I Rd k e A n n n e A te i O v a G o g l a t e t e N t G is S ri S m v o e P s P t n e A t r e n Po g m v S d s L C ry nt c a H A a o n K S n u n D i d s t t s b o ll r R r t u o C en t n im P u lls F tre S r P P r D b i t e o m k W b b t th a m P r w o s n r r a D e R n y e C o t u n y l r N C L k a e a o l g k r y in t t li m s G r n R a D e S o k P y S n d C r ic rr Plains Park P u he B t S tn e t a C r m ry U C t W S S n S t h y rt a n t Danv ers Sq a a a s

t ob d C a e t H s m W S S h

w e S r

o a s t t 5 t e d o d t r S S r n 9 S

m n r l o e e k L a t r

h a m l l P v e a r i s t t l s P l S E A i u O e ' S C t o w p D t l W t S e R i o a B S t t V P L r H oris Rd k e n a u i y Ash St Ash la W S c H a t o ir t S n H e B a F B Ston S ig A a e s n St le h v y h a W t V tc v e i e St l S ie n Spruc t S he y a t w g n r t a P S re T t m r o e S o ra n r t B S nd n S u t t

ln S S a t t

r W e e t S D Lar t chmont St t S H S al E r o a lten St y ste L an n e e x h a C

t C l f r w

o

P t r S C e t d r d S t n o t t o s St S c rough C w C ur e e B e e h ir g c c h C d S i t S a s o t A r 5 e p a t D B R S m r n 9 a t t h e S Exit 23 e H e u t S t U t S c S r n u n r t ra y n e S o it i l G d

r t e ow t r R d F e S a P s rcha D Pu H r t S Ad 8 d am 2 r n R C s 1 e e t o St rd s l te T a o lin u d G P s o o e S A R o M g n b H a t d i e ll y R L n

i a n g r a r

V y n R t i o l

o W l

i n S e t R

u t g t

t

t i d a S S i t r de r Hy s y Flint St r

n

a t r

o e

C S

Brooksby Village P C e Dr g g n

a i Vill e y v v ksb r o I A Bro h t McDermo l tt Farm R a d e Route 128 N C Bo w li w n n S B H t t t o o M u u n ac S k m A tc A r h Independence Way th m

25 Crime Analysis with MapInfo Christopher W. Bruce

There are a lot of other options in the “Find” dialog box that we’ll cover in the geocoding section. For now, it’s important to understand that the pin map we have created is only cosmetic—there are no attribute data beneath these pins. Thus, we can only look at the map; we can’t query it.

Measuring Distances

You can use the “Ruler” tool to measure the distance between two or more points on your map.

>>Step 1: Click on the “Ruler” tool . Notice that the Ruler Window appears. Click on the northernmost housebreak in the pattern and then double‐click on the southernmost housebreak in the pattern. The ruler will display the total distance.

This distance is “as the crow flies.” To measure actual street distance:

>>Step 2: Click on the northernmost housebreak in the pattern. Then click your way along Pine Street, clicking every time the street takes a turn or bend. When you get to the southernmost housebreak, double‐click on it.

The Cosmetic Layer

Now is a good time to talk about the cosmetic layer, which you have seen in Layer Control. The cosmetic layer always appears on the top of the other layers. Think of it as a clear transparent sheet that you put on top of a paper map—you can scribble on it without ruining the map itself.

MapInfo stores points that you “Find” in the cosmetic layer. You can also add your own text, symbols, lines, and other objects to the cosmetic layer, as long as it’s editable in Layer Control.

>>Step 1: Open Layer Control. Make the cosmetic layer editable by clicking the checkbox in the “editable” column , then click “OK.”

You return to the Map Window.

26 Crime Analysis with MapInfo Christopher W. Bruce

Now that a layer is editable, all of the previously grayed‐out icons on your drawing toolbar have become available. We’re going to create a crude title for our map.

>>Step 2: Choose Options | Text Style. Specify Arial, 24‐poin, bold, with a halo. Click “OK” when finished.

>>Step 3: Click on the “Text Tool” on the drawing toolbar. Somewhere in your Map Window, click and type “May Housebreak Pattern.”

Since you’ve typed this title in the cosmetic layer, it isn’t permanently saved with any of the other data layers.

27 Crime Analysis with MapInfo Christopher W. Bruce

Workspaces

What you have in front of you now is a workspace. A workspace consists of all the tables (layers) you have opened, all of the windows you have created, and all of the objects in your cosmetic layers. Now would be a good time to save your workspace.

>>Step 1: Choose File | Save Workspace. Navigate to C:\MICA\SampleData. Save the workspace as Danvers.wor.

Now if you quit MapInfo, you can re‐open everything just as you have it now.

It is important to understand that the layers are not saved in the workspace; the workspace only contains pointers to those layers. If you move or delete them, MapInfo won’t know where to find them when you try to open the workspace again. And if you make changes to them, adding or deleting objects, those changes will be reflected in all of the workspaces that use those particular layers.

Opening ArcView Coverages

MapInfo 8.0 can read information directly from ESRI’s Shapefile format, which is used by ArcView and other ESRI applications. In previous versions of MapInfo, users had to translate those files, but the current MapInfo version can open them directly.

This is handy if others in your agency (or city or town) use ArcView and you want to be able to read their data. It’s especially handy if that data is updated frequently, and you don’t want to have to keep translating new versions of the shapefile.

In our example, we’ll assume that our town assessor has a parcel layer in ArcView that we want to be able to open in MapInfo.

>>Step 1: Choose File | Open. Navigate to C:\MICA\SampleData.

>>Step 2: Change the “Files of Type” box to read “ESRI (R) Shapefile (*.shp).” Select the Parcel.shp shapefile and click “Open.”

MapInfo now asks you to save a MapInfo table (.tab) file. This is the file that MapInfo will use to store information about the shapefile. In the future, when you want to open the parcel layer, you’ll just open this MapInfo table, and it will read information from the shapefile.

>>Step 3: Save the MapInfo table in C:\MICA\SampleData as Parcels.tab.

MapInfo now has some questions about the shapefile—the character set, the projection of the layer, and what you want it to look like when you bring it into MapInfo.

28 Crime Analysis with MapInfo Christopher W. Bruce

The projection is something that the owner of the shapefile should be able to tell you. If he or she isn’t available, you can try the most commonly used projections and see if the layer opens correctly:

• Latitude/Longitude • U.S. State Plane Coordinate System (1983, Feet) for the state and region you happen to be working with

(These actually aren’t “projections,” but rather coordinate systems. Each coordinate system is based on a particular projection, so MapInfo just combines the two under the heading “projection.)

In our case, the layer is saved in a Latitude/Longitude projection.

>>Step 4: Click the “Projection” button and specify Latitude/Longitude. Click the “Style” button and specify no pattern, light gray border. Finally, click “OK.”

29 Crime Analysis with MapInfo Christopher W. Bruce

A new map layer should now appear in your Map Window. Having made all of these specifications, they are now saved as part of the MapInfo table. You will not have to go through this again when opening the parcels shapefile.

>>Step 5: Use the information tool to see the attribute data for the parcels.

Assigning a Zoom Range

The parcels clutter up the map when you zoom out far enough. Let’s make them appear only when we’re zoomed in very close.

>>Step 1: Go to Layer Control. Highlight the parcel layer and click the “Display” button.

>>Step 2: In the “Zoom Layering” section, specify a minimum zoom of 0 and a maximum zoom of 1.5 miles. Click “OK.”

>>Step 3: Zoom in and out to see how the parcel layer disappears and re‐appears depending on the zoom level. (You can see the zoom level in the lower right‐hand corner: .)

Now that we’ve seen how to do that, let’s do the same thing with the labels for the streets layer.

>>Step 4: Go to Layer Control. Highlight the streets layer and click the “Labels” button. In the “Visibility” box, choose “Display within Range.” Specify a maximum zoom of 2 miles, and click “OK.”

>>Step 5: Again, practice zooming in and out, and note how the parcels and labels appear when you reach a large enough scale, and disappear when you zoom out to a small scale.

>>Step 6: Save the workspace (File | Save Workspace) over the old one.

30 Crime Analysis with MapInfo Christopher W. Bruce

Working with Your Own Data

Now that you’ve had a tour of MapInfo using the sample Danvers data, let’s try the same lessons with your own agency’s data. Try to do the following with the map data that you brought to class:

• Open all of the layers • Zoom in, zoom out, pan, and explore the maps • Arrange the order of the layers in Layer Control • Change the appearance of your objects using Style Override • Browse the attribute data for your layers and identify features • Label or auto‐label your features • Find some addresses (like the police station) • Measure distances • Set zoom levels for layers and/or labels • Save your workspace

31 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 3: Geocoding

Geocoding describes the process of assigning a physical point, or dot, on a map based on tabular data.

When the streets, parcels, and water layers in front of you were created, they were created first by drawing the features, then by creating the attribute table associated with them, and finally by populating the tables with the actual attributes.

Geocoding is the reversal of that process. When we geocode, we start with tabular data—for instance, a lit of crimes and their addresses—and then create points on the map to correspond with those crimes.

There are three ways to geocode data:

• Using Latitude/Longitude. If your CAD or RMS system automatically assigns a latitude and longitude to each incident, you can geocode very quickly.

• Using the incident address. This type of geocoding is known as address matching, and it is the most common type. You literally “match” the address in your incident table with an address on one of your map tables—usually your streets table, but you can also use parcel or building layers, as long as the attribute table for the parcels or buildings contains the address.

• Actually drawing the point on the map. This is called digitizing, and it is how most map layers are created, by drawing over aerial photographs. Digitizing is rarely done in crime mapping because it takes a long time, but it is sometimes the best way to get the point exactly where you want it.

We will do our geocoding via address matching, as it is the most common mechanism.

Importing Incident Data

The first step to geocoding is to open, in MapInfo, some incident data (or other police data with addresses, such as offender residences or locations with hazardous chemicals). MapInfo will open multiple types of data tables through File | Open, including Microsoft Access, , dBASE, and delimited ASCII. In addition, you can access any ODBC‐compliant database through File | Open DBMS Connection.

We will be using an Excel file that contains all major crimes to occur in Danvers in the fall of 2005.

32 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 1: Re‐open the Danvers.wor workspace through File | Open (change “Files of Type” to “workspace”). If there are items on the cosmetic layer, choose Map | Clear Cosmetic Layer.

>>Step 2: Choose File | Open. In the “Files of Type” box, choose “Microsoft Excel.” Navigate to C:\MICA\SampleData, and choose the FallCrimes.xls file.

>>Step 3: In the “Excel Information” dialog, click on the drop‐down box labeled “Named Range” and choose “Other.” Change A1:I713 to A2:I713. Click the box that reads “Use Row Above Selected Range for Column Titles,” then click “OK.”

MapInfo will open the Excel spreadsheet in a Browser Window. Browse through the incidents to see what you have. Take note of the entries in the “Location” field.

Geocoding Addresses

We now want to assign a dot on the map to each incident in our new table.

>>Step 1: Choose Table | Geocode. Fill in the options in the dialog box to the right.

>>Step 2: Click the “Options” button and un‐check the “Try Substitutions” box at the bottom. Then click “OK” and “OK.”

33 Crime Analysis with MapInfo Christopher W. Bruce

MapInfo runs through all the incidents in the spreadsheet and tries to match them against street names and address ranges. If it can find a match, it tags the incidents with the proper coordinates; if not, it skips it.

When using a street centerline file, MapInfo actually matches the incident address to a collection of four fields, which must have these names and be in this order:

Street FromLeft ToLeft FromRight ToRight

So when it sees, for instance, “100 Ash St,” it first looks for an “Ash St,” then looks for a segment of Ash Street that has a range that includes the number 100. Once it finds the right segment, it figures out the “side” of the street based on whether the address is in the “left” range or the “right” range; then it interpolates the exact location based on the range. In our case, the range on the left side of Ash Street is from 86 to 120. 100 is 41% of the way between 86 and 120, so MapInfo puts the location 41% of the way down the street segment. This is not always accurate, and in our case the “dot” actually falls within the parcel for 104 Ash Street.

34 Crime Analysis with MapInfo Christopher W. Bruce

Intersections are easier. Intersections are specified with a double ampersand between them, as in “Sylvan St && Adams St”—MapInfo just puts the point at the location where they cross.

When MapInfo is finished matching the incident locations to street segments, you will receive a message box telling you how many it found and how many it did not. The ratio of successful geocodes to the total number of records is known as the hit rate. In our case, we got 651 out of 712, a hit rate of 91%.

>>Step 3: Click “OK.”

Though the incidents have been geocoded, they’re not visible on the map yet. Because when we opened the table, it had no geographic features, MapInfo by default opened the table without adding it to the current map window.

>>Step 4: Go to Layer Control, click “Add,” and add the “FallCrimes” layer.

You will now have a large number of dots—651, to be exact—on the map before you. But we’re still missing 9%, and we have to deal with that problem.

35 Crime Analysis with MapInfo Christopher W. Bruce

Troubleshooting Geocoding Problems

As we saw a minute ago, our “hit rate” for this particular geocoding session was 91%. As crime analysis goes, that’s not too bad. When address‐matching their data, analysts routinely get hit rates of 70%, 60%, or less. Many of them continue to work with this data because they don’t know what else to do. They create thematic maps of crime on which half their crime is missing.

There is only one acceptable hit rate: 100%.

Even if your hit rate is high—say 98%‐‐and you’re geocoding 1000 incidents, you miss 20 of them. That may not sound like a lot, but what if those 20 incidents were all at the same address that, for whatever reason, doesn’t appear in your map data? Or all on the same misspelled street? You might miss a significant hot spot.

Consequently, any data description and modeling that you perform on data with less than a 100% hit rate is polluted. You may send officers to the wrong locations. You may miss patterns.

To ensure that we achieve a 100% hit rate, we have to make our incident data match or map data— or, more specifically, get our records management system (RMS) data to match our MapInfo data.

A secondary goal is to minimize the amount of time you have to spend cleaning data. If you have to do a bunch of searches and replaces in Microsoft Excel every time you want to geocode a data set, you’ll swiftly become frustrated with the entire crime mapping process.

The easiest way to get the incident data to match your address data is to edit one or the other at its source. If your incident data consistently says, “1st St” and your MapInfo streets file has “First Street,”the permanent solution is to modify either your RMS library to say “First Street” or modify your MapInfo streets file to read “1st St.

This assumes, of course, that your RMS data is accurate and consistent. If the RMS allows data enterers to type in anything they want—instead of forcing them to enter a valid address—you might get records that say:

First St 1st St 1 St First Street Fist St 1st Av

And so on. Some of these are blatant errors while others are simply different ways of writing the same street. In such cases, the solutions become more complicated. You might pressure your

36 Crime Analysis with MapInfo Christopher W. Bruce

RMS vendor to modify the structure of the application, so that misspellings and bad entries are reduced. You can also modify MapInfo’s abbreviation table (below) so that MapInfo will convert common misspellings to correct addresses.

In the end, though, many analysts will have to perform substantial “cleaning” before they have adequately geocodable data. Both MapInfo and Excel offer search & replace features that are invaluable when cleaning data.

In our case, 82 incidents did not geocode. There are a number of reasons this could have happened:

• The street is spelled incorrectly, either in the incident data or in the map data • The street type (e.g., “Ave,” “St,” Dr,” “Way”) is incorrect, either in the incident data or in the map data • The street or street type, while spelled correctly, has a different format in the incident data than it does in the map data (e.g., “1stʺ vs. “First”; “Mass” vs. “Massachusetts”; “Ave” vs. “Av”; “Pk” vs. “Park”) • The incident address data contains the name of a business or other common place name (such as a park) instead of a street address • The street name and type are correct, but the address number in the incident data is not contained within the map data • The incident data refers to a street or intersection that does not exist in the map data • The incident data has an intersection but uses a non‐standard character (such as a slash or a single ampersand) to join them. • The address exists in more than one object (e.g., street segment) in the map data. • The MapInfo abbreviation table is making a default substitution that you don’t want it to make (see below) Let’s take another pass through the incident data and see if we can’t identify what the problems are.

>>Step 1: Choose Table | Geocode again. Retain all of the options as before, but this time change the mode to “interactive.” Click “OK.”

MapInfo will stop every time it finds an address it cannot geocode. It gives you the option to either edit the address or choose from a list of possible matches. Here are some of the problems it finds and the reasons it won’t geocode these locations.”

5 Independence Way Valid address, but not in the streets layer 92 Route 1 Route 1 in Danvers is called “Newbury St” 240 Independence Way Valid address, but not in the streets layer

37 Crime Analysis with MapInfo Christopher W. Bruce

4 Putnam Lane “Lane” is spelled out; streets layer has “Ln” Newbury St && Maple St Streets intersect in more than one location 50 Buxton Road “Road” spelled out; streets layer has “Rd” 1 Hathorne Circle Street does not exist in map files 175 Silvan St Misspelled; should be “Sylvan St” 100 Inpedendence Way Misspelled; should be “Independence” 0 McDewell Ave Incident data fails to include a street number Liberty Tree Mall A place name; address is 100 Independence Way 1058 Ash St Bad address; street numbers don’t go that high

We could solve these problems one at a time, in the interactive geocoding dialog, but some of them would continue to dog us every single time we geocode. Most of our problems have to do with the incident data, not the map data, so we have two solutions:

1. Edit the data in the original records management system 2. Edit the abbreviation file that serves as a translator between the two.

>>Step 2: Make a few changes in the interactive geocoding dialog just to get a few and see how it works; then we’ll move on to the abbreviation file.

There is one other option that can help us achieve a higher geocoding rate, though it’s technically cheating. MapInfo gives us the option to “Use the Closest Address” when it can’t find an address specified in our incident data. If we choose that option, we have to realize that our incident data won’t be spatially accurate, though it may be accurate enough for some analysis.

The Abbreviation File

The MapInfo abbreviation file is a powerful geocoding tool, and it’s practically a secret. You can’t open it from within MapInfo. But once you find it, you can instruct MapInfo to replace any word or phrase with a different word or phrase when geocoding, thus saving yourself hours of changing one record at a time.

The file is stored at C:\Program Files\MapInfo\Professional and is called Mapinfow.abb. It is a text file, and it opens in Microsoft’s Notepad.

The file consists of a bunch of words and phrases and their substitutions, separated with a simple space or series of spaces. Every time MapInfo sees “First” in your incident data, for instance, it automatically substitutes “1st.”

There are several sections in the abbreviation file. The first section simply specifies single‐word replacements: “N” for “North,” “Ln” for “Lane,” and so on. This alone will fix some of the problems that we had.

38 Crime Analysis with MapInfo Christopher W. Bruce

The second section begins with the code !EOLNOSPACE and consists of characters that MapInfo will ignore, along with everything coming after them. For instance, if your incident data contains addresses that read “101 Main St #140” or “120 Ash St, 01923”, it will ignore everything after the # sign and comma, reading only “101 Main St” and “120 Ash St.”

The section beginning !EOLSPACE works like the previous section, but it allows you to enter entire words or phrases (in quotes), like “Apt” and “Unit.”

The !NOSPACE section is a list of characters that MapInfo simply ignores. “St. John St.” will code as “St John St”—without the periods.

The final section, !SPACE, is the most useful: here you can enter entire phrases, such as “Liberty Tree Mall,” along with their correct addreses.

The difficulty is that the default abbreviation file contains a bunch of entries that you may not want. Perhaps both your incident data and your map data contain references to the street “North Square.” The default abbreviation table will automatically substitute “N Sq” when you try to geocode it and then MapInfo won’t be able to find the street! Make sure you delete entries that you don’t want from the abbreviation file as well as adding the things that you do.

>>Step 1: Save your workspace and close MapInfo. Use “My Computer” or Windows Explorer to find the abbreviation file at C:\Program Files\MapInfo\Professional. It’s called Mapinfow.abb. Open it.

>>Step 2: Add and delete entries to make the abbreviation file look like the one to the right.

>>Step 3: Re‐open MapInfo, choose “Restore Previous Session,” choose Table | Geocode and enter all of the same options as on Page 33. However, do not un‐check “Try Substitutions…”

39 Crime Analysis with MapInfo Christopher W. Bruce

You should now have reduced your un‐geocoded entries to around 35 (depending on how many you corrected in the interactive dialog).

>>Step 4: Choose Table | Geocode one more time, switch to interactive, and pick up as many of the rest as you can. Your goal is to get a result like the one to the right.

Dispersing Points

Within our incidents table are many that occurred at the same address. There are 70, for instance, at 100 Independence Way. But when multiple points occur at the same address, they all appear on top of each other and look like a single dot.

We can solve this problem one of two ways:

1. Create a graduated symbol map, which we’ll do in a later lesson 2. Disperse the extra points in a radius around the central one

In this lesson, we’re going to disperse the points, but please understand that we’re achieving one kind of spatial accuracy at the expense of another. I do not encourage casual use of the “disperse” tool.

“Disperse Points” is one of the many tools or scripts that come with MapInfo. You can find all of them in the Tool Manager.

Before we disperse the points, we’ll save a copy of the table so that if we want to return to the original, un‐dispersed table, we can

>>Step 1: Choose File | Save Copy As. Choose “FallCrimes” and click “Save As.” Save it in C:\MICA\SampleData as “FallCrimesDispersed.”

>>Step 2: Choose File | Close Table and close “FallCrimes.” Then File | Open and open “FallCrimesDispersed.”

>>Step 3: Choose Tools | Tool Manager.

40 Crime Analysis with MapInfo Christopher W. Bruce

It’s worth taking a minute to explain the tool manager. Many of the most useful features of MapInfo are buried in this fairly obscure location. Scroll through the tools and read their descriptions—some of them sound pretty useful, don’t they? For what it’s worth, I make regular use of:

Coordinate Extractor Disperse Points Grid Maker Legend Manager Line Snap Tool North Arrow Rotate Map Window Rotate Symbols ScaleBar Search and Replace Universal Translator

The “Loaded” column indicates whether each tool is currently loaded, at which point it will be available under the Tools menu and on the Tools toolbar. The “Autoload” column specifies whether you want the tool to always be loaded.

>>Step 4: “Load” and “Autoload” the “Disperse Points” tool. Click “OK.”

>>Step 5: Zoom in so that only about one‐ quarter of the town is showing in the Map Window. Choose Tools | Disperse | Disperse Points.

>>Step 6: Select the “FallCrimesDispersed” table and click “Continue.” Accept the default dispersion method and click “OK.” Un‐check “Display Mapper When Finished” and click “OK.”

In several places—particularly the lower right corner, you’ll see a lot more dots than before.

41 Crime Analysis with MapInfo Christopher W. Bruce

Other Ways to Geocode

As I mentioned before, using the street centerline file is only one method of geocoding. Perhaps a more accurate method is to use the parcel layer (or building layer, if it contains addresses). When you use a parcel or building layer, you are matching the incident address to only a single field—the parcel or building address—which means that MapInfo doesn’t have to interpolate the position of the point—it just puts it in the middle of the polygon. This usually results in more accurate geocoding.

Not all of your addresses will have parcels or buildings, but the beauty of MapInfo is that you can geocode the same file to multiple layers. You may want to start with parcels, get as many as you can, and then move on to the streets layer.

If you ever want to scrap your geocoding and start again, you can do so by going to Table | Maintenance | Table Structure and selecting your incidents table. Then un‐check the “Table is Mappable” box, and all of your points will disappear.

Geocoding Your Own Data

I have been aggressively editing both my incident data and map data for years, and I routinely get a 100% hit rate. I had to create errors to “miss” most of the 61 above.

You may not be so lucky. Depending on the quality of the data in your RMS system and map files, you may have multiple errors and mis‐matches. We’ll spend some time trying to geocode your incident data, solving problems, and getting as close to a 100% hit rate as possible.

42 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 4: Editing Map Objects and Data

The sections in this lesson will illustrate how to edit both physical map objects and the underlying tabular data. We will create new maps and edit existing maps.

How MapInfo Saves Files

Each layer, a term MapInfo often uses interchangeably with “table,” is actually stored in several files—between three and five. Open the C:\MICA\SampleData directory, and you’ll see that the buildings layer, for instance, is actually made up of five files:

Buildings.dat Buildings.id Buildings.map Buildings.tab

Some layers have a fifth file: an .ind file.

All of these files are necessary to open the layer in MapInfo—even though, when you choose File | Open, you only see the .tab file. If you want to re‐name the buildings layer in Windows Explorer, you need to re‐name all these files. If you want to move a layer to a different directory, you have to make sure you move all the files.

Each of these files stores different information about the map layer. The .dat file, for instance, stores the geographic coordinates of the objects in the layer. The .tab file identifies the fields in the tabular data and includes display information for each layer. The important thing is that they’re all necessary to make up the layer.

Changing the Permanent Appearance of Features

Each layer has information about its styles—points, lines, and polygons—saved in the .tab file. We saw earlier how you could override that style in Layer Control. The override, however, applies only to the one Map Window in the one workspace.

To permanently change the appearance of a layer, we need to save it into the table. We’ll change the size and color of the symbol in the schools layer.

>>Step 1: Open Layer Control. Make every layer that appears before the Schools layer unselectable by un‐checking the “selectable” checkbox .

>>Step 2: Make the “schools” layer editable by checking the box under the pencil . Then click “OK.”

43 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 3: Choose Query | Select All from Schools. (This menu command automatically populates with the highest selectable layer‐that’s why we unselected everything else.)

>>Step 4: Choose Option | Symbol Styles. Change the symbol size to 18 and the color to whatever you want. Click “OK.” The symbol for the schools should change.

>>Step 5: Un‐select the schools by choosing Query | Unselect All or by clicking the “Unselect All” tool .

>>Step 6: Save the table via File | Save Table.

The schools layer will now have this new appearance in any new or existing workspace that uses it.

Not all objects in one layer need have the same style. Note how the major highways in Danvers are a bit thicker than the regular streets. You can select only certain objects and modify their styles. In the case of schools, we could make some schools a different symbol than others.

Modifying Tabular Data with the Information Tool

Earlier, we used the “Info” tool to display the attribute data associated with various map objects. You can also use the “Info Tool” box to edit that data—and the layer doesn’t even have to be editable to do it.

>>Step 1: Use Query | Find to find “120 Ash St.”

>>Step 2: Click on the “Info” tool and click on the street segment next to 120 Ash St. Choose “Streets: Ash St” in the dialog box.

You receive the “Info Tool” dialog box, showing that the “Street” name is “Ash St” and the address range is 86–120 on the left and 95–125 on the right. A new house has been built next to 120 Ash Street with an address of 124. We need to add this address number to our available street range so we can geocode it properly.

>>Step 3: In the “Info Tool” box, click in the “ToLeft” field and change the value from 120 to 124.

>>Step 4: Close the “Info Tool” box. Choose File | Save Table to save the changes.

44 Crime Analysis with MapInfo Christopher W. Bruce

Search and Replace

One of the tools available to you in Tool Manager is called “Search & Replace.” It performs a function similar to Find & Replace in any of the various Microsoft applications.

We have a street in Danvers known as Massachusetts Ave, except no one calls it Massachusetts Ave—they just call it Mass Ave. Our incident data, from our records management system, lists everything that happens on this street as “Mass Ave.” Consequently, it would be prudent to change this street name in our map data. Massachusetts Ave has multiple segments, however, and it would take some time to manually replace each one in the Info Tool box.

>>Step 1: Choose Tools | Tool Manager. Find the “Search & Replace” tool and click the “Loaded” box. Then click “OK.”

>>Step 2: Choose Tools | Search & Replace. Search the “streets” and the “Street” column for “Massachusetts Ave,” replacing it with “Mass Ave”

>>Step 3: When finished, save the table through File | Save Table.

45 Crime Analysis with MapInfo Christopher W. Bruce

Adding a New Street

A developer has added a new street to Danvers, at the end of an existing street called Ashley Street. We need to draw this on our map.

>>Step 1: In Layer Control, make sure the “streets” layer is editable.

>>Step 2: Use Query | Find to find “Ashley St”

Before we can add a new street, we need to set its style. It’s probably easiest to set the style for the new street to be identical to existing ones.

>>Step 3: Select Ashley Street with the selector . Choose Options | Line Style and immediately click “OK.” This will set styles for new streets to be identical to Ashley Street.

We’re now ready to draw our new street, which will run at a 90‐degree angle northeast from the end of Ashley Street. We want to make sure that the beginning of the new street starts exactly at the end of Ashley Street—the two streets must intersect. It’s impossible to obtain that level of precision with our hands and mice; we need MapInfo’s “Snap” feature.

>>Step 4: Type the “S” key on the keyboard. On the Status Bar at the bottom, the word “snap” will appear.

>>Step 5: Click the “Line” tool on the drawing toolbar. Move your cursor over to the end of Ashley Street. As soon as you get near the end, a large crosshair will appear—this indicates that the “snap” feature is working.

>>Step 6: Click while the crosshair is active, hold down the mouse button, and draw a line to the northeast, about halfway to the circle that ends Michael Drive. When finished, release the mouse button.

We now have a new street, but it has no attribute data.

>>Step 7: Use the “Info” tool to click on the new street, and type in the attribute data show on the next page. Then close the “Info Tool” box and choose File | Save Table to save the changes to your streets file.

46 Crime Analysis with MapInfo Christopher W. Bruce

Deleting a Street

To get rid of a street (or any object) that you don’t want, simply select it with the selector and type the DELETE key on the keyboard.

Creating a Polygon Layer

The principles in this lesson can be used to create any boundary or polygon layer, including boundaries for police beats, districts, or other areas.

We want to create a new table to record the location of town parks. First, we have to create a new table to store this information.

>>Step 1: Choose File | New Table. Select “Add to Current Mapper” and click “Create.”

>>Step 2: Add two fields: Name (Character, 20) and Address (Character, 40). Click “Create.”

>>Step 3: Navigate to C:\MICA\SampleData and save the table as Parks.tab.

47 Crime Analysis with MapInfo Christopher W. Bruce

The new “Parks” table will appear in Layer Control and will automatically be editable.

Our first park will be in the circle formed by Anna Drive and Danielle Drive.

>>Step 4: Use Query | Find to find “Anna Dr”; zoom‐in so that the cirle made up by Danielle Drive fills the screen.

>>Step 5: Set your parks style under Options | Region Style. Choose whatever fill pattern, color, and border style you’d like, or use the example on the image here. Then click “OK.”

>>Step 6: If it’s not already turned on, turn “Snap” on by typing the “S” key.

>>Step 7: Select the “Polygon” drawing tool .

>>Step 8: Start drawing your new park. Follow the streets along Anna Drive and Danielle Drive, clicking once every time the crosshair appears.

48 Crime Analysis with MapInfo Christopher W. Bruce

It’s not easy to hit all of those snaps! That’s because an accurate street will have a lot of nodes to which to snap. As you draw, the boundary line you’re drawing will “white out” the streets underneath it. That’s okay—it’s supposed to happen. In fact, you’ll know you haven’t missed any nodes as long as none of the street is visible where you’ve already been.

(You can make it easier on yourself by showing the nodes you’re snapping to. In Layer Control, you can choose the streets layer, click “Display,” and click “Show Nodes.”)

When you get back to your starting point, the polygon will fill in, and you’ll have a new park.

>>Step 9: Use the “Info” tool to click on your new park and give it a name (your choice) and an address of “5 Danielle Dr.” Make sure you save the layer from File | Save Table.

Editing Map Objects

Whoops! We just stuck our new park on top of an existing house. It turns out that the new park doesn’t cover the entire loop—just the eastern two‐thirds of it. We need to edit the polygon so it doesn’t look like the house is in the middle of a playground.

49 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 1: In Layer Control, move the “buildings” layer above the “parks” layer so you can see the problem. Then return to Layer Control and make the “parcels” layer visible and selectable, and move it above “parks” but below “buildings.”

We see a bunch of parcels on Danielle Drive and Anna Drive that have no houses on them— these have been combined to make the park. We need to draw the park to exclude the parcel with the house on it.

>>Step 2: Use your selector to select the park. Click the “Reshape” tool on the drawing toolbar.

The nodes that make up the park boundary now become visible. You can use the selector tool to click on individual nodes and move them (with the snap function on) or delete them.

>>Step 3: Move the nodes to exclude the parcel with the house on it. Delete unnecessary nodes. If you need to add an extra node, use the “Add Node” tool .

Table Maintenance

If you decide that you want to add fields to a table, rename fields, change the properties of fields, or delete fields, you can access the structure of the table under Table | Maintenance | Table Structure. If you delete a lot of objects from a layer, you can make the table take up less file space (and open more quickly) by choosing Table | Maintenance | Pack Table.

50 Crime Analysis with MapInfo Christopher W. Bruce

Working with Your Agency’s Data

Use these lessons to now:

• Change the permanent appearance of some of your agency’s map data • Fix errors in the attribute data • Add or delete objects you know are incorrect • Create a Schools (or other) table with point objects

51 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 5: Querying and Selecting Data

The analytical power of MapInfo comes with the ability to query spatial data. Earlier, we created a pin map that included all Danvers crime in the fall of 2005. How valuable is this pin map for analysis purposes? Not very. We need to narrow it down, showing only certain crimes or crime categories, before the map has any analytical use.

There are essentially two ways to select data in MapInfo:

• By selecting the objects themselves • By querying the underlying tabular data

We’re going to explore both ways below.

Select Queries

We’ll begin with a select query that we can use to pull particular incidents out of the “FallCrimesDispersed” table.

>>Step 1: If it’s not already open, open “FallCrimesDispersed.”

>>Step 2: Choose Query | Select. Fill in the dialog box as below and click “OK.”

The query will select the larcenies from motor vehicles out of the “FallCrimesDispersed” table and store them in a temporary table called “LMVs.”

>>Step 3: Go to Layer Control. Make the “FallCrimesDispersed” table invisible . Click the “Add” button and add “LMVs.” Then click “OK.”

Now our map shows only thefts from cars in the fall. See any hot spots?

52 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 4: When you’re done looking, go back to Layer Control. Remove the “LMVs” table and make the “FallCrimesDispersed” table visible again.

We can try a more complicated query that finds all incidents of domestic assault and intimidation.

>>Step 5: Repeat the process above, but use the following parameters.

That satisfy: (IncidentType like “%Assault” or IncidentType=”Threats”) and Domestic=”True”

Store Results in Table: “Domestics”

>>Step 6: Make “FallCrimesDispersed” invisible, “Add” the “Domestics” table, and view the results.

53 Crime Analysis with MapInfo Christopher W. Bruce

SQL Queries

Users familiar with Standard Query Language (SQL) may want to use the Query | SQL Select command for their queries. This dialog box walks you through the steps to create a SQL query out of one or more tables. The SQL query dialog box below replicates the domestic query we just created above.

The main difference between standard queries and SQL queries is that you can order and group (aggregate) the results of an SQL query.

54 Crime Analysis with MapInfo Christopher W. Bruce

Creating New Layers, Tables

Note that every time you perform either a select query or SQL query, MapInfo saves the results in a new, temporary layer. If you don’t specify a name for the layer, MapInfo will call it “Query1,” “Query2,” and so on. Whatever you name the layer, you can save it to the workspace and treat it as if it was a separate table, even though it draws all of its information from the source table.

If you want to save the results of a query as a separate table, independent from the original, you can do so by choosing File | Save Copy As.

Selecting by Polygons

You can select objects based on their spatial location using the various polygon select tools.

Marquee Select selects all the objects in a square you draw. Radius Select selects all the objects in a radius you draw. Polygon Select selects all he objects in a free‐form polygon you draw. Boundary Select selects all the objects in a polygon layer you have open.

In all cases, the objects selected are the ones that appear in the topmost selectable layer in Layer Control.

We might want to use the “Radius Select” to select all the incidents that occurred within a radius of a particular address. Assume that the resident of 88 Poplar Street wants to know what’s been happening around her house lately.

>>Step 1: Make sure that “FallCrimesDispersed” is the topmost selectable layer in Layer Control.

>>Step 2: Use Query | Find to find “88 Poplar St”

>>Step 3: Click on the “Radius Select” tool . Click on 88 Poplar Street. Hold the mouse button down and drag outward. Watch the “Radius” box on the status bar in the lower left‐hand corner. Drag until the radius reads .2500 miles or something close, then release the mouse button.

>>Step 4: Browse these incidents by choosing Window | New Browser Window and choosing “Selection.”

55 Crime Analysis with MapInfo Christopher W. Bruce

Selecting by Buffers

Sometimes, we may wan to select everything in a radius around multiple objects—for instance, all drug arrests within 100 feet of public parks, or all sex offenders living within a half‐mile of schools. To accomplish this, we need to create a buffer layer that draws a buffer around each of our objects, and then select all of the incidents within that buffer.

56 Crime Analysis with MapInfo Christopher W. Bruce

We will find all of the assaults within 1000 feet of a school.

>>Step 1: Make sure the “Schools” layer is open. In Layer Control, make sure it is the topmost selectable layer.

>>Step 2: Choose Query | Select All from Schools

>>Step 3: Return to Layer Control and make the cosmetic layer editable. Then clear the cosmetic layer by choosing Map | Clear Cosmetic Layer.

>>Step 4: Choose Objects | Buffer. Fill in the dialog box as to the right, then click “OK.”

MapInfo will create, in the cosmetic layer, a buffer layer that surrounds each school by 1000 feet. We wan to save this buffer in its own layer.

>>Step 5: Choose Map | Save Cosmetic Objects. Save them in a new layer called SchoolBuffer.tab.

>>Step 6: Choose Query | Select and create a new query that finds all assaults.

>>Step 7: Return to Layer Control. Make “FallCrimesDispersed” invisible and “Add” the new “Assaults” table.

Now, our final step is to find all assaults that have occurred within 1000 feet of a school—that is, within the school buffers layer.

MapInfo will only perform selects of this nature on “base tables”—that is, tables that are independent of other tables. To do this, we must first save “Assaults” as its own table.

57 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 8: Choose File | Save Copy As. Save “Assaults” as Assaults.tab. Perform a File | Close Table and close “Assaults” (this closes the temporary table), then File | Open and open the Assaults.tab table.

>>Step 9: Choose Query | SQL Select and fill in the dialog as below.

You now have a list of all assaults within 1000 feet of Danvers schools.

Working with Your Own Agency’s Data

Use these lessons to query and select incidents from your own agency’s data. Use the “Schools” layer we created earlier to perform the buffer lesson above.

58 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 6: Thematic Maps and Analysis

The pin map, which we created in the third lesson, can help us visualize the geography of crime, but it usually serves as a jumping‐off point for more advanced maps. These “advanced” maps, which use the pin map as the base, are known as thematic maps.

Creating a Grid

Before we begin creating our thematic maps, we need to create a polygon layer that fits over our entire jurisdiction, and that offers polygons of equal size. The easiest way to do this is to draw a grid over the area.

>>Step 1: Zoom out until all of Danvers is visible.

>>Step 2: Choose Tools | Tool Manager. Scroll down until you find “Grid Maker.” Click the “Loaded” box and then click “OK.”

>>Step 3: A new “Create Grid” tool appears on the “Tools” toolbar. Click on this tool. Your cursor changes to a crosshair.

>>Step 4: Click in the upper left‐hand corner of your Map Window, hold down the mouse button, and drag a box over the entire town, down to the lower right‐hand corner. Release. Fill in the dialog box with the file path and the line spacing below.

>>Step 5: Click “OK” and a new grid appears over your map window. Save it by choosing File | Save Table. Finally, close the table by choosing File | Close Table.

>>Step 6: Repeat Steps 1 to 5, but this time use a spacing of 400 feet. Call the grid GridSmall.tab.

59 Crime Analysis with MapInfo Christopher W. Bruce

The large grid will be suitable for a choropleth map, which uses colored areas. The smaller grid will be more suitable for graduated symbol maps and surface density maps, which we’ll aggregate (roughly) by individual addresses.

Aggregating Data

The first step towards creating a choropleth, graduated symbol, or surface density map is to aggregate the data by grid cell—to count the number of incidents in each cell.

>>Step 1: Make sure the following layers are open and in Layer Control: streets, GridSmall, and FallCrimes (close “FallCrimesDispersed” and re‐open “FallCrimes”).

>>Step 2: Choose Table | Update Column. Fill in the dialog box as below.

>>Step 3: Click on the “Join” button and verify that the join reads “where the object from FallCrimes is within the table GridSmall.” Then click “OK.”

>>Step 4: Browse through the resultant table, and you’ll see that you now have a count of the number of incidents in each grid cell. The majority of cells have no incidents. Close the browser window when finished.

Calculating Statistics

Now that we have an aggregated field, we can see some statistics for those counts.

>>Step 1: Choose Query | Calculate Statistics

>>Step 2: From the “GridSmall” table, choose the “CountofFallCrime” field.

The results are to the right (yours may differ slightly). You can calculate statistics like these for any number field in any table.

60 Crime Analysis with MapInfo Christopher W. Bruce

Graduated Symbol Maps

Now we’re ready to create our first thematic map—a graduated symbol map—using the counts in our “GridSmall” table.

>>Step 1: Choose Map | Create Thematic Map. Click on the “Graduated” button and choose “Graduated Symbol Default.” Then click “Next.”

>>Step 2: Specify the “GridSmall” table and the “CountofFallCrimes” field. Click the “Ignore zeroes or blanks” field.

>>Step 3: Accept the default settings, or increase the maximum symbol size to 48 at a value of 70, as I did on the next page.

>>Step 4: Change the “Legend” options to make the title “Crimes by Volume” with a subtitle of “Fall, 2005.” Set the fonts as you prefer.

61 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 5: In Layer Control, make the “FallCrimes” and “GridSmall” tables invisible so you can see the entire graduated symbol map. Note the legend window that appears.

The graduated symbol map makes the hot spots stand out much more visibly than with the simple pin map, and it doesn’t sacrifice geographic accuracy as with the dispersed pin map.

62 Crime Analysis with MapInfo Christopher W. Bruce

Point Symbol Maps

A point symbol map color‐codes or symbol‐codes incidents based on a category or range. We’ll create a point symbol map that symbol‐codes our incidents by crime type. First, though, let’s query out a subset of incidents around the holidays.

>>Step 1: Close the “FallCrimes” layer and open “FallCrimesDispersed.”

>>Step 2: Choose Query | Select. Fill in the select box as below to pull out only the crimes in the last half of December.

>>Step 3: Close the Browser Window, go to Layer Control, “Add” the “Holiday Crimes” table and make the “FallCrimesDispersed” table invisible.

>>Step 4: Choose Map | Create Thematic Map. Click on the “Individual” button and choose “Point IndValue Default” and then “Next.”

>>Step 5: Choose the “HolidayCrimes” table and the “IncidentType” field and then click “Next.”

>>Step 6: Click the “Styles” button and set the different symbol and color styles for each crime. For crimes that are similar—like the various larcenies or two types of assault—you may want to choose the same symbol but a different color. Note that you are not limited to one font set—you can change the font from “MapInfo 3.0 Compatible” to other symbol fonts. “MapInfo Miscellaneous” has some crime‐related fonts. Experiment with halos and borders.

63 Crime Analysis with MapInfo Christopher W. Bruce

>>Step 7: Make sure you set the “Legend” options. When finished, click “OK” to see your map.

64 Crime Analysis with MapInfo Christopher W. Bruce

In reality, we have too many incident type categories to make a coherent point symbol map. In creating such maps for your own agency, you should query out a limited number of incidents so you limit the number of categories on your map.

Choropleth Maps

Choropleth maps create colored or patterned regions based on a value (such as the number of crimes) within them.

Our “GridSmall” grid cells are too small to create a good choropleth map—only a small numer of cells have any incidents in them at all.

>>Step 1: Make sure the “GridLarge” and “FallCrimes” (not dispersed) are open and active in Layer Control.

>>Step 2: Choose Map | Create Thematic Map. Click the “Ranges” button and choose “Region Ranges Default.”

65 Crime Analysis with MapInfo Christopher W. Bruce

When we created the graduated symbol map based on the counts in the “GridSmall” table, we had already done a table update to calculate the number of crimes in each grid cell. However, we can also do this count dynamically, while we create the thematic map.

>>Step 3: Choose the “GridLarge” table and ignore zeroes and blanks. For the field, we want to perform a “Join”—that word may already be in the field, but we have to pull down the list and select it again.

>>Step 4: We get the value from “FallCrimes” and calculate the “Count.” Click on the “Join” button and make sure the join property is set to “Where object from FallCrimes is within object from table GridLarge.” Click “OK.”

When you return to Step 2, you will see that “CountofFallCrimes”—the new temporary field—is filled in the “Field” drop‐down.

>>Step 5: Click “Next.” In Step 3 of the process, we have to make several settings for how our choropleth map appears.

The “Method” field (under the “Ranges” button) offers several options for choosing how many cells get assigned each color, and how the ranges are chosen. Try choosing each one and clicking “Recalc” to see the difference. The usual goal is to have the smallest number of cells in the top range and the largest in the bottom range. “Natural Break” and “Quantile” both work for these purposes, but it’s worth understanding what each of the options does.

66 Crime Analysis with MapInfo Christopher W. Bruce

Typing F1 while in this dialog box gives you a detailed description of each method.

>>Step 6: Under “Ranges,” choose the “Natural Break” method. Change the “Styles” button to allot the color ramp that you prefer. Click the “Legend” button to add a sensible legend. When finished, click “OK.”

The result is a colored area map that shows hot spots across the town.

>>Step 7: In Layer Control, make “FallCrimes” and the grid invisible, but not the thematic.

67 Crime Analysis with MapInfo Christopher W. Bruce

Keep in mind that you can use any polygon layer—grids, census blocks, cities and towns, police boundaries, and so on—to create a choropleth map. The example below, which we may do in class (if we have time), shows populations for Massachusetts cities and towns.

Surface Density Maps

Density maps, apart from “looking cool,” raise accuracy issues when it comes to crime mapping. They are most valuable for phenomena like weather, where they interpolate, or estimate, temperatures and barometric pressures across large regions, based on samples taken from different locations within those regions.

Density maps essentially provide a “risk surface” for crime, based on locations of known crimes. In a graduated symbol map, if 120 Ash Street has 15 crimes and 130 Ash Street has no crimes, 120 Ash Street will show up as a “hot spot” and 130 won’t. But in a density map, 130 will feel the effects of nearby 120. Areas in between known hot spots will show up as “hot” even if they haven’t had any offenses. How valid is this for crime mapping? The debate goes on.

68 Crime Analysis with MapInfo Christopher W. Bruce

To create a surface map—which MapInfo calls a “Grid” map—we must begin with a layer that aggregates incidents in small areas—either by point or by very small grid cells. Fortunately, we already have just such a layer.

>>Step 1: Make sure “GridSmall,” “FallCrimes,” (not dispersed), and “Streets” are all open and active in Layer Control. File | Close Table everything else. File | Open the “Boundary” table.

>>Step 2: Choose Map | Create Thematic Map. Click the “Grid” button and choose “Grid Default.”

>>Step 3: Specify the “GridSmall” button and the “CountofFallCrimes” field. Ignore zeroes and blanks. Clip against the “Boundary” table. Click “Next.”

>>Step 4: Click on the “Settings” button.

There are two important fields here: “Exponent” and “Search Radius.” The search radius tells MapInfo how far each cell should search “outwards” for crimes that influence it. The exponent tells MapInfo how much weight each crime should have on nearby cells. A smaller exponent means more weight; a larger exponent means less weight.

69 Crime Analysis with MapInfo Christopher W. Bruce

Consequently, you have four options, each of which will produce a different looking surface density map:

Exponent Large Small Large Mild influence spread out over Strong influence spread out over large area. Hot spots unlikely to large area. Many areas look stand out; everything will look “warm” or “hot.” “cool” or “warm” Small Hot spots will stand out, but Only a small number of tight hot Radius Search some may show exaggerated spots appear. Less severe hot influence spots do not show up.

There is no “right” way to calibrate the settings, just a matter of judgment. Do you want to highlight only the hottest spots, and only in their exact area of influence? Use a small exponent and a small search radius. Do you want to show more potential “hot spots” and are you willing to run the risk of a little exaggeration? Use a large search radius and a small exponent.

>>Step 5: Set the exponent to 1 and the search radius to 2 miles. Then click “OK.”

>>Step 6: Click on “Styles.” Change the method to “Custom Value Ranges” and the number of inflections to 4. Double‐click on the colors and adjust them as you see fit. Change the values to 8, 6, 4, and 2.

>>Step 7: Click on the “Legend” and give it a sensible title. Then “OK” everything and see the result.

>>Step 8: To see it better, go to Layer Control and turn off both “GridSmall” and “FallCrimes.” Elevate the streets layer above the grid count.

The result is on the next page. If you want to try to test different exponents, search radii, and other settings, you can go to Layer Control, select the “GridSmall_CountofFallCrimes” layer, and click the “Thematic” button.

70 Crime Analysis with MapInfo Christopher W. Bruce

3‐D Maps

You can add a three‐dimensional quality to a density map by choosing Map | Create 3‐D Map. Similarly, you can create a 3‐D map out of a choropleth map by choosing Map | Create Prism Map. But seriously, aren’t we going a little too far here?

Your Own Data

Try some of these thematic maps with your own agency’s data. Create a grid over your jurisdiction, count the number of incidents in each cell, and base a graduated symbol or choropleth map o these counts. Try a surface density map if you’re feeling brave.

71 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 7: Working with Images

Images are what are known, in mapping parlance, as raster data. They are composed of pixels instead of coordinates, consist only of a single object, and have no underlying attribute data.

There are two ways to deal with raster images in MapInfo: to simply open them, for use in layouts (next lesson), or to register them with geographic coordinates, so you can view them along with your vector data.

Opening an Image

To open an image, simply:

>>Step 1: Choose File | Open. Change “Files of Type” to read “Raster Image.”

>>Step 2: Navigate to C:\MICA\SampleData\ compassrose.gif and click “Open.” In the dialog box that follows, simply choose “display.”

Immediately, you have a nice looking compass to use in future layouts. Since it has no geographic coordinates, it opens in its own Map Window. Note that this Map Window has a layer control and a cosmetic layer. You can draw things in the window and add text—you just can’t bring in any other vector layers (well, you can, but it won’t make any sense).

Registering a Raster Image

Registering a raster image involves assigning geographic coordinates to different points on the image. You do this by selecting points on existing vector data that correspond with the points on the image.

>>Step 1: Choose File | Open. Change “Files of Type” to “Raster Image.” Select DanversAerial.jpg and click “Open.”

>>Step 2: Tell MapInfo that you want to “Register” the image. The “Image Registration” window opens.

72 Crime Analysis with MapInfo Christopher W. Bruce

The key is to find points along the aerial image that can be easily identified with vector data in your Map Window. The different points along the Reservoir and the intersections along Route 1 are all good choices.

>>Step 3: Identify five points on the image. Click them one‐by‐one and name them.

>>Step 4: Select the first point and choose Table | Raster | Select Control Point from Map. Then click on the corresponding location in the Map Window. Repeat for the other four points.

>>Step 5: When you get done, look at the “Error” column. Each of the entries should be less than five, or you’re going to end up with a wacky image. When you’re done, click “OK” and see how well the raster image matches with the vector data. My result is on the next page.

Working with Your Own Data

Download a satellite photo of your own jurisdiction from Microsoft’s Terraserver at http://terraserver.microsoft.com. Try to register the photo against your own streets file.

73 Crime Analysis with MapInfo Christopher W. Bruce

74 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 8: Map Presentation

In this lesson, we learn how to manipulate our maps, create layouts, and insert maps into reports and presentations.

Rotating a Map Window

By default, north is always up in MapInfo maps. It doesn’t have to be this way, though—you can rotate the Map Window to put north in any direction you want.

>>Step 1: Choose Tools | Tool Manager. Scroll down until you find the “Rotate Map Window” tool. Click the “Loaded” button and then “OK.”

>>Step 2: Choose Tools | Rotate Map Window | Rotate Map Window. Specify a rotation of 90 degrees and click “Rotate.” Try various other rotations. When you’re done, click “Unrotate.”

Note that symbols do not rotate with the Map Window. If you have a symbol with a north arrow, it will not rotate, and the arrow will be wrong.

75 Crime Analysis with MapInfo Christopher W. Bruce

Clip Regions

Clip regions allow you to select only part of the Map Window for display. You can clip based on an existing polygon layer—such as a patrol area—or you can clip based on a polygon that you draw. Clip regions help make for attractive insertions in bulletins and reports.

>>Step 1: In Layer Control, make the cosmetic layer editable.

>>Step 2: Click the “Elipse” drawing tool . Draw an elipse around a section of your map— perhaps the “hot spot” at the Liberty Tree Mall.

>>Step 3: Use the selector to select the ellipse.

>>Step 4: Choose Map | Set Clip Region. Choose to “Discard” the cosmetic object.

>>Step 5: To remove a clip region, choose Map | Clip Region Off.

Copying a Map Window

Unlike most GIS applications, MapInfo allows you to copy the current map window directly to the clipboard by simply choosing Edit | Copy Map Window. You can then paste this window into Microsoft Word, Microsoft PowerPoint, or just about any other Windows application.

It’s even better, though: Windows recognizes MapInfo objects for what they are. When you paste a MapInfo map into Microsoft Word, it doesn’t just paste it as a picture. It’s pasted as a link to the original data files, which means that even after you’ve closed and quit MapInfo, you can still double‐click on the map in Word (or whatever application you’re using), and, as long as the original MapInfo files are still in the same location, a mini‐version of MapInfo opens within Word, allowing you to pan, zoom in and out, identify objects, and re‐arrange your layers.

One caveat: Since the object, once pasted in another application, is still a MapInfo object, the MapInfo fonts that you’ve used within the map must be on the computer for it to display properly. If you transfer the document to a different computer that doesn’t have MapInfo installed, your carefully chosen symbols (e.g., little handguns, vehicles, people) will not display—the computer will revert to the analog symbol in a different font set, and you’ll be

76 Crime Analysis with MapInfo Christopher W. Bruce faced with number signs, dollar signs, and so on. If you’re going to display the MapInfo map on a computer that doesn’t have the MapInfo fonts installed, paste it into Word or PowerPoint as a picture (Edit | Paste Special), not a MapInfo map object.

Since the Legend Window is a separate window than the Map Window, it doesn’t come along with the Map Window when you copy it. The way around this is to load the tool “Legend Manager,” and choose Tools | Thematic Legend Manager | Embed Thematic Legend. This makes the legend part of the Map Window, allowing you to copy it with the map. This saves you from having to go through the rigmarole of a layout (see below).

77 Crime Analysis with MapInfo Christopher W. Bruce

Saving a Map Window as an Image

To save a Map Window as an image, simply choose File | Save Window As. You can save it as a bitmap, a JPEG, or a bunch of other image formats. You can then import the image into other applications.

Creating a Layout

With the Thematic Legend Manager, you can copy most of your maps directly from the Map Window, but if you want to be able to show multiple Map Windows at the same time, along with Browser Windows, images, and other types of windows, you’ll need a layout.

To create a layout with your Map Window (or multiple Map Windows) and legends, make sure all windows are open. Then choose Window | New Layout Window and “One frame for all currently open windows.”

Once you’re in the Layout Window, you’ll need to specify the orientation (File | Page Setup) and re‐arrange and re‐size your windows. You can add text or other drawing objects to your layout with the tools on the “Drawing” toolbar.

If you want to add a north arrow, add a symbol and choose the font “MapInfo Arrows”—or you can use the compass rose image we opened earlier.

You can find a ScaleBar tool in Tools | Tool Manager . You can add the scale bar directly to the layout if there’s only one Map Window; otherwise, you’ll have to add a separate scale to each Map Window.

78 Crime Analysis with MapInfo Christopher W. Bruce

Exporting a Layout

Unfortunately, you can’t copy a Layout Window to the clipboard like you can with a Map Window. If you want to insert a layout into Microsoft Word or PowerPoint, you first have to save it as an image by choosing File | Save Window As.

Hotlinking

Hotlinking allows you to add hyperlinks to your map objects. Any object, in any layer, can have a hotlink. Simply add a field to the table (Table | Maintenance | Table Structure) called “Link” or “Hyperlink” or something. For each object, type in a file path or URL in that field. If you have a map of known offenders, you may want to type a file path (e.g., S:\Photos\Offenders\Bruce.jpg) that links to their photographs. If you have a parcels map, perhaps you want to type a URL that links to a picture of the property.

Once you have the field in place, open the table in a map and go to Layer Control. Choose the appropriate layer and click the “Hotlink” button. From the dropdown menu, select your “link” field.

79 Crime Analysis with MapInfo Christopher W. Bruce

Once you’ve set this up, you simply have to click on the object with the “Hotlink” tool to open the associated link.

In the example here, I’ve hotlinked all of my Massachusetts cities and town polygons with the city or town web site. Using he hotlink tool to click on the city of Cambridge in the map brings up the City of Cambridge’s official web site.

80 Crime Analysis with MapInfo Christopher W. Bruce

Lesson 9: Other MapInfo Products

This class has provided an overview of MapInfo Professional 8.0. As you increase your skills with crime mapping and with MapInfo, you may want to explore some of MapInfo’s other products:

MapInfo ProViewer

MapInfo ProViewer is a free piece of software that you can download from MapInfo’s web site. It’s worth getting. ProViewer allows someone without MapInfo installed on his or her computer to open a workspace. The user can’t make changes or create maps, but he or she can zoom in and out, pan, use the “Info” tool, and search for features or addresses. This is a great way to publish workspaces that you create to everyone’s desktop, whether a standard map of your jurisdiction or a detailed map of crime events in the last 60 days.

MapInfo Discovery

MapInfo Discovery is like ProViewer, except that it is browser‐based, offers more options for publishing maps, and isn’t free.

MapMarker

MapMarker is a geocoding engine that includes nationwide street data. MapMarker Plus offers edited, more geographically accurate street data, while MapMarker uses Tiger 2000 data. It’s a good solution if you want to geocode large sets of data outside your jurisdiction—for instance, the home addresses of everyone you’ve ever arrested. The geocoding engine offers an easy‐to‐ use interface for advanced geocoding options, but it’s not really any more “powerful” than the geocoding engine that comes with MapInfo Professional.

MapXTreme

MapInfo’s MapXTreme allows you to share maps over the Internet or an intranet. You install MapXTreme on a web server and configure it to publish interactive workspaces over the Internet.

81 Crime Analysis with MapInfo Christopher W. Bruce

MapBasic

MapBasic is MapInfo’s . MapBasic allows you to build custom screens, routines, scripts, and applications to work on top of MapInfo Professional. You can use MapBasic to automate tasks, design a user‐interface, and so on. There are a number of commercial products that use MapBasic. If you know Visual Basic, you can call MapBasic files through Visual Basic and add powerful mapping capabilities to a Visual Basic program.

CrimeInfo

CrimeInfo is a MapInfo add‐on, written in MapBasic, and originally developed by Charles River Technologies. The company was acquired by Queues Enforth Development (QED) in 2004, and they are now selling it as “Acuity CrimeInfo.” Unlike when Charles River Technologies was marketing the product, it seems that you must be a QED records management system (RMS) customer to purchase CrimeInfo.

CrimeInfo has a number of features that make the processes of geocoding and thematic mapmaking easier. It is particularly helpful for quick and easy surface density maps. The downsides are expense, and a certain rigidity to the structure that make it difficult to troubleshoot geocoding errors and to make changes to parameters after the product is installed—for instance, one the basic RMS “import” is designed, you cannot add additional fields or change the way the tabular data is set up.

Users with CrimeInfo are encouraged to keep using it for the tasks that it does best, but to keep their skills with MapInfo sharp so they can exceed the capabilities of the add‐on when needed.

82