200 likes | 361 Views
Lab:. Peter Fox GIS for Science ERTH 4750 (98271) Week 10, Friday, April 6, 2012. First: from Tuesday. More thematic maps. Bar charts to show the quarterly rainfall for the New England States. But … because some states have multiple measurement sites we have to group them.
E N D
Lab: Peter Fox GIS for Science ERTH 4750 (98271) Week 10, Friday, April 6, 2012
More thematic maps • Bar charts to show the quarterly rainfall for the New England States. • But … because some states have multiple measurement sites we have to group them. • Query to get a new table just for each state • Create Thematic map, select Bar Chart > Next > select columns to plot > Next > OK.
Creating points for intersections of lines • Open the street file nyrensd. Make 2 copies of the nyrensd file and give each a unique name (File > Save copy as) such as str1 and str2. Open the 2 new files you have created. • Choose Query > SQL select and enter: Select columns = str1.streetname + "&&" + str2.streetname from Tables = str1, str2 where condition = str1.obj Intersects str2.obj and str1.streetname <> str2.streetname into Table Named = Intersection • Save it
Adding/ comparing • Past exercise: make a spreadsheet of the zip codes for 10 of your friends in the US. • Read them in to MapInfo, geocode them using zip codes and us_zips, and plot them on a map of the US (usa). • Using this table of friends zipcodes, add their ages and add 5 new friends (or class members) to the table. • Plot them on a map that distinguishes new friends from old and their ages.
Creating attributes • Make CL editable > put objects on map with tools > Map > Save CL objects (these are in your tool bar) and name the new table • Open new Browser window • Table > Maintenance > Table structure > add fields (add "area" column) • Table > Update column > Column = "area" > Value > Assist > Function > Area • Save table
Map Basic Programs • http://escience.rpi.edu/gis/mbprogs • <file>.mb is the MapBasic program • <file>.mbx is the compiled program
Options – Show Mapbasic Window open table "c:\mapinfo\data\world.tab" interactive map from world select * from world where pop_1994> 10000000 into selection browse * from selection map from selection • Using MapBasic • http://escience.rpi.edu/gis/data/radon2.xls • http://escience.rpi.edu/gis/mbprogs/semi-variance.mb • Plot variograms… in preparation for kriging (next week)
Statistics • http://escience.rpi.edu/gis/data/radon3.xlsx (originally from http://www.health.state.ny.us/nysdoh/radon/tables/county/rensselaer.htm ) • Geocode the table by place names using Rens2000 and common sense. • [You might add the lon/lat to your table…]
Statistics • The uncertainty in a value estimated by weighted averages is one over the square root of the sum of the weights. • Use IDW to estimate the uncertainties in estimated values at (73.58W, 42.69N), at (73.45W, 42.83N), and at (73.46W, 42.51N) • Hint: MapBasic is simplest, or use MapInfo to get distances, then Excel for the calculations.
Mapping aspects of radon3 • Make a thematic map of the 'Living' points using different colored symbols to represent the value ranges. • Make a thematic map using regions instead of points. Which is a better representation of the data? • Make a thematic map of the 'Basement' points using regions. • How does the pattern compare (visually, for now) to the 'Living' observations? Hint: make your thematic maps with color schemes that will allow best visual comparison.
Mapping aspects of radon3 • Make a surface plot by grid interpolation (Inverse distance weighting) of the geocoded points while removing Schaghticoke from the data set. • Include the points on the map (use a similar coloring scheme for this) • See how well the interpolation routine (IDW) predicts the value at Schaghticoke.
E.g. for a project on this • Repeat the procedure 4 more times using different values for the exponent and search radius. • Which value of the exponent gives the best match to the Schaghticoke value? • How many of them match the value within its uncertainty? • Make a layout window that contains your 4 trial maps (label the maps). • Discuss the relative usefulness/accuracy of the various representations of the data. • Which would you use to make a presentation to the County Senate? Why?
Example • We see that the calculations match the results of the Excel trend-line function. • Regression with equal weighting of all data implied. http://escience.rpi.edu/gis/data/regression.xls
Adjusted e.g. • The final data point has little influence on the solution when its uncertainty is increased by a factor of 3. • Weighting (equal) also influences the standard errors in the estimated unknowns.
Unequal weighting http://escience.rpi.edu/gis/data/wtd_regression.xls
Tue: Lon/lat from geocoded table? • You may want to see the latitude and longitude in your geocoded table. • There are 2 ways to do this depending on whether you want a new table or want to put the lat/lon in your original table. • To create a new table use Query > SQL select. • Under select columns, enter columns you want in the new table and then also put: • CentroidX(obj) "Longitude", CentroidY(obj) "Latitude"
And • To add the lat/lon to an existing table, select Table > Maintenance > Table structure and add 2 new columns to your table. • Call the Lat and Lon and make them ‘float’ types. • Then choose Table > Update column. Enter your table name under Table to update and Get value from Table. • Column to update should be your lat or lon and Value shoud be CentroidY(obj) for latitude and CentroidX(obj) for longitude.