Lab 4: Basic geostatistics

 

 

  1. Start by analyzing the BG_GF_Census dataset from last week. However, we need to convert this to centroid points. Open it in ArcMap and use the XTools Pro tool Feature Conversions>>Shape to Centroid. Specify the output. Call the output BG_GF_Census_pt. If X tools doesn’t work (I think the older version on 222 machines might be buggy), use a similar tool in toolbox: data management>>features>>feature to point. The, let’s generate XY coordinates for it that are in units that means something---meters. So go to Xtools pro>>Table operations>>add xyz coordinates (this should work in X Tools). Under output project click specify and then import. Choose any one of your Gwynns Falls block group layers as the source. The units should now be recorded in UTM coordinates, which are in meters.
  2. Now open the table from that layer in S-Plus. Enable the spatial statistics module by clicking file>>load module>>spatial. Let’s start by doing a variogram of total crime. Click spatial>>variogram cloud. Choose BG_GF_Census_pt as the input, Totcrime05 as the variable, X as location 1 and Y as location 2 (don’t use the fields called X Centroid or Y Centroid as they are in latitude longitude and harder to interpret). Make sure scatter plot and box plot are checked. Press apply and then screencapture the box plot (note that you don’t have to use Snagit; instead you can right click on the graph and click “copy” then right click in Word and click “paste.”). What does this seem to show? Next let’s do the empirical variogram (sptial>>empirical variogram). Choose the same inputs, only this time check “plot variogram” and write “totcrime” in the Save as box.  Look at the output. Now let’s increase the density of bins (points). Go back to the empirical variogram interface and this time click the options tab and choose 40 lags . Click apply and screencapture the result. Where does the gamma value seem to be leveling off for this? Now let’s do a model variogram. Click spatial>>model variogram. Choose totcrime as the variogram object and choose a Gaussian function. Then check “fit parameters.” Click apply.Report the three parameters and screencapture the plot and interpret what these parameters mean. Keep in mind that in S Plus the actual sill is the reported sill plus the nugget.
  3. Let’s now try the again, but with an actual point data set that has much more data. Copy the sample_props2 feature class from \Data_2006\Database\Analysis\Analysis.mdb into your geodatabase and then import the table into SPlus using import>>from database.
  4. Do an empirical variogram of the percentage of grass by property. Click Spatial>> empirical variogram then choose GRASS_PER as the variable and X as location 1 and Y as location 2. Set the number of lags to 40 and the maximum distance to .1 (that’s in decimal degrees) (remember that you shouldn’t have a maximum distance of more than half of your greatest map distance). Under “save as” type “grass.” This will save a model object for use later.  Click apply and make a screencapture and interpret.  Now click Spatial>>model variogram  and under variogram object, choose “grass.” Choose Gaussian as the function. Check the “fit parameters” box. Accept the defaults and click apply. Copy and paste the plot. Report and interpret the range, sill and nugget.  If you have time, try changing some of the parameters to see how that changes the curve.
  5. Now, go back to Arc Map. Make sure the Geostatistical analysis extension is enabled. Then click Geostatistical analyst>>Geostatistical wizard. Choose “kriging” as the method, sample_props as the data and GRASS_PER as the variable. Click next and then highlight “prediction map.” Click next. Try adjusting the lag size and number of lags to adhere to our rule of having the total x axis be no longer than tbe maximum map distance/2. Take a screencapture of the semivariogram and briefly interpret. Go to the next screen and preview the surface. Click next and go to the error tab and screencapture and interpret what you see. Also, report the root mean square standard error. Click finish, and screencapture the display. Now let’s try universal Kriging. Again click Geostatistical analysis>>Geostatistical wizard, choose kriging as the method, sample_props as the data and GRASS_PER as the variable. On the next screen, this time choose universal kriging>>prediction map. Click next and then try moving the trend slider. In this case, move it until you think you’ve captured the general trend of there being less grass in the industrial south of the city and more grass in the residential north. Try about 70-80% global.  Now click next. Again, set the lag size so that you’re at least close to D/2. What’s the range it reports? Click next twice and then check out the RMS error and compare to the last time. Finish and display and screencapture. Then Right click on the universal kriging map in the TOC and click “prediction standard error map.” Overlay the points on that and take a final screencapture.