Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

38
Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan

Transcript of Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Page 1: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Get Started with GIS Mapping

Part 2 of 2, December 2009Madhu Lakshmanan

Page 2: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AgendaData Preparation – planning, geocoding,

aggregating, data formatting ...Mapping aggregate data with AFF Mapper

◦ Using data sets from the AFF website◦ Using your own datasets in Excel

Mapping aggregate data with EarthplotRecapTo-DoResourcesHomework

Page 3: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Data Preparation - PlanningHaving some idea of what you want to

achieve with your mapWhat data do you have already?What data do you need to acquire?If you have to convert your data, what

conversion tools do you need?What maps can you reuse? Data origin, metadata, processingDiscuss with other users, colleagues,

peers

Page 4: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Data Preparation - GeocodingCan geocode at different address

levels like state, county, zipcode, complete address, etc.

Multiple ways, differences in accuracy, daily limits, one time activity

Using BatchGeocoder.com Using KMLGeocoder on desktopZip data with lat/long for each state

Page 5: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Useful to graph case address data at a higher level like zipcode/county/state

Using Excel to do sorting/subtotals Using the aggregate geocoded data

in tools like EarthplotCertain tools need your data to be

either in number format or don’t care. Knowing which can help in troubleshooting

Data Preparation - Aggregate

Data Preparation - Formatting

Page 6: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Mapping your case data - pointsDirectly enter addresses into GE one by

one. (can import bulk if using Pro version)Use a tool like KMLGeocode to take your

Excel address data and convert to KML directly – no identifying info needed other than address data. Limit is 5000 a day.

GE shows a map with a scatter plot of your case data. A screenshot of this will not reveal any specific address information to a viewer but sharing kml will do that.

Page 7: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Mapping your case data - aggregateUseful to denote differences in

numbers at an aggregate level such as zip code on top of other layers

Need to have your data prepped as aggregates and geocoded beforehand.

Earthplot is a simple tool that creates such graphs for GE. (GE-Graph is one other more complex tool.)

AFF Mapper also requires your data to be aggregated but does not require geocoding. It creates the shaded graduated maps and not graphs

Page 8: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – Using datasets from American FactfinderCreated to make maps using census

boundary files and American Fact Finder data

Rule-based, but simple to followFind a shapefile from

http://www2.census.gov/cgi-bin/shapefiles/national-files This is a one time task for a particular geography, so make sure to extract, rename and save the file safely.

Extract to a folder on your computer that you can find. There will be multiple files in the folder.

Page 9: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – Basic Go to the American Fact Finder website for datasets.

http://factfinder.census.gov/ In the left panel, choose Data Sets and a

survey/census Choose the option to create a custom table Select a geographic type and subtypes if applicable. Follow the prompts to select a table from the list Filter by data elements (these will be the columns in

your final excel file) Sometimes you can further filter the results to restrict

the number of rows View the table before downloading. In the toolbar above the table, you have an option to

print/download. Choose download, choose to save as an Excel file with the descriptive field names and save. Extract the zip file to a well named folder.

Page 10: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 11: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 12: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 13: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 14: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 15: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 16: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – Basic Start up the AFF Mapper Click on Input file and choose your shapefile that you

had downloaded from the TIGER site earlier. Once that loads up, select XLS from the Join File Type

and click on Join Table. Browse to your Factfinder downloaded xls file and select it.

It usually detects the common fields from the two files, but you might just want to see that it has done it right.

Then click Join Tables. You should see the two tables merge together.

Select the field that you want to be a label on your map Click Render. Another box opens and you can choose

your field to be mapped (only after choosing the distribution type) and set the mapping options. Set colors etc and say ok.

You return to the original screen, where you specify your output filename and click Go. This will create a KML file for you. You can then open it in GE.

Page 17: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 18: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

• The variable list appears only if you choose one of the distribution methods that allows for multiple values (Quantile, Equal Interval, Standard Deviations, Jenks Natural Breaks)

•Choose a variable from the drop down list (pick one that is an estimate and not one that is a “margin of error”. There are both types in the Excel file we downloaded. i.e. for each estimate, they also give you the margin or error in the next column).

•If you would like to normalize (divide by) another value such as the total population in that county or the total area or something to make the playing field level, then choose that variable in the “Normalize By” box.

•Note that these are sampled and not like census, so you may find entire geographic areas that are empty if you choose a very restrictive variable.

Page 19: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.
Page 20: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – for your dataEarlier we saw how AFF Mapper

can be used to map census (publicly available) datasets onto base shapes, but we can also use it to map our own data as long as it is put in a form that the program understands.

Page 21: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – Data formatYour data needs to be in aggregate form, in

Excel, aggregated to the level that you want to categorize on. e.g. if you want to see county-wise color graduated map, then your data should be aggregated to the county level

The columns that contain this level should be in both the base shapefile and your data file. e.g. your data file should contain the county code/name if that was your aggregation level.

The top row of your file can be the column headings. In the second row, you can have descriptive headings for your data. It is very IMPORTANT to use a colon ‘:’ in the 2nd row heading for those columns that are to be treated as NUMERIC, otherwise you will not be able to map those columns. E.g. you can call a column Case : Total

Page 22: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – ExampleAn Excel file with Michigan County-

wise data aggregates is chosen. The 2nd row headings are created making sure that the numeric data field/s have colons in the 2nd row headings.

CCode CName Data

countycode countyname Cases:data26001 ALCONA 38

26003 ALGER 90

26005 ALLEGAN 81

26007 ALPENA 18

26009 ANTRIM 26

26011 ARENAC 33

26013 BARAGA 41

Note the colon :

First Row Headings

Second Row Headings

Page 23: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – ExampleA Michigan County level shapefile from

the Census TIGER/Line was downloaded to serve as the base layer for the data.

Start AFF Mapper and use the county map of Michigan as the Input shape.

Then, under ‘Select Join FileType’, select XLS file and in the Join File box, browse for your previously created Excel file with the county aggregated data.

Page 24: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – Example Once that is loaded, set the Shape Join Field and the Table Join Field to

be the same data, i.e. the level to which the data is aggregated, in this case County.

The names of the columns might be different, but all that matters is that they contain the same type of data.

In this example, we might set the Shape Join Field to CNTY|DFP and the Table Join Field (which is our data) to CCODE.

Alternatively, we could also use Name and CNAME but a code is usually more efficient than a name because of spellings etc.

Page 25: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – ExampleHit Join tables and you should see the

tables merge into one. Scroll to the right to see if your data is reflected in the table.

Page 26: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – ExampleChoose the County Name to be the Label Field

and hit Render.You will be able to choose a classification

scheme – note that I have chosen Jenks Natural Breaks in this example.

Then pick the variable to be mapped – data, select the number of classes and colors and click OK

Page 27: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – ExampleClick on Output KML and enter a name

for the output file. Then Click Go and wait for the “Finished” message.

You can then open Google Earth and open this file and see the result.

Page 28: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

AFF Mapper – Example

Page 29: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

EarthplotEarthplot requires data such as: the column that

has been aggregated upon (e.g. zipcode), the actual aggregated values (e.g. counts), its latitude and longitude (the latitude and longitude of an area is usually created using its centroid) and any other data you might want to show in the description.

Zip Cases Latitude Longitude

87002 1 34.5756 -106.588

87004 4 35.4078 -106.82

87005 1 35.1385 -108.242

87006 1 34.4828 -106.805

87016 1 34.748 -106.158

87017 3 36.2277 -106.819

Page 30: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Earthplot In Earthplot, you will see 2 tabs, a Data tab and an Options

Tab. Copy your Excel aggregate geocoded data and in Earthplot, in

the Data tab, go to Edit->Paste and you will see your data appear in the same way that it appeared in Excel.

Page 31: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

EarthplotGo to the Options tab and set various options. In

this example, we use a Graduated sizes type of map with one variable.

Set the columns to the correct items, i.e. longitude in column D, latitude in Column C etc. Make sure you have them right by looking at your data tab again. The variable column is the one in which the Count is stored.

Page 32: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

EarthplotSelect the shape to be ‘circle’ for this example

and Set the minimum and maximum sizes of your circle to be 0.05 and 0.3 to start with. You can keep tweaking these sizes and perhaps even the Ignore values box as you see your graph being created. Also set the color for your circles.

Page 33: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

EarthplotClick on Plot to GE

icon in the toolbar and you should see your circles appear on the map. Tweaking the sizes, colors, and perhaps setting a number in the ignore box will help create the graph you want.

Page 34: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

EarthplotOnce you have the graph you

like, go to Earthplot and in the menu, choose Export to KML and give it a name and save. This way you will have a saved copy of your KML file.

Page 35: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Quick Recap

I want to

Map CommunityData

Map Case Data

Directly as points on the globe/map

In aggregate formusing colors/shapes

Use a geocoder on the actual address data & create KML

Use Earthplot or AFF Mapper

Find ready-to-use KML dataConvert from other data types

Use AFF Mapper

Page 36: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

To-Do1. Assemble a set of tools for mapping2. Begin a library of base files and data files

for mapping on your computer/server3. Find sources of data for your region –

many local governmental entities and health related organizations are good sources.

4. Think about what sort of maps and visualizations work best for each purpose

5. Discuss maps and mapping practices with peers.

Page 37: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

LSNTAP GIS ResourcesSeveral <5 min screencasts with how-tos of

specific tasks we saw in the training series available at: http://lsntap.org/GIS_GE_Howtos

GIS mailing list being restarted – do sign up and discuss mapping at https://lists.mayfirst.org/cgi-bin/mailman/listinfo/gis

GIS Resources section on LSNTAP.org updated

Email your questions to Madhu or to the GIS listserv or if you need to you can set up a G2M with Madhu. Email [email protected]

Page 38: Get Started with GIS Mapping Part 2 of 2, December 2009 Madhu Lakshmanan.

Homework

1. Create maps for your area of interest using the tools discussed today.