Presentation is loading. Please wait.

Presentation is loading. Please wait.

Martin Dodge Practical 2, 24th March 2004, 2.30-4pm Social Science Research Methodologies.

Similar presentations


Presentation on theme: "Martin Dodge Practical 2, 24th March 2004, 2.30-4pm Social Science Research Methodologies."— Presentation transcript:

1 Martin Dodge (m.dodge@ucl.ac.uk) Practical 2, 24th March 2004, 2.30-4pm http://www.casa.ucl.ac.uk/martin/ss_methods/ Social Science Research Methodologies Hands on spatial data handling and analysis using GIS

2 Goals of the practical gain confidence in using ArcMap GIS to process spatial data for London be able to add new attribute data to map features undertake some simple analysis using selection, overlays and buffering begin to understand the ‘tool-box’ approach to GIS operation comprehend the ability to do analysis using both the attribute and geographic properties of the data

3 login to the WTS computer system from last week’s practical you should have London spatial data stored in: R:\wts\mywork\ss_methods If you don’t have the data, ask Martin for a copy

4 now you need to start the GIS. we will be using a module of ArcGIS called ArcMap. go to Start -> Programs -> Software A-H -> ArcGIS -> ArcMap

5 this is the ArcMap interface. select ‘ An existing map: ’ option and click ‘OK’ button go to the ss_methods folder and select ‘ maps.mxd’ file. open this file. ignore the warning message about the printer not found

6 you should see the map, with 3 data layers the first thing we want to do is add some of our own data

7 Adding data you add new data to map objects by inserting new columns into the attribute table for the layer you can do this manually (only good for small numbers, of course) or you can do an automatic join to a separate data file

8 we want to add a new column to the ‘london_boroughs’ layer indicating whether the borough is in inner or outer London as there are only 32 boroughs we will do this manually the new column simply has ‘i’ (for inner) or ‘o’ (for outer) right click on the ‘London_boroughs’ in the Layers and select the ‘ Open Attribute Table’ option

9 first we need to add a new empty column in the table for our data select the ‘Options’ menu (at bottom of table) choose the ‘Add Field…’ option

10 in the ‘Add Field’ dialogue box set the ‘Name:’ to inner set the ‘Type:’ to Text set the ‘Field Properties’ Length to 1 the table now has a blank column called ‘inner’

11 now need to make the table editable go to the ‘Tools’ menu and turn-on the ‘Editor Toolbar’ choose Editor and select ‘Start Editing’ from the menu

12 in the inner column enter ‘i’ for inner London boroughs and ‘o’ for outer fill in the column all the way down to bottom when complete, go to the Editor toolbar and select ‘Stop Editing’ you will be asked, ‘Do you want to save your edits?’. answer Yes

13 you should get a binary map like this have a go at making a thematic map of the London boroughs using your new ‘inner’ data column can you remember how to use the Symbology options from last week’s practical?

14 adding lots of new data manually is not really very feasible alternatively, you can join many new data columns automatically joining uses a common field to link together the records in 2 separate tables. common fields can be postcodes, names, id codes, etc Table 1 a1, b1, c1, d1 Table 2 a1, x1, y1, z1 Joining using field a1 Result a1, b1, c1, d1, x1,y1,z1

15 we will add two new columns to the London boroughs (giving the number of people aged 16-17, 18-19 from the 1991 Census) with an automatic join this data is held in a new file called ‘new_data.dbf’ which Martin will give you a copy of to put in your ‘ss_methods’ directory firstly, you need to add the ‘new_data.dbf’ to your map click on the ‘+’ button on the main toolbar and choose the ‘new_data.dbf’ file in your ‘ss_methods’ directory

16 quickly have a look at what the ‘new_data’ table contains right click on the ‘new_data’ in the Layers and select ‘Open’ below is the table you should see note, we will be using the ‘ZONE_ID’ column (unique census identification codes) as the common field to do the automatic join

17 now we are ready to join the columns in ‘new_data’ table to the London boroughs right click on the ‘london_boroughs’ in the Layers and choose the ‘Joins and Relates’ option, then ‘Join’

18 fill in the dialogue box as follows: ‘Join attributes from a table’ 1. ZONE_ID 2. New_data 3. ZONE_ID then click on ‘OK’ open the attribute table for ‘london_boroughs’ and there should be 4 new columns of data appended to it

19 have a go at making a thematic map of the London boroughs showing the number of 16-17 year olds

20 Data selection quite often you want to work with a subset of the map features being able to select specific elements of the map to process is a powerful feature of GIS there are 3 main methods of data selection: 1. attribute selection, 2. spatial selection, 3. interactive (manual) selection first we will try out ‘select by attribute’ to create a new layer of big universities, i.e. those with more than 10,000 students

21 go to the ‘Selection’ menu and choose ‘Select By Attributes…’ this selection uses databases queries and can be a very powerful way of specifying exactly what you want first, make sure ‘Layer:’ is set to universities in the large box, write the query, “STUDENTS” >= 10000 then click on ‘Apply’ and then ‘Close’

22 the big universities are now selected and highlighted in sky blue to save this as a new layer for later work, right click on the ‘universities’ layer and choose ‘Selection’ choose ‘Create Layer from Selected Features’

23 there is now a new layer called ‘universities selection’. check the attribute table for this layer. It should be the same as below

24 now do an interactive selection, clicking with the mouse to create a new layer with just the inner London boroughs select ‘london_boroughs’ from the Layers and choose the ‘Select Features’ tool from the main toolbar now select the 14 inner boroughs by clicking on them with the cursor while holding down the shift key the inner London boroughs are now selected

25 again create a new layer from your selection the new layer will have only the inner London boroughs the result should be like this

26 the last type of selection operation is spatial selection we will use ‘Select by Location’ to choose all the universities located within inner London boroughs go the Selection menu and choose ‘Select by Location’ in the dialogue box select the options as shown opposite click on ‘ Apply’ and then ‘Close’ you should see all the universities in inner London being highlighted

27 Overlay : ‘point-in-polygon’ overlaying different layers can be a powerful means of spatial data analysis for example we might want to know how many universities and students are found in different London boroughs we want to overlay the point of the universities onto the boroughs polygons this is done in ArcGIS using a spatial join. You join the universities to the boroughs layer so that the sum of the attributes is appended as new columns in the boroughs table this is a very simple, but useful, point-in-polygon overlay operation

28 to do a spatial join, choose the ‘london_boroughs’ in the Layers and right click choose the ‘Joins and Relates’ -> ‘Join in the dialogue box, fill in as opposite, remembering to check the ‘Sum’ tick box click ‘OK’ to enact the join

29 the result of the join is a new layer called ‘Join_Output’ which is the boroughs but with extra columns. open the attribute table there are new columns of data created by the join. The ‘Count’ column is the number of universities and the ‘Sum_STUDEN’ column is the sum of students for each borough. Camden and Westminster tie for the number of universities (5 each)

30 have a go at making a quick thematic map of the number of students in each borough. Use the ‘Join_Output’ layer the field for the value of ‘Sum_STUDEN’

31 Geoprocessing: Dissolve another useful analytical process is to merge together similar spatial objects merging for example features that are adjacent in terms of location or have the same attribute characteristics in terms of area spatial data, like the London boroughs, we could merge together boroughs for inner and outer London this is done using a dissolve operation

32 from the ‘Tools’ menu choose the ‘GeoProcessing Wizard…’ choose the first option, Dissolve on the wizard and then click on ‘Next’

33 in box 1, choose ‘Join_output’ as the layer to dissolve in box 2, select the ‘INNER’ column as the key to dissolve click ‘Next’ in the new dissolved layer we want to have the total number of students for inner and outer London select the ‘Sum_STUDEN’ item and then check the box marked ‘Sum’ click on ‘Finish’

34 a new layer called ‘Dissolve_Output’ is created with just two areas for inner and outer London use the ‘i’ information tool to find out how many students are studying in each area

35 Going further - buffers If you have time in the practical and are interested why not try another key geoprocessing option, buffering use the ‘Buffer Wizard...’ on the ‘Tools’ menu note, first you’ll need to set the map units to metres. To do this go to ‘View’ -> ‘Data Frame Properties...’ -> ‘General’ -> ‘Units : map’

36 here is an example of the output from buffering of the university points how might the buffers be useful in spatial analysis?


Download ppt "Martin Dodge Practical 2, 24th March 2004, 2.30-4pm Social Science Research Methodologies."

Similar presentations


Ads by Google