Sei sulla pagina 1di 82

Crime Analysis with MapInfo

Christopher W. Bruce This document provides supporting material for a 24hour course covering beginning, intermediateandadvancedtopicsonMapInfoforcrimeanalysis. This workbook was created using MapInfo Professional 8.0 on a machine running WindowsXP.StudentsinclassesusingpreviousorlaterversionsofWindowsmayfind afewdiscrepanciesbetweenthisinstructionmanualandtheiractualexperiences. Thismanualismeanttoaccompanyinstructorled,handsontraining. I am grateful to the Danvers Police Department for supplying the data used in the samplesthroughoutthisbook.

Course Outline
Lesson1:Foundations Aboutcrimemapping&analysis AboutMapInfo Obtainingmapdata Lesson2:ExploringMapInfo Openingtables Movingaroundthemapwindow Layersandlayercontrol Styles Browserwindows Identifyingfeatures Findingaddresses Measuringdistances Cosmeticlayer Workspaces Zoomranges OpeningArcViewcoverages Importingdatafromothermapformats Lesson3:Geocoding Importingincidentdata Geocodingaddresses Troubleshootinggeocodingproblems Dispersingpoints Lesson4:EditingMapObjects& ObjectData HowMapInfosavesfiles Changingtheappearanceoffeatures Modifyingdataintheinformationtool Searchandreplace Addinganddeletingmapobjects Editingmapobjects Tablemaintenance Lesson5:QueryingandSelectingData Selectqueries SQLqueries Creatingnewlayers

Crime Analysis with MapInfo

Christopher W. Bruce

Creatinganewtable Selectingbyradius Selectingbybuffers Lesson6:ThematicMapsandAnalysis Creatingagrid Aggregatingdata Calculatingstatistics Graduatedsymbolmaps Pointsymbolmaps Choroplethmaps Surfacedensitymaps 3Dmaps Statisticalmaps Lesson7:WorkingwithImages Openingimages Registeringimages

Lesson8:MapPresentation Rotatingamapwindow Clipregions Copyingamapwindow Exportingamapwindow Creatingalayout Hotlinking Lesson9:OtherMapInfoandRelated Products MapInfoProviewer MapMarker MapInfoDiscovery MapX MapXtreme CrimeInfo

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 thequestionofwhenandcauseanalysisanswersthequestionofwhy.Crimemapsareboth 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 andunderusedastoolsofanalysis.

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 multiplesetsofpins.Changinganyoneof several parameters, such as crime type or time period, meant many hours of removing some pins and adding others. Buffers were drawn with compasses, distancesmeasuredwithrulers,andlinear maps created with string tied from one pin to another. More than one layer required plastic transparencies. Reproduction, except for small maps, was allbutimpossible. This sad state of affairs changed in the 1990s with the widespread availability of both personal computers and affordable GIS programs. Today, an analyst can create hundreds of maps, in much greater detail and analytical depth, in the same timethatitusedtotaketocreateone.

A 1980sera crime bulletin from the Cambridge (MA) Police Department. The bulletin was created by putting black dots on a paper map and physically cutting a section of the map and pasting it (with actual paste) on abulletintemplate.

Crime Analysis with MapInfo

Christopher W. Bruce

Functions
Crimemappinghasanumberoffunctionsanduses,whichweattempttoitemizehere: 1. Toidentifypatternsandtrends.Ananalystmightdisplayamapofburglariesoverthepast 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, hemightshowburglariesoverthecourseofayeartoidentifygeographictrends. 2. To serve as a visual aid for information about patterns and trends. An analyst describing a crimepatternortrendcanonlyconveysomuchwithphraseslike,robberyinourcityis 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 readershaveagoodenoughgraspofgeographytovisualizetheseareas,amapprovides thisinformationinaclearerway.Itmaynotbeworthathousandwords,butitsatleast worthadozen.
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

Crime Analysis with MapInfo

Christopher W. Bruce

shelters, liquor stores, bars, street lights, police foot patrols, and owneroccupied 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 generateaprecisemathematicalcorrelation.

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 subpatterns based on time,crimetype,orotherfactors. 5. To analyze spatial tendency. Is the offender in a crime series centering his activities in a particulararea?Isheprogressinginalinearpattern?Ishemovinginanidentifiableway fromoneplacetoanother?Ishespellinghisnameacrossthecity? 6. To query data by location. Regular databases make it simple to query data by crime type, date,time,specificaddress,offenderdescription,victimdescription,andsoon.Butonly GIS systems make it simple (and, in most cases, feasible) to specify a geographic area

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 considertheireffectsonadistrict. 8. To make maps. Police department sometimes simply need maps: a citywide map to hang on the wall of the chiefs office, a beat boundary map for new officers, a route map for deploymentduringaspecialevent,oramapoflocalsheltersandservicestohandoutto the community. The analyst, knowing the GIS system best, will probably be asked to producemostofthesemaps.

Crime Analysis with MapInfo

Christopher W. Bruce

TypesofCrimeMaps
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 highvolume data sets usually require one of the thematic map (maps with a theme, orthattellastory)typeslistedbelow. Choropleth maps aggregate information into larger geographic areas, such as census block groups, grid cells, or ApinmapofautotheftsinLawrence,Massachusetts,August2004 reportingdistricts.Thesegeographicareas are colorcoded 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 stolenoraverageincomeofresidents. 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 symbolsshownighttimeincidents. 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 AchoroplethmapofvehiclesstolenpercapitainCalifornia counties,1995 problemsinherentinpinmaps.

Crime Analysis with MapInfo

Christopher W. Bruce

ApointsymbolmapofaccidentsinDanversinDecember2001

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 Astatisticalmapshowingthepercentageofhousebreaksoneachshift the same time, though, they foreachsectorinCambridge,MA interpolate measurements in betweenareasofknownvalue,sotheymustbeusedwithcare.

Crime Analysis with MapInfo

Christopher W. Bruce

TOPSFIELD

Conners Farm

9-5 Shift
WENHAM

Reserv oir Ponte Vecchio North St Trailer Pk

MIDDLETON

Essex Aggie Rand Cir CAB Danv ers Plaza St. John's Prep State Hospital Super 8 Cherry Hill Strike One Danv ers High Bev erly Airport

BEVERLY
Brighton Gardens

Honda North

Hunt Center Thorpe School

Rio Grande

Calitri's Holton-Richmond School Danv ers Square Home Depot Motel 6 Town Hall

King's Grant

The Tower

IFLL

Lowe's Circuit City

Dyer Court

DPYC

Costco DPD Wal-Mart Nick & Tony's Liberty Tree Mall Endicott Plaza Port Corner

PEABODY

Days Inn

Sylv ania

Seaquel's

SALEM

Asurfacedensitymapdepictinghotspotsforcallsforserviceonthe9to5ShiftinDanvers,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 domesticviolence.

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 ofsoftwareinESRIsArcGISsuite)ismorewidelyusedamonglawenforcement.MapInfousers 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.

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 similartasksandusessimilarconcepts.Eachproductmarketsforasimilarprice(thoughitmust besaidthatMapInfocontainsmoreinitialfeaturesthanArcView).Eachproductwillalsocreate 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, andESRIallowsuserstowritescriptsinAvenue(inArcViewversionsupto3.3)orVisualBasic (inversion8.0andlater). Other companies have written elaborate programs, specifically for crime mapping, that work withtheMapInfoandArcGISengines.Theseprograms,whichcostupto$20,000,makeiteasier for police personnel to create crime maps without knowledge of the underlying GIS software. Examples are the Omega Groups CrimeView (which uses ArcGIS) and Charles River Technologies (now QEDs) CrimeInfo (which uses MapInfo). Analysts, who should know how tousetheGISsoftware,shouldnotlearntorelyonthesecustomprograms.

DataSources
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 basic geography of the analysts jurisdictions. Police records data contain records of crimes, disorder, calls for service, police activity, and offenders andvictims.BothmustbemergedwithintheGISprogramtoperformcrimemapping. Basemapdatacanbeobtainedfromseveralsources,including: 1) TheUnitedStatesCensusBureausTIGERfiles 2) Privatecompanies 3) Digitizedaerialphotography 4) Analystcreated 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)canlinktoODBCdatasources. Therearetwobasictypesofmapdata: 1. Rasterdatapicturesorimages,withdatastoredinpixels,suchasanaerialphotograph of the city. The picture may be given geographic coordinates so that other types of data

10

Crime Analysis with MapInfo

Christopher W. Bruce

canbemappedontopofit,buttherewill benounderlying tabulardataassociatedwith eachfeature. 2. Vector datadata 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 datausedincrimemappingisvectordata.Vectordatacantakethreeforms: a. Points or symbols, to show crimes, trees, fire hydrants, and other fixed objects andlocations b. Lines,toshowstreets,rivers,railroads,andotherlinearobjects c. Polygonsorareas,toshowparks,lakes,buildings,policebeats,andotherareas 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 transparentsheets,toachievetheillusionofasingleunifiedmap.

SomeImportantCartographicInformation
Mappuristsinsistthateverymapmustcontainfiveelements: 1. Atitle 2. Alegend 3. Ascalebar 4. Anortharrow 5. Informationaboutthedatasourcesandwhocreatedit Dependingonthenatureofthemapandtheaudience,however,someoftheseelementsmaybe eliminated.Youshouldalwayshaveatitle.

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,butgeographersusetheprojectionschemethatmakesthemostsenseforwhateverarea is to be mapped. Crime analysts typically do not have to worry about projection, since theyre working with small geographic areas in which the amount of distortion is minimal. However, analystswillfrequently trytomergedatafromtwosources,orconvertdataformoneformatto another,atwhichpointknowingtheprojectionmaybeimportant. 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. PointsarelocatedbyfirstgivingthelocationalongtheXaxisandthentheYaxis(e.g.,142,38). Moreusefulcoordinatesystemsformappinginclude: LongitudeandLatitude UniversalTransverseMercator(UTM) U.S.StatePlane Again, analysts rarely have to deal with coordinate systems but they may become important whenmergingorconvertingdata.

12

Crime Analysis with MapInfo

Christopher W. Bruce

AboutMapInfoProfessional
MapInfo Professional is the flagship product of the MapInfo Corporation of Troy, New York. It is the second most widelyused 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 havent been abletocompileexactstatistics. MapInfo Professional 8.0 is a Windowscompliant application designed to take advantage of all the functionality of the Windows operating system. Its files are recognized by Microsofts Object Linking and Embedding (OLE) protocols. Most of what you need to accomplish with crime mapping is found within theMapInfoapplication,withoutneed for addons or extensions. The last section of this manual discusses some ofMapInfosotherproducts.

13

Crime Analysis with MapInfo

Christopher W. Bruce

Lesson 2: Exploring MapInfo


WebeginbyopeningMapInfoProfessional. >>Step1:OpenMapInfoProfessional8.0via the Windows Start menu. We are greeted byadialogboxthatoffersseveraloptions. >>Step 2: Choose Open a Table and click OK. >>Step 3: Navigate to C:\MICA\ SampleData. Highlight the Streets table andclickOpen.

>>Step4:Maximizetheresultantmapwindow.

14

Crime Analysis with MapInfo

Christopher W. Bruce

YounowhaveMapInfoopenandaMapWindowactivewithonelayer:thestreetcenterlinesof Danvers, Massachusetts. Youre zoomed in pretty close on some streets in the middle of the map. Youwillhaveatleasttwotoolbarsfloatingonyourscreenorfixedatthetopofthescreen.

TheMapWindow
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 barthis menu changes names depending on what type ofwindowyouhaveactive. In MapInfo, youll 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 mapobjects.YoucanhavemultipledifferentMapWindowsopenatthesametime. Well take a few moments to move around the Map Window using the following tools and menucommands: The menu command Map | View Entire Layer automatically adjusts the zoom level so thatalloftheobjectsinaparticularlayerarevisible. TheZoominandZoomouttools viewmoreorlessofit. letyouchangethescaleofthemapsoyoucan The Pan tool allows you to grab the map window and move it around, without changingthezoomlevel.Useittomovethroughoutthemap.

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 thestreetsarelaidout?

OpeningTables
LetsaddsomeadditionaltablestoourcurrentMapWindow: >>Step 1: Choose File | Open. If youre not already there, navigate to C:\MICA\SampleData. >>Step2:Choosethewater,buildings,schools,andMassCities&Townstables.Youcan selectmultipletablesbyholdingdowntheCTRLkeyasyouclickeachone.

15

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step 3: Click Open. Several other layers are now available in front of you. Explore themapalittlemore,usingthetoolsabove.

LayersandLayerControl
AmapismadeupofoneormorelayerswhichareaccessedthroughLayerControl. 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. >>Step1:ChooseMap|LayerControltoaccessthelayercontroldialog. On top of all your data layers is MapInfos cosmetic layera place for you to drop text and drawingobjectsthatenhanceorhighlightyourmap.Thecosmeticlayerissavedalongwiththe workspace (though, if you want, you can save your cosmetic objects for use in future maps by choosingMap|SaveCosmeticObjects).

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, MapInfoplaceslayerswithline 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.,isnottransparent),anditisontopofeverythingelse,youwillbeunabletoseeanyofyour othermapobjectsbeneathit. In our case, MapInfo has made an understandable mistake by putting the water layer above the streetslayer.InourMapWindow,bridgeswillnowbecoveredbywater.Tochangethis: >>Step 2: Click on the water layer and then click the Down button once. Return to the MapWindowviaOKandseethedifference,thenreturntoMap|LayerControl. Youcansetcertainpropertiesforeachlayerbyusingthecheckboxesbeloweachoffouricons. The boxes below the eye icon specify whether the layer is visible. If the box is unchecked,youwillnotseethatlayerinyourcurrentmapwindow. 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 universalthat layer will now appear differently in every workspace andMapWindownewandexistinginwhichyouopenit. 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 Informationtoolonanobject(seebelow),itslayermustbeselectable. The boxes below the label icon specify whether the layer is autolabeled. Clicking this box will automatically generate labels for the objects in the layer, using the properties specifiedintheLabeldialogbox.

17

Crime Analysis with MapInfo

Christopher W. Bruce

YoucanaccomplishseveraltasksinLayerControl,butoneofthemostcommonischangingthe displaypropertiesforalayer. Were going to changethe 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. Were going to change the styles so that MapInfo shows us onlythepolygons. >>Step 3: Highlight the water layer and click the Display button to access the Display Optionsdialog. >>Step4:ChecktheStyleOverridebox.Twobuttonsbecomeavailabletoyou,onefor thepolygonstylesandoneforthelinestyles. >>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. Youll see that a lot of the superfluouswaterhasdisappeared.

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

TheBrowserWindow
It is important to understand that the physical objects you see in your Map Windowstreets, schools,buildings,wateraregeographicrepresentationsofunderlyingtabulardata.Ifallyoucould dowaslookatthem,youwouldntbemuchbetteroffthanifyouwereusingpapermaps. Each layer has a table associated with it, and each object has a record in the table. You can viewthesetableswiththeBrowserWindow. >>Step 1: Choose Window | New BrowserWindow. >>Step2:Selecttheschoolstableandclick OK YouwillnowseeatablemuchalikeaspreadsheetoranAccessdatabasetableshowingyou recordsforalloftheschoolsonourmap.

19

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step 3: Choose Window | Tile Windows so you see the Browser Window and the MapWindowsidebyside. >>Step 4: Select a record in the Browser Window by clicking on the box to the left of it. NoticethattheassociatedobjectisselectedintheMapWindow. >>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 youre done,closetheBrowserWindow.

IdentifyingFeatures
You dont have to open the Browser Window to view the features of a particular objectthat would be too cumbersome. To see the underlying tabular data for one object, you can use the informationtool. >>Step1:Ifyourenotthere,returntotheMapWindow.Zoomincloseenoughthatyou candistinguishindividualobjects. >>Step2:ClickontheInformationtool .Yourcursorwillchangetoacrosshair.

20

Crime Analysis with MapInfo

Christopher W. Bruce

. Your >>Step 3: Click on the Information tool cursor will change to a crosshair. Click on any objectaschool,astreet,abuilding,oratown. >>Step 4: Probably, no matter where you click, MapInfo wont know what layer you want. You mayhavetospecifywhatlayeryouwereintending to click in the dialog box. Select one of the layers andyoullseetheattributedataforthatobject. You can edit the data in the Info Tool dialog box, but well cover that in another lesson. For now, click around the map and see the different attribute data available for the different layers youhaveopen.

LabelingFeatures
Inadditiontoidentifyingfeatures,andseeingthedataassociatedwitheachobject,youcanalso 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 layercontrol. Tobegin,welllabelsomeofourstreetsmanually. >>Step1:ClickontheLabeltool crosshair. onthemaintoolbar.Yourcursorwillchangetoa

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 streetsegments;otherwise,MapInfowilllabeltheMassCities&Townslayer.) Valuable, but timeconsuming, right? We can also tell MapInfo to autolabel the features, saving us from having to click on each one. >>Step 3: Open Layer Control. In the row for the streetslayer,checktheAuto . Then click Label box OKandseewhathappens. Useful, but attractive,isit? not terribly

MapInfo is labeling the features with the default attribute field, the default fonts, and other defaultsettings.YoucanadjustthesesettingsinLayerControl. >>Step 4: Open Layer Control. Highlight the streets layer and click on the Label buttoninthelowerrighthandcorner. 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 MapInfotolabelthefeatureswithmorethanonefield,butfornow,theStreetfieldisokay.

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 youre zoomedataparticularlevel.Wellexplorethisoptionmorelater. 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, makingamessofeverything.YoucanalsosetaMaximumLabelnumbertokeepthenumber of autolabels 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 relativetotheobjectbeinglabeled,andhowfarawayfromtheobjectitappears. >>Step 5: Set the Label Offset to 0. Set the text style to Arial, 7point, dark gray. Specify None for the Label Lines. Finally, set a Maximum Labels value of 250. ClickOKandOKwhenfinished. Nowthesizeandvolumeofthelabelsisalittlelessobtrusive.

FindinganAddressorFeature
Finding a specific address or feature is our first step towards geocoding, which well cover in thenextsection. YoucanusetheQuery|Findcommand(CTRLF)tolocateacertainfeatureortocreateaquick pinmap.Welldobothinthissection.

23

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step 1: Use your Zoomout tool until youre zoomed out enough that you can see theboundariesofseveralcitiesandtowns. >>Step 2: Choose Query | Find. Search the Mass Cities & Towns table for objects in the Towncolumn.ThenclickOK >>Step3:Inthedialogboxthatappears,searchforBedfordandclickOK.

>>Step 4: MapInfo zooms you to Bedford. Label Bedford and some surrounding towns soyoucanseewhereyouare. NowwellcreateaquickpinmapinDanvers. >>Step 5: Choose Query | Find again. This time, we dont 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 youprefer).ThenclickOK.

24

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step7:Type120AshStinthedialogboxthatappearsandclickOK. MapInfo zooms you back over to Danvers, but youre probably seeing several towns. We only needtoseeDanvers. >>Step8:ChooseMap|ViewEntireLayer.SelectthestreetslayerandclickOK. >>Step 9: Choose Query | Find again, and search for each of the addresses on the list below,oneatatime: 12CollinsSt 5PineSt 24AdamsSt 189PineSt 25WadsworthSt >>Step10:UseyourZoomintooltodrawaboxaroundthepins. Ifthiswasapatternofhousebreaks,wouldthispinmaphelpillustratethepatternforabulletin orreport?
M ap
Brook w

er r y

Ba yb

ich ar ds St W es to n St

Sho rt

Fo xR un

U nnam ed

Oakla nd Rd

Cabot Rd

Rd

Rd

le St

t An

Bis

Loc ust St

ge R C oolid
M assa

in th ro p

St

W illo

er P ark Bur ley Av e

so ll St
tS res Fo

C he stnu tS

ge r

ne Vi

rd ya

N orth

In

St

C olu mbia Rd

St
T nd hla H ig
St

Be av

Da

yt o n

er

D ea

t nS

Pop lar

St
Butle r Av e
O ak

She tland Rd Belg ian R d Gr ov eS t

Abb ott S

Lind all S t

Fe llo ws

w Ave

Ra mp

Truche Way

St Summer

tts chus e

e pip nd Sa ir rC

St

Brookv ale Dr

N ew bury

Alm a L

Pine

Cir atore Salv

W hipple
St

St

Br o

S loc k H em

Ave

R A lt ve se oo

roly nD r

entre St

Ca

Pl ce in Pr W ee ks R

Ln

tG Pos

d ate R

ok sid e

Ga ns on s

W ay

Williams St

D' Or lan do

ood Briarw

Otis
Kim

St

Av e
m tna Pu

St

R
d

d rt R obe

ing er ck Pi

Ct

rth No

St e Av e Av bury s mu Pills m Lu St ry er Ch

C on

St ant

Plains Park

t rt S oba

Danv ers Sq
St rk Pa
St El m

Route 95

Loris Rd

St

Hu

nt

St

lva n

St one St

Ba yV iew A

Popes

t rS rt e Po

Ln

Sy

Spruce St
m Bra

St

an

St

Ba yV

ve

iew

Te r

ut

aln

Holten St
St

Larchmont St

Rice St

Ro ute 95 S

Prince St

a Be

od wo ch

Pl

C he

St ster

nal Ca

St

Burroughs

St

Ca rria ge W

d nR R ya
e St H yd Flint St

Constitution Ln

ay

g illa

Ho

ar G

ou te

od T

de

R st Po

ms S t
nR to ing Ab

12 8

er

St

Ada
C s lin ol

Brooksby Village
k sby Broo

McDermott Far
Bow

m Rd

mm onw ealt h

Av e

r ge D Villa

Irving St

Route 128 N
tc Hu

Ma cAr th

hS

St

Pe rr
Cl n into

yS t

Ha

Independence Way

25

rdy

Ha

i re sh mp t S ler ow

St

t tS an Gr e St as Purch

Do

e dg

Ct

Exit 23

Bu

m t na Pu

ing er ck Pi

ve

In rso ge

Ct

Ho

St

Dr
d ite Un Dr

y kw ll P

St e n as mo Ch Da St n St kli rry an Be Fr

ba

rly be Dr

Ct rt

am tn Pu

t dS me na Un

Wa St orth t dsw rk S C la

St

Charles St

St

H St

Be ac

ir e ila

Ash St

Washington Street Ext

on

H ig

F le t er S tc h
nd Po St

e Av

St

hS

W n re ar St

Sanford Ct

Dyer Ct

w La

St e t nc eS re an Cr St ur th Ar

Merrill St

St

Buk

Crime Analysis with MapInfo

Christopher W. Bruce

There are a lot of other options in the Find dialog box that well cover in the geocoding section. For now, its important to understand that the pin map we have created is only cosmetictherearenoattributedatabeneaththesepins.Thus,wecanonlylookatthemap;we cantqueryit.

MeasuringDistances
YoucanusetheRulertooltomeasurethedistancebetweentwoormorepointsonyourmap. >>Step 1: Click on the Ruler tool . Notice that the Ruler Window appears. Click on the northernmost housebreak in the pattern and then doubleclick on the southernmost housebreak in the pattern. The ruler will displaythetotaldistance. Thisdistanceisasthecrowflies.Tomeasureactualstreetdistance: >>Step 2: Click on the northernmost housebreak in the pattern.ThenclickyourwayalongPineStreet,clicking every time the street takes a turn or bend. When you gettothesouthernmosthousebreak,doubleclickonit.

TheCosmeticLayer
Nowisagoodtimetotalkaboutthecosmeticlayer,whichyouhaveseeninLayerControl.The cosmetic layer always appears on the top of the other layers. Think of it as a clear transparent sheetthatyouputontopofapapermapyoucanscribbleonitwithoutruiningthemapitself. MapInfo stores points that you Find in the cosmetic layer. You can also add your own text, symbols,lines,andotherobjectsto the cosmetic layer, as long as its editableinLayerControl. >>Step 1: Open Layer Control. Make the cosmetic layer editable by clicking the checkbox in the editable column ,thenclickOK. You return to the Map Window.

26

Crime Analysis with MapInfo

Christopher W. Bruce

Now that a layer is editable, all of the previously grayedout icons on your drawing toolbar havebecomeavailable.Weregoingtocreateacrudetitleforourmap. >>Step 2: Choose Options | Text Style. Specify Arial, 24poin, bold, with a halo. ClickOKwhenfinished. >>Step 3: Click on the Text Tool on the drawing toolbar. Somewhere in your Map Window, click and type May Housebreak Pattern.

Since youve typed this title in the cosmetic layer, it isnt permanently saved with any of the otherdatalayers.

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 cosmeticlayers.Nowwouldbeagoodtimetosaveyourworkspace. >>Step 1: Choose File | Save Workspace. Navigate to C:\MICA\SampleData. Save the workspaceasDanvers.wor. NowifyouquitMapInfo,youcanreopeneverythingjustasyouhaveitnow. Itisimportanttounderstandthatthelayersarenotsavedintheworkspace;theworkspaceonly contains pointers to those layers. If you move or delete them, MapInfo wont know where to find them when you try to open the workspace again. And if you make changes to them, addingordeletingobjects,thosechangeswillbereflectedinalloftheworkspacesthatusethose particularlayers.

OpeningArcViewCoverages
MapInfo 8.0 can read information directly from ESRIs Shapefile format, which is used by ArcView and other ESRI applications. In previous versions of MapInfo, users had to translate thosefiles,butthecurrentMapInfoversioncanopenthemdirectly. Thisishandyifothersinyouragency(orcityortown)useArcViewandyouwanttobeableto read their data. Its especially handy if that data is updated frequently, and you dont want to havetokeeptranslatingnewversionsoftheshapefile. Inourexample,wellassumethatourtownassessorhasaparcellayerinArcViewthatwewant tobeabletoopeninMapInfo. >>Step1:ChooseFile|Open.NavigatetoC:\MICA\SampleData. >>Step 2: Change the Files of Type box to read ESRI (R) Shapefile (*.shp). Select the Parcel.shpshapefileandclickOpen. MapInfonowasksyoutosaveaMapInfotable(.tab)file.ThisisthefilethatMapInfowilluseto store information about the shapefile. In the future, when you want to open the parcel layer, youlljustopenthisMapInfotable,anditwillreadinformationfromtheshapefile. >>Step3:SavetheMapInfotableinC:\MICA\SampleDataasParcels.tab. MapInfo now has some questions about the shapefilethe character set, the projection of the layer,andwhatyouwantittolooklikewhenyoubringitintoMapInfo.

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 isnt 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 workingwith (These actually arent projections, but rather coordinate systems. Each coordinate system is based on a particular projection, so MapInfo just combines thetwoundertheheadingprojection.) In our case, the layer is saved in a Latitude/Longitude projection. >>Step4:ClicktheProjectionbuttonandspecifyLatitude/Longitude.ClicktheStyle buttonandspecifynopattern,lightgrayborder.Finally,clickOK.

29

Crime Analysis with MapInfo

Christopher W. Bruce

A new map layer should now appear in your Map Window. Having made all of thesespecifications,theyarenowsavedas part of the MapInfo table. You will not have to go through this again when openingtheparcelsshapefile. >>Step 5: Use the information tool toseetheattributedatafortheparcels.

AssigningaZoomRange
The parcels clutter up the map when you zoom out far enough. Lets make them appear only when were zoomedinveryclose. >>Step 1: Go to Layer Control. Highlight the parcel layerandclicktheDisplaybutton. >>Step 2: In the Zoom Layering section, specify a minimum zoom of 0 and a maximum zoom of 1.5 miles.ClickOK. >>Step 3: Zoom in and out to see how the parcel layer disappears and reappears depending on the zoom level. (You can see the zoom level in the lower righthandcorner: .) Now that weve seen how to do that, lets do the same thingwiththelabelsforthestreetslayer. >>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,andclickOK. >>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 smallscale. >>Step6:Savetheworkspace(File|SaveWorkspace)overtheoldone.

30

Crime Analysis with MapInfo

Christopher W. Bruce

WorkingwithYourOwnData
Now that youve had a tour of MapInfo using the sample Danvers data, lets try the same lessons with your own agencys data. Try to do the following with the map data that you broughttoclass: Openallofthelayers Zoomin,zoomout,pan,andexplorethemaps ArrangetheorderofthelayersinLayerControl ChangetheappearanceofyourobjectsusingStyleOverride Browsetheattributedataforyourlayersandidentifyfeatures Labelorautolabelyourfeatures Findsomeaddresses(likethepolicestation) Measuredistances Setzoomlevelsforlayersand/orlabels Saveyourworkspace

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 tabulardata. When the streets, parcels, and water layers in front of you were created, they were created first bydrawingthefeatures,thenbycreatingtheattributetableassociatedwiththem,andfinallyby populatingthetableswiththeactualattributes. Geocoding is the reversal of that process. When we geocode, we start with tabular datafor instance, a lit of crimes and their addressesand then create points on the map to correspond withthosecrimes. Therearethreewaystogeocodedata: UsingLatitude/Longitude.Ifyour CADor RMSsystemautomaticallyassignsalatitude andlongitudetoeachincident,youcangeocodeveryquickly. 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 tablesusually your streets table, but you can also use parcel or building layers, as long as the attribute table for the parcels or buildings containstheaddress. Actually drawing the point on the map. This is called digitizing, and it is how most map layersare 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 pointexactlywhereyouwantit. Wewilldoourgeocodingviaaddressmatching,asitisthemostcommonmechanism.

ImportingIncidentData
Thefirststeptogeocodingistoopen,inMapInfo,someincidentdata(orotherpolicedatawith addresses, such as offender residences or locations with hazardous chemicals). MapInfo will open multiple types of data tables through File | Open, including Microsoft Access, Microsoft Excel, dBASE, and delimited ASCII. In addition, you can access any ODBCcompliant database throughFile|OpenDBMSConnection. 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: Reopen the Danvers.wor workspace through File | Open (change Files of Type to workspace). If there are items on the cosmetic layer, choose Map | Clear CosmeticLayer. >>Step 2: Choose File | Open. In the FilesofTypebox,chooseMicrosoft Excel. Navigate to C:\MICA\SampleData,andchoosethe FallCrimes.xlsfile. >>Step 3: In the Excel Information dialog, click on the dropdown box labeled Named Range and choose Other. Change A1:I713 to A2:I713. Click the box thatreadsUseRowAboveSelectedRangeforColumnTitles,thenclickOK. MapInfo will open the Excel spreadsheet in a Browser Window. Browse through the incidentstoseewhatyouhave.TakenoteoftheentriesintheLocationfield.

GeocodingAddresses
We now want to assign a dot on the map toeachincidentinournewtable. >>Step 1: Choose Table | Geocode. Fill in the options in the dialog box to theright. >>Step 2: Click the Options button and uncheck the Try Substitutions box at the bottom. Then click OK andOK.

33

Crime Analysis with MapInfo

Christopher W. Bruce

MapInforunsthroughalltheincidentsinthespreadsheetandtriestomatchthemagainststreet names and address ranges. If it can find a match, it tags the incidents with the proper coordinates;ifnot,itskipsit. When using a street centerline file, MapInfo actually matches the incident address to a collectionoffourfields,whichmusthavethesenamesandbeinthisorder: 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 rangeortherightrange;thenitinterpolatestheexactlocationbasedontherange.Inourcase, 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,andinourcasethedotactuallyfallswithintheparcelfor104AshStreet.

34

Crime Analysis with MapInfo

Christopher W. Bruce

Intersections are easier. Intersections are specified with a double ampersand between them, as inSylvanSt&&AdamsStMapInfojustputsthepointatthelocationwheretheycross. When MapInfo is finished matching the incident locations to street segments, you will receive a messageboxtellingyouhowmanyitfoundandhow many it did not. The ratio of successful geocodes to the total number of records is known as the hit rate. Inourcase,wegot651outof712,ahitrateof91%.

>>Step3:ClickOK.

Thoughtheincidentshavebeengeocoded,theyrenotvisibleonthemapyet.Becausewhenwe opened the table, it had no geographic features, MapInfo by default opened the table without addingittothecurrentmapwindow.

>>Step4:GotoLayerControl,clickAdd,andaddtheFallCrimeslayer.

Youwillnowhavealargenumber ofdots651,tobeexactonthemapbeforeyou.Butwere stillmissing9%,andwehavetodealwiththatproblem.

35

Crime Analysis with MapInfo

Christopher W. Bruce

TroubleshootingGeocodingProblems
Aswesawaminuteago,ourhit rateforthisparticulargeocodingsessionwas91%.Ascrime analysis goes, thats not too bad. When addressmatching their data, analysts routinely get hit rates of 70%, 60%, or less. Many of them continue to work with this data because they dont knowwhatelsetodo.Theycreatethematicmapsofcrimeonwhichhalftheircrimeismissing. Thereisonlyoneacceptablehitrate:100%. Even if your hit rate is highsay 98%and youre geocoding 1000 incidents, you miss 20 of them. Thatmay notsound like a lot, but what ifthose 20 incidents were all at thesame address that, for whatever reason, doesnt appear in your map data? Or all on the same misspelled street?Youmightmissasignificanthotspot. Consequently, any data description and modeling that you perform on data with less than a 100%hitrateispolluted.Youmaysendofficerstothewronglocations.Youmaymisspatterns. 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 adataset,youllswiftlybecomefrustratedwiththeentirecrimemappingprocess. Theeasiestwaytogettheincidentdatatomatchyouraddressdataistoeditoneortheotherat 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 ormodifyyourMapInfostreetsfiletoread1stSt. This assumes, of course, that your RMS data is accurate and consistent. If the RMS allows data enterers to type in anything they wantinstead of forcing them to enter a valid addressyou mightgetrecordsthatsay: 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 thesamestreet.Insuchcases,thesolutionsbecomemorecomplicated.Youmightpressureyour

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 MapInfos abbreviation table (below) so that MapInfo will convertcommonmisspellingstocorrectaddresses. 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 invaluablewhencleaningdata. In our case, 82 incidents did not geocode. There are a number of reasons this could have happened: Thestreetisspelledincorrectly,eitherintheincidentdataorinthemapdata The street type (e.g., Ave, St, Dr, Way) is incorrect, either in the incident data or inthemapdata 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; Avevs.Av;Pkvs.Park) The incident address data contains the name of a business or other common place name (suchasapark)insteadofastreetaddress The street name and type are correct, but the address number in the incident data is not containedwithinthemapdata Theincidentdatareferstoastreetorintersectionthatdoesnotexistinthemapdata The incident data has an intersection but uses a nonstandard character (such as a slash orasingleampersand)tojointhem. Theaddressexistsinmorethanoneobject(e.g.,streetsegment)inthemapdata. The MapInfo abbreviation table is making a default substitution that you dont want it tomake(seebelow)

Letstakeanotherpassthroughtheincidentdataandseeifwecantidentifywhattheproblems are. >>Step 1: Choose Table | Geocode again. Retain all of the options as before, but this timechangethemodetointeractive.ClickOK. MapInfo will stop every time it finds an address it cannot geocode. It gives you the option to either edit the addressor choose from a list ofpossible matches. Hereare some ofthe problems itfindsandthereasonsitwontgeocodetheselocations. 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 dont go that high We could solve these problems one at a time, in the interactive geocoding dialog, but some of themwouldcontinuetodoguseverysingletimewegeocode.Mostofourproblemshavetodo withtheincidentdata,notthemapdata,sowehavetwosolutions: 1.Editthedataintheoriginalrecordsmanagementsystem 2.Edittheabbreviationfilethatservesasatranslatorbetweenthetwo. >>Step 2: Make a few changes in the interactive geocoding dialog just to get a few and seehowitworks;thenwellmoveontotheabbreviationfile. There is one other option that can help us achieve a higher geocoding rate, though its technically cheating. MapInfo gives us the option to Use the Closest Address when it cant find an address specified in our incident data. If we choose that option, we have to realize that our incident data wont be spatially accurate, though it may be accurate enough for some analysis.

TheAbbreviationFile
The MapInfo abbreviation file is a powerful geocoding tool, and its practically a secret. You cantopenitfromwithinMapInfo.Butonceyoufindit,youcaninstructMapInfotoreplaceany word or phrase with a different word or phrase when geocoding, thus saving yourself hours of changingonerecordatatime. ThefileisstoredatC:\ProgramFiles\MapInfo\ProfessionalandiscalledMapinfow.abb.Itisa textfile,anditopensinMicrosoftsNotepad. 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,itautomaticallysubstitutes1st. There are several sections in the abbreviation file. The first section simply specifies singleword replacements: N for North, Ln for Lane, and so on. This alone will fix some of the problemsthatwehad.

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 MainStand120AshSt. 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 JohnStwithouttheperiods. The final section, !SPACE, is the most useful: here you can enter entire phrases, such as Liberty Tree Mall, alongwiththeircorrectaddreses. 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 trytogeocodeitandthenMapInfowontbeabletofindthestreet!Makesureyoudeleteentries thatyoudontwantfromtheabbreviationfileaswellasaddingthethingsthatyoudo. >>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. Its calledMapinfow.abb.Openit. >>Step 2: Add and delete entries to make the abbreviation file look like the one to the right. >>Step3:ReopenMapInfo,chooseRestorePreviousSession,chooseTable|Geocode and enter all of the same options as on Page 33. However, do not uncheck Try Substitutions

39

Crime Analysis with MapInfo

Christopher W. Bruce

You should now have reduced your ungeocoded entries to around 35 (depending on how many you correctedintheinteractivedialog). >>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 liketheonetotheright.

DispersingPoints
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 allappearontopofeachotherandlooklikeasingledot. Wecansolvethisproblemoneoftwoways: 1. Createagraduatedsymbolmap,whichwelldoinalaterlesson 2. Dispersetheextrapointsinaradiusaroundthecentralone In this lesson, were going to disperse the points, but please understand that were achieving one kind of spatial accuracy at the expense of another. I do not encourage casual use of the dispersetool. Disperse Points is one of the many tools or scripts that come with MapInfo. You can find all ofthemintheToolManager. Before we disperse the points, well save a copy of the table so that if we want to return to the original,undispersedtable,wecan >>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 openFallCrimesDispersed. >>Step3:ChooseTools|ToolManager.

40

Crime Analysis with MapInfo

Christopher W. Bruce

Its 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 descriptionssomeofthemsoundprettyuseful,dontthey?Forwhatitsworth,Imakeregular useof: 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 whetheryouwantthetooltoalwaysbeloaded.

>>Step 4: Load and Autoload the DispersePointstool.ClickOK.

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

>>Step 6: Select the FallCrimesDispersed tableandclickContinue.Acceptthedefault dispersion method and click OK. Uncheck Display Mapper When Finished and clickOK.

Inseveralplacesparticularlythelowerrightcorner,youllseealotmoredotsthanbefore.

41

Crime Analysis with MapInfo

Christopher W. Bruce

OtherWaystoGeocode
AsImentionedbefore,usingthestreetcenterlinefileisonlyonemethodofgeocoding.Perhaps a more accurate method is to use the parcel layer (or building layer, if it contains addresses). Whenyouuseaparcelorbuildinglayer,youarematchingtheincidentaddresstoonlyasingle fieldthe parcel or building addresswhich means that MapInfo doesnt have to interpolate thepositionofthepointitjustputsitinthemiddleofthepolygon.Thisusuallyresultsinmore accurategeocoding. Not all of your addresses will have parcels or buildings, but the beauty of MapInfo is that you cangeocodethesamefiletomultiplelayers.Youmaywanttostartwithparcels,getasmanyas youcan,andthenmoveontothestreetslayer. 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 uncheck the Table is Mappablebox,andallofyourpointswilldisappear.

GeocodingYourOwnData
I have been aggressively editing both my incident data and map data for years, and I routinely geta100%hitrate.Ihadtocreateerrorstomissmostofthe61above. 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 mismatches. Well spend some time trying to geocode yourincidentdata,solvingproblems,andgettingasclosetoa100%hitrateaspossible.

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

HowMapInfoSavesFiles
Each layer, a term MapInfo often uses interchangeably with table, is actually stored in several filesbetweenthreeandfive.OpentheC:\MICA\SampleDatadirectory,andyoullseethatthe buildingslayer,forinstance,isactuallymadeupoffivefiles:
Buildings.dat Buildings.id Buildings.map Buildings.tab

Somelayershaveafifthfile:an.indfile. All of these files are necessary to open the layer in MapInfoeven though, when you choose File | Open, you only see the .tab file. If you want to rename the buildings layer in Windows Explorer,youneedtorenameallthesefiles.Ifyouwanttomovealayertoadifferentdirectory, youhavetomakesureyoumoveallthefiles. 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 theyreallnecessarytomakeupthelayer.

ChangingthePermanentAppearanceofFeatures
Each layer has information about its stylespoints, lines, and polygonssaved in the .tab file. We saw earlier how you could override that style in Layer Control. The override, however, appliesonlytotheoneMapWindowintheoneworkspace. Topermanentlychangetheappearanceofalayer,weneedtosaveitintothetable.Wellchange thesizeandcolorofthesymbolintheschoolslayer. >>Step 1: Open Layer Control. Make every layer that appears before the Schools layer unselectablebyuncheckingtheselectablecheckbox . >>Step 2: Make the schools layer editable by checking the box under the pencil ThenclickOK.

43

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step3:ChooseQuery|SelectAllfromSchools.(Thismenucommandautomatically populateswiththehighestselectablelayerthatswhyweunselectedeverythingelse.) >>Step4:ChooseOption|SymbolStyles.Changethesymbolsizeto18andthecolorto whateveryouwant.ClickOK.Thesymbolfortheschoolsshouldchange. >>Step 5: Unselect the schools by choosing Query | Unselect All or by clicking the UnselectAlltool >>Step6:SavethetableviaFile|SaveTable. The schools layer will now have this new appearance in any new or existing workspace thatusesit. 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 selectonlycertainobjectsandmodifytheirstyles. In the case of schools, we could make some schoolsadifferentsymbolthanothers. .

ModifyingTabularDatawiththeInformationTool
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 dataand thelayer doesnt even have tobeeditabletodoit.

>>Step1:UseQuery|Findtofind120AshSt. >>Step 2: Click on the Info tool and click on the streetsegment next to 120 Ash St. ChooseStreets:AshStinthedialogbox. You receive the Info Tool dialog box, showing that the Street name is Ash St and the address range is 86120 on the left and 95125 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 streetrangesowecangeocodeitproperly. >>Step 3: In the Info Tool box, click in the ToLeft field and change the value from 120to124. >>Step4:ClosetheInfoToolbox.ChooseFile|SaveTabletosavethechanges.

44

Crime Analysis with MapInfo

Christopher W. Bruce

SearchandReplace
One of the tools available to you in Tool Manager is called Search & Replace. It performs a functionsimilartoFind&ReplaceinanyofthevariousMicrosoftapplications. We have a street in Danvers known as Massachusetts Ave, except no one calls it Massachusetts Avethey 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 manuallyreplaceeachoneintheInfoToolbox. >>Step 1: Choose Tools | Tool Manager. Find the Search & Replace tool and click theLoadedbox.ThenclickOK. >>Step 2: Choose Tools | Search & Replace. Search the streets and the Street columnforMassachusettsAve,replacingitwithMassAve >>Step3:Whenfinished,savethetablethroughFile|SaveTable.

45

Crime Analysis with MapInfo

Christopher W. Bruce

AddingaNewStreet
A developer has added a new street to Danvers, at the end of an existing street called Ashley Street.Weneedtodrawthisonourmap. >>Step1:InLayerControl,makesurethestreetslayeriseditable. >>Step2:UseQuery|FindtofindAshleySt Before we can add a new street, we need to set its style. Its probably easiest to set the style for the newstreettobeidenticaltoexistingones. >>Step 3: Select Ashley Street with the selector . Choose Options | Line Style and immediately click OK. This will set styles for newstreetstobeidenticaltoAshleyStreet. Werenowreadytodrawournewstreet,whichwillrunata90degreeanglenortheastfromthe endofAshleyStreet.Wewanttomakesurethatthebeginningofthenewstreetstartsexactlyat the end of Ashley Streetthe two streets must intersect. Its impossible to obtain that level of precisionwithourhandsandmice;weneedMapInfosSnapfeature. >>Step 4: Type the S key on the keyboard. On the Status Bar at the bottom, the word snapwillappear. >>Step5:ClicktheLinetool onthedrawingtoolbar.Moveyourcursorovertothe end of Ashley Street. As soon as you get near the end, a large crosshair will appearthis indicates that the snap feature is working. >>Step6:Clickwhilethecrosshairisactive,holddownthemouse button, and draw a line to the northeast, about halfway to the circle that ends Michael Drive. When finished, release the mouse button. Wenowhaveanewstreet,butithasnoattributedata. >>Step7:UsetheInfotool toclickonthenewstreet,andtypeintheattributedata show on the next page. Then close the Info Tool box and choose File | Save Table to savethechangestoyourstreetsfile.

46

Crime Analysis with MapInfo

Christopher W. Bruce

DeletingaStreet
To get rid of a street (or any object) that you dont want, simply select it with the selector andtypetheDELETEkeyonthekeyboard.

CreatingaPolygonLayer
The principles in this lesson can be used to create any boundary or polygon layer, including boundariesforpolicebeats,districts,orotherareas. We want to create a new table to record the location of town parks. First, we have to create a new table to storethisinformation. >>Step 1: Choose File | New Table. Select Add toCurrentMapperandclickCreate. >>Step 2: Add two fields: Name (Character, 20) andAddress(Character,40).ClickCreate. >>Step 3: Navigate to C:\MICA\SampleData and savethetableasParks.tab.

47

Crime Analysis with MapInfo

Christopher W. Bruce

ThenewParkstablewillappearinLayerControlandwillautomaticallybeeditable. OurfirstparkwillbeinthecircleformedbyAnnaDriveandDanielleDrive. >>Step 4: Use Query | Find to find Anna Dr; zoomin so that the cirle made up by DanielleDrivefillsthescreen. >>Step 5: Set your parks style under Options | Region Style. Choose whatever fill pattern, color, and border style youd like, or use the exampleontheimagehere.ThenclickOK. >>Step 6: If its not already turned on, turn SnaponbytypingtheSkey. >>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 crosshairappears.

48

Crime Analysis with MapInfo

Christopher W. Bruce

Itsnoteasytohitallofthosesnaps!Thatsbecauseanaccuratestreetwillhavealotofnodesto which to snap. As you draw, the boundary line youre drawing will white out the streets underneath it. Thats okayits supposed to happen. In fact, youll know you havent missed anynodesaslongasnoneofthestreetisvisiblewhereyouvealreadybeen. (Youcanmakeiteasieronyourselfbyshowingthenodesyouresnappingto.InLayerControl, youcanchoosethestreetslayer,clickDisplay,andclickShowNodes.) Whenyougetbacktoyourstartingpoint,thepolygonwillfillin,andyoullhaveanewpark. >>Step 9: Use the Info tool to click on your new park and give it a name (your choice) andanaddressof5DanielleDr.MakesureyousavethelayerfromFile|SaveTable.

EditingMapObjects
Whoops!Wejuststuckournewparkontopofanexistinghouse.Itturnsoutthatthenewpark doesntcovertheentireloopjusttheeasterntwothirdsofit.Weneedtoeditthepolygonsoit doesntlooklikethehouseisinthemiddleofaplayground.

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 belowbuildings. 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 theparktoexcludetheparcelwiththehouseonit. >>Step 2: Use your selector drawingtoolbar. to select the park. Click the Reshape tool on the

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 .

TableMaintenance
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|TableStructure.Ifyoudeletealotofobjectsfromalayer,youcanmake the table take up less file space (and open more quickly) by choosing Table | Maintenance | PackTable.

50

Crime Analysis with MapInfo

Christopher W. Bruce

WorkingwithYourAgencysData
Usetheselessonstonow: Changethepermanentappearanceofsomeofyouragencysmapdata Fixerrorsintheattributedata Addordeleteobjectsyouknowareincorrect CreateaSchools(orother)tablewithpointobjects

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 orcrimecategories,beforethemaphasanyanalyticaluse. ThereareessentiallytwowaystoselectdatainMapInfo: Byselectingtheobjectsthemselves Byqueryingtheunderlyingtabulardata Weregoingtoexplorebothwaysbelow.

SelectQueries
Well begin with a select query that we can use to pull particular incidents out of the FallCrimesDispersedtable. >>Step1:Ifitsnotalreadyopen,openFallCrimesDispersed. >>Step2:ChooseQuery|Select.FillinthedialogboxasbelowandclickOK.

The query will select the larcenies from motor vehicles out of the FallCrimesDispersed table andstoretheminatemporarytablecalledLMVs. >>Step3:GotoLayerControl.MaketheFallCrimesDispersedtableinvisible theAddbuttonandaddLMVs.ThenclickOK. Nowourmapshowsonlytheftsfromcarsinthefall.Seeanyhotspots? .Click

52

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step 4: When youre done looking, go back to Layer Control. Remove the LMVs tableandmaketheFallCrimesDispersedtablevisibleagain. We can try a more complicated query that finds all incidents of domestic assault and intimidation. >>Step5:Repeattheprocessabove,butusethefollowingparameters. 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 viewtheresults.

53

Crime Analysis with MapInfo

Christopher W. Bruce

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

ThemaindifferencebetweenstandardqueriesandSQLqueriesisthatyoucanorderandgroup (aggregate)theresultsofanSQLquery.

54

Crime Analysis with MapInfo

Christopher W. Bruce

CreatingNewLayers,Tables
NotethateverytimeyouperformeitheraselectqueryorSQLquery,MapInfosavestheresults in a new, temporary layer. If you dont specify a name for the layer, MapInfo will call it Query1,Query2,andsoon.Whateveryounamethelayer,youcansaveittotheworkspace and treat it as if it was a separate table, even though it draws all of its information from the sourcetable. Ifyouwanttosavetheresultsofaqueryasaseparatetable,independentfromtheoriginal,you candosobychoosingFile|SaveCopyAs.

SelectingbyPolygons
Youcanselectobjectsbasedontheirspatiallocationusingthevariouspolygonselecttools. MarqueeSelect RadiusSelect PolygonSelect selectsalltheobjectsinasquareyoudraw. selectsalltheobjectsinaradiusyoudraw. selectsallheobjectsinafreeformpolygonyoudraw.

BoundarySelect selectsalltheobjectsinapolygonlayeryouhaveopen. 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 whatsbeenhappeningaroundherhouselately. >>Step 1: Make sure that FallCrimesDispersed is the topmost selectable layer in Layer Control. >>Step2:UseQuery|Findtofind88PoplarSt . Click on 88 Poplar Street. Hold the >>Step 3: Click on the Radius Select tool mouse button downand drag outward. Watch the Radiusbox on the status bar inthe lower lefthand corner. Drag until the radius reads .2500 miles or something close, then releasethemousebutton. >>Step 4: Browse these incidents by choosing Window | New Browser Window and choosingSelection.

55

Crime Analysis with MapInfo

Christopher W. Bruce

SelectingbyBuffers
Sometimes, we may wan to select everything in a radius around multiple objectsfor instance, all drug arrests within 100 feet of public parks, or all sex offenders living within a halfmile of schools.Toaccomplishthis,weneedtocreateabufferlayerthatdrawsabufferaroundeachof ourobjects,andthenselectalloftheincidentswithinthatbuffer.

56

Crime Analysis with MapInfo

Christopher W. Bruce

Wewillfindalloftheassaultswithin1000feetofaschool. >>Step 1: Make sure the Schools layer isopen.InLayerControl,makesureitis thetopmostselectablelayer. >>Step 2: Choose Query | Select All fromSchools >>Step 3: Return to Layer Control and make the cosmetic layer editable. Then clear the cosmetic layer by choosing Map|ClearCosmeticLayer. >>Step 4: Choose Objects | Buffer. Fill in the dialog box as to the right, then clickOK. 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 ownlayer. >>Step 5: Choose Map | Save Cosmetic Objects. Save them in a new layer called SchoolBuffer.tab. >>Step6:ChooseQuery|Selectandcreateanewquerythatfindsallassaults. >>Step 7: Return to Layer Control. Make FallCrimesDispersed invisibleandAddthe newAssaultstable. Now, our final step is to find all assaults that have occurred within 1000 feet of a schoolthat is, within theschoolbufferslayer. MapInfo will only perform selects of this nature on base tablesthat is, tables that are independentofothertables.Todothis,wemustfirstsaveAssaultsasitsowntable.

57

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step8:ChooseFile|SaveCopyAs.SaveAssaultsasAssaults.tab.PerformaFile| CloseTableandcloseAssaults(thisclosesthetemporarytable),thenFile|Openand opentheAssaults.tabtable. >>Step9:ChooseQuery|SQLSelectandfillinthedialogasbelow.

Younowhavealistofallassaultswithin1000feetofDanversschools.

WorkingwithYourOwnAgencysData
Usetheselessonstoqueryandselectincidentsfromyourownagencysdata.UsetheSchools layerwecreatedearliertoperformthebufferlessonabove.

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 jumpingoff point for more advanced maps. These advanced maps,whichusethepinmapasthebase,areknownasthematicmaps.

CreatingaGrid
Beforewebegincreatingourthematicmaps,weneedtocreateapolygonlayerthatfitsoverour entirejurisdiction,andthatofferspolygonsofequalsize.Theeasiestwaytodothisistodrawa gridoverthearea.

>>Step1:ZoomoutuntilallofDanversisvisible.

>>Step2:ChooseTools|ToolManager.ScrolldownuntilyoufindGridMaker.Click theLoadedboxandthenclickOK.

>>Step 3: A new Create Grid tool appears on the Tools toolbar. Click on this tool.Yourcursorchangestoacrosshair.

>>Step 4: Click in the upper lefthand corner of your Map Window, hold down the mouse button, and drag a box over the entire town, down to the lower righthand corner.Release.Fillinthedialogboxwiththefilepathandthelinespacingbelow.

>>Step 5: Click OK and a new grid appears over your map window. Save it by choosingFile|SaveTable.Finally,closethetablebychoosingFile|CloseTable.

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

Thelargegridwillbesuitableforachoroplethmap,whichusescoloredareas.Thesmallergrid will be more suitable for graduated symbol maps and surface density maps, which well aggregate(roughly)byindividualaddresses.

AggregatingData
The first step towards creating a choropleth, graduated symbol, or surface density map is to aggregatethedatabygridcelltocountthenumberofincidentsineachcell.

>>Step 1: Make sure the following layers are open and in Layer Control: streets, GridSmall,andFallCrimes(closeFallCrimesDispersedandreopenFallCrimes).

>>Step2:ChooseTable|UpdateColumn.Fillinthedialogboxasbelow.

>>Step 3: Click on the Join button and verify thatthejoinreadswhere the object from FallCrimes is within the table GridSmall. Then clickOK.

>>Step4:Browsethrough the resultant table, and youll see that you now have a count of the number of incidents in each grid cell. The majorityofcellshavenoincidents.Closethebrowserwindowwhenfinished.

CalculatingStatistics
Now that we have an aggregated field, we can see somestatisticsforthosecounts.

>>Step1:ChooseQuery|CalculateStatistics

>>Step 2: From the GridSmall table, choose the CountofFallCrimefield. The results are to the right (yours may differ slightly). You can calculate statistics like these for any number fieldinanytable.

60

Crime Analysis with MapInfo

Christopher W. Bruce

GraduatedSymbolMaps
Nowwerereadytocreateourfirst thematicmapagraduatedsymbolmapusingthecounts inourGridSmalltable. >>Step 1: Choose Map | Create Thematic Map. Click on the Graduated button and chooseGraduatedSymbolDefault.ThenclickNext.

>>Step 2: Specify the GridSmall table and the CountofFallCrimes field. Click theIgnorezeroesorblanksfield. >>Step 3: Accept the default settings, or increase the maximum symbol size to 48 atavalueof70,asIdidonthenextpage. >>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 youcanseetheentiregraduatedsymbolmap.Notethelegendwindowthatappears.

The graduated symbol map makes the hot spots stand out much more visibly than with the simplepinmap,anditdoesntsacrificegeographicaccuracyaswiththedispersedpinmap.

62

Crime Analysis with MapInfo

Christopher W. Bruce

PointSymbolMaps
Apointsymbolmapcolorcodesorsymbolcodesincidentsbasedonacategoryorrange.Well create a point symbol map that symbolcodes our incidents by crime type. First, though, lets queryoutasubsetofincidentsaroundtheholidays. >>Step1:ClosetheFallCrimeslayerandopenFallCrimesDispersed. >>Step 2: Choose Query | Select. Fill in the select box as below to pull out only the crimesinthelasthalfofDecember. >>Step 3: Close the Browser Window, go to Layer Control, Add the Holiday Crimes table and make the FallCrimesDispersed tableinvisible. >>Step 4: Choose Map | Create Thematic Map. Click on the Individual button and choose Point IndValue Default and thenNext. >>Step 5: Choose the HolidayCrimes table and the IncidentType field andthenclickNext. >>Step 6: Click the Styles button and set the different symbol and color styles for each crime. For crimes that are similarlike the various larcenies or two types of assaultyou may want to choose the same symbol but a different color. Note that you are not limited to one font setyou can change the font from MapInfo 3.0 Compatible to other symbol fonts. MapInfo Miscellaneous has some crimerelatedfonts.Experimentwithhalosandborders.

63

Crime Analysis with MapInfo

Christopher W. Bruce

>>Step 7: Make sure you set the Legend options. When finished, click OK to see yourmap.

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

ChoroplethMaps
Choropleth maps create colored or patterned regions based on a value (such as the number of crimes)withinthem. Our GridSmall grid cells are too small to create a good choropleth maponly a small numer ofcellshaveanyincidentsinthematall. >>Step 1: Make sure the GridLarge and FallCrimes (not dispersed) are open and activeinLayerControl. >>Step 2: Choose Map | Create Thematic Map. Click the Ranges button and choose RegionRangesDefault.

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 createthethematicmap. >>Step 3: Choose the GridLarge table and ignore zeroes and blanks. For the field, we want to perform a Jointhat word may already be in the field, butwehavetopulldown thelistandselectitagain. >>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.ClickOK. When you return to Step 2, you will see that CountofFallCrimesthe new temporary fieldisfilledintheFielddropdown. >>Step 5: Click Next. In Step 3 of the process, we have to make several settings forhowourchoroplethmapappears. The Method field (under the Ranges button) offers several options for choosing how manycellsgetassignedeachcolor,andhowthe 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 its 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 sensiblelegend.Whenfinished,click OK. The result is a colored area map that showshotspotsacrossthetown. >>Step 7: In Layer Control, make FallCrimes and the grid invisible, butnotthethematic.

67

Crime Analysis with MapInfo

Christopher W. Bruce

Keepinmindthatyoucanuseanypolygonlayergrids,censusblocks,citiesandtowns,police boundaries, and so onto create a choropleth map. The example below, which we may do in class(ifwehavetime),showspopulationsforMassachusettscitiesandtowns.

SurfaceDensityMaps
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 fromdifferentlocationswithinthoseregions. 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 wont. But in a density map, 130 willfeeltheeffectsofnearby120.Areasinbetweenknownhotspotswillshowupashoteven iftheyhaventhadanyoffenses.Howvalidisthisforcrimemapping?Thedebategoeson.

68

Crime Analysis with MapInfo

Christopher W. Bruce

To create a surface mapwhich MapInfo calls a Grid mapwe must begin with a layer that aggregates incidents in small areaseither by point or by very small grid cells. Fortunately, we alreadyhavejustsuchalayer. >>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 Boundarytable. >>Step 2: Choose Map | Create Thematic Map. Click the Grid button and choose GridDefault.

>>Step 3: Specify the GridSmall button and the CountofFallCrimes field. Ignore zeroesandblanks.ClipagainsttheBoundarytable.ClickNext. >>Step4:ClickontheSettingsbutton. 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 meansmoreweight;alargerexponentmeanslessweight.

69

Crime Analysis with MapInfo

Christopher W. Bruce

Consequently, you have four options, each of which will produce a different looking surface densitymap: Exponent Large Small Mild influence spread out over Strong influence spread out over Large
large area. Hot spots unlikely to stand out; everything will look cool or warm Hot spots will stand out, but some may show exaggerated influence

Search Radius

large area. Many warm or hot.

areas

look

Small

Only a small number of tight hot spots appear. Less severe hot 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 andasmallsearchradius.Doyouwanttoshowmorepotentialhotspotsandareyouwilling toruntheriskofalittleexaggeration?Usealargesearchradiusandasmallexponent. >>Step 5: Set the exponent to 1and the search radiusto2miles.ThenclickOK. >>Step 6: Click on Styles. Change the method to Custom Value Ranges and the number of inflections to 4. Doubleclick on the colors and adjust them as you see fit. Changethevaluesto8,6,4,and2. >>Step 7: Click on the Legend and give it a sensible title. Then OK everything and see theresult. >>Step 8: To see it better, go to Layer Control and turn off both GridSmall and FallCrimes. Elevate the streets layer above thegridcount. The result is on the next page. If you want to try to test different exponents, search radii, and othersettings,youcangotoLayerControl,select the GridSmall_CountofFallCrimes layer, and clicktheThematicbutton.

70

Crime Analysis with MapInfo

Christopher W. Bruce

3DMaps
You can add a threedimensional quality to a density map by choosing Map | Create 3D Map. Similarly, you can create a 3D map out of a choropleth map by choosing Map | Create Prism Map. But seriously, arent we going a little too far here?

YourOwnData
Try some of these thematic maps with your own agencys 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 surfacedensitymapifyourefeelingbrave.

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 insteadofcoordinates,consistonlyofasingleobject,andhavenounderlyingattributedata. 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 alongwithyourvectordata.

OpeninganImage
Toopenanimage,simply: >>Step 1: Choose File | Open. Change Files of TypetoreadRasterImage. >>Step 2: Navigate to C:\MICA\SampleData\ compassrose.gif and click Open. In the dialog box that follows, simply choose display. Immediately,youhaveanicelookingcompasstouseinfuture 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 windowandaddtextyoujustcantbringinanyothervector layers(well,youcan,butitwontmakeanysense).

RegisteringaRasterImage
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 ontheimage. >>Step 1: Choose File | Open. Change Files of Type to Raster Image. Select DanversAerial.jpgandclickOpen. >>Step2:TellMapInfothatyouwanttoRegistertheimage.TheImageRegistration windowopens.

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 yourMapWindow.ThedifferentpointsalongtheReservoirandtheintersectionsalongRoute1 areallgoodchoices. >>Step 3: Identify five points on the image. Click them onebyone andnamethem. >>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 fourpoints. >>Step5:Whenyouget done, look at the Error column. Each of the entries should be less than five, or youre going to end up with a wacky image. When youredone,clickOK and see how well the rasterimagematcheswiththevectordata.Myresultisonthenextpage.

WorkingwithYourOwnData
Download a satellite photo of your own jurisdiction from Microsofts Terraserver at http://terraserver.microsoft.com.Trytoregisterthephotoagainstyourownstreetsfile.

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

RotatingaMapWindow
By default, north is always up in MapInfo maps. It doesnt have to be this way, thoughyou canrotatetheMapWindowtoputnorthinanydirectionyouwant. >>Step 1: Choose Tools | Tool Manager. Scroll down until you find the Rotate Map Windowtool.ClicktheLoadedbuttonandthenOK. >>Step 2: Choose Tools | Rotate Map Window | Rotate Map Window. Specify a rotationof90degreesandclickRotate.Tryvariousotherrotations.Whenyouredone, clickUnrotate.

Note that symbols do not rotate with the Map Window. If you have a symbol with a north arrow,itwillnotrotate,andthearrowwillbewrong.

75

Crime Analysis with MapInfo

Christopher W. Bruce

ClipRegions
Clip regions allow you to select only part of the Map Window for display. You can clip based on an existing polygon layersuch as a patrol areaor you can clip based on a polygon that youdraw.Clipregionshelpmakeforattractiveinsertionsinbulletinsandreports. >>Step 1: In Layer Control, make thecosmeticlayereditable. >>Step 2: Click the Elipse drawing tool . Draw an elipse around a section of your map perhaps the hot spot at the LibertyTreeMall. >>Step 3: Use the selector to selecttheellipse. >>Step 4: Choose Map | Set Clip Region. Choose to Discard the cosmeticobject. >>Step5:Toremoveaclipregion,chooseMap|ClipRegionOff.

CopyingaMapWindow
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 intoMicrosoftWord,MicrosoftPowerPoint,orjustaboutanyotherWindowsapplication. Its even better, though: Windows recognizes MapInfo objects for what they are. When you paste a MapInfo map into Microsoft Word, it doesnt just paste it as a picture. Its pasted as a link to the original data files, which means thateven after youve closed and quit MapInfo, you can still doubleclick on the map in Word (or whatever application youre using), and, as long as the original MapInfo files are still in the same location, a miniversion of MapInfo opens withinWord,allowingyoutopan,zoominandout,identifyobjects,andrearrangeyourlayers. One caveat: Since the object, once pasted in another application, is still a MapInfo object, the MapInfo fonts that youve used within the map must be on the computer for it to display properly. If you transfer the document to a different computer that doesnt have MapInfo installed, your carefully chosen symbols (e.g., little handguns, vehicles, people) will not displaythe computer will revert to the analog symbol in a different font set, and youll be

76

Crime Analysis with MapInfo

Christopher W. Bruce

facedwithnumbersigns,dollarsigns,andsoon.IfyouregoingtodisplaytheMapInfomapon acomputerthatdoesnthavetheMapInfofontsinstalled,pasteitintoWordorPowerPointasa picture(Edit|PasteSpecial),notaMapInfomapobject.

Since the Legend Window is a separate window than the Map Window, it doesnt 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 ofalayout(seebelow).

77

Crime Analysis with MapInfo

Christopher W. Bruce

SavingaMapWindowasanImage
TosaveaMapWindow asanimage,simplychooseFile|SaveWindow As.You cansaveitas a bitmap, a JPEG, or a bunch of other image formats. You can then import the image into other applications.

CreatingaLayout
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, youll 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 currentlyopenwindows. Once youre in the Layout Window, youll need to specify the orientation (File | Page Setup) and rearrange and resize your windows. You can add text or other drawing objects to your layout withthetoolsontheDrawingtoolbar. If you want to add a north arrow, add a symbol and choose the font MapInfo Arrowsoryoucanusethecompassroseimagewe openedearlier. You can find a ScaleBar tool in Tools | Tool . You can add the scale bar directly to Manager the layout if theres only one Map Window; otherwise, youll have to add a separate scale to each MapWindow.

78

Crime Analysis with MapInfo

Christopher W. Bruce

ExportingaLayout
Unfortunately, you cant 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 saveitasanimagebychoosingFile|SaveWindowAs.

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, perhapsyouwanttotypeaURLthatlinkstoapictureoftheproperty. 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 youve set this up, you simply have to click on the object with the Hotlink tool toopentheassociatedlink. Intheexamplehere,Ivehotlinkedallofmy Massachusetts cities and town polygons with the city or town web site. Using he hotlink tool to click on the city of Cambridge in themap brings up the City of Cambridgesofficialwebsite.

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 MapInfos other products:

MapInfoProViewer
MapInfo ProViewer is a free piece of softwarethat you candownload from MapInfos web site. Itsworthgetting.ProViewerallowssomeonewithoutMapInfoinstalledonhisorhercomputer to open a workspace. The user cant 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 everyones desktop, whether a standard map of your jurisdictionoradetailedmapofcrimeeventsinthelast60days.

MapInfoDiscovery
MapInfo Discovery is like ProViewer, except that it is browserbased, offers more options for publishingmaps,andisntfree.

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. Its a good solution if you want to geocode large sets of data outside your jurisdictionfor instance, the home addresses of everyone youve ever arrested. The geocoding engine offers an easyto use interface for advanced geocoding options, but its not really any more powerful than the geocodingenginethatcomeswithMapInfoProfessional.

MapXTreme
MapInfos 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 MapInfos programming language. 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 userinterface, and so on. There are a number of commercial products that use MapBasic. If you know Visual Basic, you can call MapBasic files throughVisualBasicandaddpowerfulmappingcapabilitiestoaVisualBasicprogram.

CrimeInfo
CrimeInfoisaMapInfoaddon,writteninMapBasic,andoriginallydevelopedbyCharlesRiver 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) customertopurchaseCrimeInfo. 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 installedfor instance, one the basic RMS import is designed, you cannot add additional fieldsorchangethewaythetabulardataissetup. UserswithCrimeInfoareencouragedtokeepusingitforthetasksthatitdoesbest,buttokeep theirskillswithMapInfosharpsotheycanexceedthecapabilitiesoftheaddonwhenneeded.

82