Friday, June 6, 2014

Module 3: Python Fundamentals - Part 1

This week's assignment was to become familiar with Python scripting language.  We used Python to perform a few basic functions and methods.  We were instructed to start with a string object of our full name and write a script that ultimately printed only our last name and the number of letters in our last name multiplied by three.  The output of my script is seen above.

This was multi-step process in which we had to isolate each name in a list (e.g. first, middle, last), select only our last name, then calculate the number of letters in it.  This was achieved as follows:

1.       I used my full name “Philip Michael Coppola” as the original string and split this string into a list, which I called “listName” indexed as 0 (Philip), 1 (Michael), 2 (Coppola).
2.       I then used the script:
>>>lastNameLen = len(listName[-1])
>>>print lastNameLen

This gave a result of ‘7’, the length of “Coppola”.  Due to the requirement that another person should be able to use this code to print their last name, I had to use the [-1] index.  This references the last item in a list, whereas using [2] would only work if the other person put three names.

Monday, June 2, 2014

Week 3: Flood Zone Analysis


This weeks assignment was to perform coastal flood zone analyses.  Specifically, we created a map of the District of Honolulu after a modeled 3ft and 6ft sea level rise (SLR) scenario, then analyzed the social impacts of the flooded area using demographic data from the US Census Bureau.  The map above shows the area flooded by a 6 ft sea level rise and the general population density in Census Tracts.  It was created by first demarcating the area that would be flooded using the Less Than tool with the original Raster DEM.  Then the depths were calculated by using the Minus tool between the new raster and the the original DEM.  The high population density near the coastline is noticeable in this map.  Below is a table of demographic data extracted from Census blocks (finer scale than Tracts).

Variable
Entire District
6ft SLR


Flooded
Not Flooded
Total Population
953207
60005
893202
% White
20.85%
29.58%
20.26%
% Owner Occupied
56.77%
38.13%
58.02%
% 65 and Older
14.53%
17.04%
14.36%

The table shows demographic data for the areas flooded and not flooded by the simulated sea level rise of 6ft in Honolulu District, HI.  For comparison, there is demographic data for the entire Honolulu District.  This data is based on the 2010 U.S. Census.  All homes affected are located within close proximity to the coastal in Honolulu District. Clearly the populations affected by the 6ft SLR flood zone are different than the populations not affected by them.  Specifically, there is a greater proportion of persons 65 years and older and persons who describe themselves as “white” in the 3ft and 6ft SLR flood zones compared to the non-flooded zones.  Conversely there is a smaller proportion of owner occupied housing. 

These data can be examined in the context of social vulnerability.  While it is unclear that there is any social or political marginalization in this area due to racial disparity, areas in the United States with a high proportion of persons who describe themselves as “non-white” may be more vulnerable to environmental catastrophes (e.g. Hurricane Katrina; Cutter & Emrich 2006 as cited in Shephard 2012).  While the proportions described here for “white” persons is low compared to the national average, this is to be expected on a Hawaiian island to which “white” persons are secondary colonists.  The lower proportion of Owner Occupied housing in the flooded zones may be a result of seasonal/vocational visits by the owners, or some sort of rental-tenant situation.  This is important for social vulnerability because renters may not know local evacuation routes, or may not have access to personal vehicles for an evacuation situation.  Further, non-owner occupied housing is disproportionately uninsured, which could cause issues during flooding situations.  Lastly, the higher proportion of individuals 65 and older is significant because they may require assistance in an evacuation scenario, increasing their vulnerability to harm.

It should be noted that the 6ft flood zone affects a more racially diverse group of people than the 3ft flood zone.  This is observed in the decrease in the proportion of “white” persons affected from the 3ft to 6ft flood zone scenarios (from 36.79% to 29.58%).  It could be speculated that the greatest density of “white” persons is near the coast of Honolulu.

Thursday, May 29, 2014

Participation Assignment 1: GIS-based Red-cockaded Woodpecker Foraging Matrix Application

               
Red-cockaded woodpecker
(Photo Credit: USFWS)
 The red-cockaded woodpecker (RCW) is a federally endangered bird endemic to the United States.  It has been at the forefront of conservation efforts due to its dramatic decline in recent decades.  RCWs are obligate residents of old growth pine forests of the Southeast United States, an ecosystem that is highly fire-dependent.  The United States Fish and Wildlife Service (USFWS), the government agency responsible for harboring and protecting endangered species, has created a GIS-based habitat index matrix which scores suitable foraging habitat in the vicinity of know RCW recruitment locations.
                RCWs roost and nest in excavated cavities of living pine trees which are arranged in small clusters, with one bird per cavity.  Thus they have a “home” cluster to which they return each night after spending the day foraging and that they fiercely defend from adjacent RCW families.  Their foraging efforts are most efficient if they utilize habitat within a specific radius of their home cluster.  The RCW foraging matrix is used to quantitatively score the habitat within such a radius of a cluster.  The analysis is based on the assumption that RCW families will primarily forage within this area.
Array of cluster locations and circular buffer with
overlaid land use data
(Photo Credit: USFWS)
Concentric rings of varying radii from an RCW cluster are analyzed for suitability.  Forestry and land use data (dominant tree type, stand density, extent of undergrowth, etc.) collected in the field can be overlaid to these circles and the total area of “good-quality foraging habitat” can be determined.  The matrix computes a score of suitable foraging habitat within each concentric ring, giving higher priority to those circles with smaller radii (i.e. closer to the cluster core) so that land managers may alter silviculture or fire practices to produce more and better foraging habitat.  Thus an adaptive management strategy is applied using the output scores of the matrix.  The parameters as to what qualifies as “good-quality foraging habitat” is constantly changing with new and better information from applied ecological research.
Currently, the foraging matrix is an application published and updated by USFWS for intra- and extra-agency usage.  GIS specialists at wildlife refuges or the like may use this application by simply providing the given input data.

The article linked here is a master’s thesis that evaluates several clusters using the RCW foraging matrix. http://search.proquest.com/docview/89111636/previewPDF?accountid=14787

Module 2: Geoprocessing

This weeks assignment involved becoming familiar with model builder in ArcMap and scripting in PythonWin.  We were required to build a model which automatically ran a series of sequential steps and produced a desired output.  The input features were a polygon feature class of different soils (soils.shp) in a particular region and a polygon feature delineating a specific area of interest (basin.shp).  The steps were to first clip the soils feature to the basins feature, then to select those soils not suitable for farming, and finally to delete those soils not suitable for farming, thus producing a feature class of areas within the basin that had soil suitable for farming.

Above is the output of my model, and below the steps I followed for model completion:

1.       Right-clicked on Mod2_PCoppola.tbx, then from the drop down menu selected New > Model.
2.       By dragging-and-dropping from the ArcCatalog window in ArcMap, I added basin.shp and soils.shp to the model builder window.  I added the Clip tool the same way, but from the ArcToolbox > Analysis > Extract window.
3.       Doubled-clicked on the Clip tool within model builder window and added soils (blue recycle symbol) as the input feature and basin (blue recycle symbol) at the clipping feature.  I named the output feature class soils_basin.shp.  Clicked Auto layout and zoom extent to better visualize the model.
4.      Dragged and dropped the Select tool into the model builder window.  Double-clicked it to set parameters: Input feature = soils_basin; SQL was set to FARMLNDCL = 'Not prime farmland'; the output feature class was soils_notprime.shp.
5.      Dragged and dropped the Erase tool into the model builder window.  Double-clicked it to set the parameters: Input feature = soils_basin; Erase features = soils_notprime; output feature class = soils_prime.shp.
6.      Clicked auto layout and zoom extent, then saved the model as name = SoilErase; label = Prime Farmland Locator.

7.      I set each input parameter to a “model parameters” by right-clicking them and checking Model Parameter.

Sunday, May 25, 2014

Week 2: Watershed Analysis


This week we focused on flow and watershed analysis.  While I was familiar the concepts behind these analyses (e.g. physics and geology), the process of running the appropriate procedures in ArcGIS was new.  We were given a Digital Elevation Model of Kuauai, HI and lead through the process of creating a stream network.  This involved: processing the raw DEM to fill any sinks, generating a Flow Direction Raster, Flow Accumulation Raster, and ultimately analyzing the output against the actual streams and watersheds as designated by the USGS.

Above is my comparison of a single watershed on Kuauai, the Lumahai River Watershed, to the USGS designated watershed boundaries and stream network.  This is a large watershed on the northern portion of the island, which at its terminus is a single river emptying into the Pacific Ocean, just west of the Hanalei Bay proper.  The two large maps compare the modeled Lumahai watershed and streams to the actual features, using a 200 cell threshold for the stream delineation.  The modeled watershed is significantly different in appearance near the northeast coast and the modeled stream system is relatively truncated compared to the actual stream system.  This is likely an affect of the threshold cell size, which could be decreased to better match the true stream network.

Thursday, May 22, 2014

Module 1: Introducing Python

This is the first week on GIS 5103, GIS Programming.  We began the course with a general overview of the Python scripting language and programs, as well as the course syllabus.  Above is an image of the module folders that will be utilized throughout the course.  These folders were created by running a Python script that automatically generates the folders in the correct filepath - just one of the many uses for Python scripting language.

The script used to create these folders was provided by the instructor and we were responsible to "Run" it.  This was done in PythonWin, a scripting program that uses Python scripting language.  I was able to run the script using the following steps:
1.       With my cursor highlighting the CreateModuleFolders.py window, I selected File > Run… [an alternative would have been to press ctrl+R]
2.       In the Run Script window, I left all fields as default and pressed OK.
3.       To check that the script ran properly I browsed through my S:\ drive and found the GISProgramming folder, checking that all the modules and embedded folders were present.

As a graduate student enrolled in the course, I was also required to read and summarized the article:

Schauble, Holger, Oswald Marinoni, Matthias Hinderer. 2008. A GIS-based method to calculate flow accumulation by considering dams and their specific operation time. Computers & Geosciences 34: 635-646. 

This article describes and encourages the use of a new method for calculating flow accumulation of water and sediment, specifically for use in scenarios involving bulk flow and multiple, sequential dams.  The method uses an expansions of a pre-existing algorithm (D8), but incorporates two important, but thus far neglected variables: trapping efficiency (TE) and specific operation time (top) of dams.  Trapping efficiency is the percentage of water or sediment that is bunged at a dam and specific operation time is the ratio of dam construction to dam observation time (or the time over which trap efficiency has been recorded).  These two variables are important because several large rivers have been dammed in multiple places over several years; thus current D8-based models are unable to adequately predict flow accumulation.

Thursday, May 1, 2014

Final Project: Bobwhite-Manatee Transmission Line Project

For our final project in 'Intro to GIS' we were put in the seat of GIS analyst asked to assess the completed Bobwhite-Manatee Transmission Line Project.  This was an actual project in which a new energy substation was being built, but needed a transmission line to connect with an existing energy center to the north.  The path chosen was based on meeting four objectives: 1) avoiding environmentally sensitive lands, 2) avoiding homes, 3) avoiding schools, 4) being cost efficient (i.e. not too long).  I assessed the proposed corridor based on how well it met those objectives.  Overall it sufficiently met them.  To see a detailed explanation on how I reached this conclusion, see my presentation at the bottom of this post.
Above is a map of the proposed corridor of the transmission line.  Below is a zoomed map of two environmentally sensitive areas.

Links to my Bobwhite-Manatee Project Presentation:

Have an awesome summer!

-PMC