Tuesday, May 17, 2016

Final Project

Goals and Background

The goal of this project is to use the geoprocessing skills I have acquired from tutorials and lectures to answer a spatial question of my choosing. The study area that is the focus of this project is Eau Claire County which is located in the state of Wisconsin. The question I have proposed for this project is where are suitable locations for deer ticks to survive within Eau Claire County, with restrictions to certain vegetation types and locations of forests. Deer ticks primarily thrive in wooded areas and areas of low-lying vegetation. This eliminates any areas that do not meet those criteria, including urban areas and along roads, where I have set a perimeter of 500 meters from any major road. The intended audience for this map is anyone who lives in Eau Claire County, this information could be used by the Wisconsin DNR and is important because deer ticks are the only known possible carriers of Lyme Disease and knowing the areas in which deer ticks can survive is helpful in preventing people from contracting Lyme Disease.

Methodology

I used data from a few different places. The first being the WI DNR dataset made available to me through the UW-Eau Claire Geography Department. The data I got from this dataset is the Eau Claire County outline, vegetation cover and county forest feature classes and the major roads feature class. The second place I obtained data from is the Geospatial Data Gateway through their website at http://datagateway.nrcs.usda.gov/GDOrder.apsx, from this website I obtained the urban areas feature class. The final source for my data came from accessing ArcGIS online. After a brief search for Wisconsin water bodies, I found a suitable layer that I clipped to fit to Eau Claire County. With my data being from multiple different sources a concern I have for my data is that not all of the data corresponds with each other in terms of accuracy in location. For example, the urban areas feature class may be in a different location if it were from the same dataset as the major roads feature class. In a way this reflects my concern with using data from multiple different sources.

To create the map for suitable deer tick habitats I started by connecting to the WIDNR2014 geodatabase. From this database I obtained the Wisconsin counties feature class, the Wisconsin major roads feature class, the Wisconsin county forests feature class and the Wisconsin original vegetation cover feature class. In order to be able to see the county boundaries beneath the other layers, I changed the transparency of the vegetation cover feature class to 50% for the time being. My area of interest was Eau Claire County, so I used the select by attributes tool to highlight Eau Claire, the query I used was COUNTY_NAM = ‘Eau Claire’, then I simply created a layer from the selected features and named it “Eau_Claire_Co”. I also needed to select the appropriate vegetation that deer ticks could live in; since deer ticks thrive primarily in wooded areas and low-lying vegetation, I needed to find areas where low-lying vegetation were in Eau Claire County. I searched Google to find information on the vegetation cover feature class I was using in my map and found the values that corresponded with low-lying vegetation to be scrub, prairie and brush. The values that represent these three vegetation types are 6, 12, and 13. So I again used the select by attributes tool to highlight these attributes. The query I used was VEG_TYPE = ‘6’ OR VEG_TYPE = ‘12’ OR VEG_TYPE = ‘13’. I also created a new layer from these selected features to use as the vegetation cover on my map and named it “DeerTickVeg”.

With my study area being Eau Claire County, it was obvious I needed to narrow down each feature class I was using so that each was contained within the borders of the Eau Claire County feature class. The first few feature classes I clipped were the major road feature class, the DeerTickVeg feature class, and the county forest feature class. Now I had all my feature classes contained within my area of interest, but I figured I needed more for this project than I had. So I downloaded data from Geospatial Data Gateway at their website http://datagateway.nrcs.usda.gov/GDGOrder.aspx, selected my state as Wisconsin and the county as Eau Claire county, and found that the Urban Areas of Wisconsin dataset was something that could be included in my map. I then downloaded the data and added the urban areas feature class to my map. However, the urban areas feature class was not specific to Eau Claire county, so I used the clip tool again to make it specific to only Eau Claire county. I also added data from ArcGIS online. This data was the Topper_Wisconsin_Water_bodies_Service layer and I added it to my map and clipped it to Eau Claire county to get the water bodies that are contained in my study area.

Deer ticks can live in both wooded areas and areas of low-lying vegetation. This meant that I needed to combine the DeerTickVeg feature class and the county forests feature class, and to do so I used the union tool in order to keep all features of both feature classes, not just what was common to both. I named the new feature “deertick_forestveg”. Also, in order to get rid of any boundaries within the feature class, I used the dissolve tool to make it one complete, smooth feature. This indicates on my map that deer ticks can survive in either wooded areas or areas of low-lying vegetation. Next I used the clip tool on the major roads feature class to get major roads contained in the deertick_forestveg feature class. I did this because the roads within the deertick_forestveg feature class represent an unsuitable area for any deer tick habitat. I named the new feature class “deertick_majroads”, then used the buffer tool and gave it a boundary of 500 meters and named the feature class that came from the tool “DT_MRbuff”. Then to get rid of any unwanted boundaries within the buffered feature class I used the dissolve tool and named the feature class that came from it “DT_MRdissolve”. The feature class had buffers that extended outside the Eau Claire county border so to get rid of those I clipped the DT_MRdissolve feature class and named the new feature class “DT_MRclip”. Then I intersected this feature class with the deertick_forestveg feature class. The final step in completing my map was to eliminate any unsuitable areas from the urban area in Eau Claire county. This involved the using the erase tool to get rid of any parts of the DT_MRclip feature class that were contained in the urban areas feature class, and the dissolve tool to get rid of any unwanted boundaries.

One extra step I took in creating a map of potential deer tick habitats was projecting the map in a projection I deemed appropriate for my study area. Eau Claire county is within the central zone of the state of Wisconsin, so the projection I chose for my map was NAD_1983_StatePlane_ Wisconsin_Central_FIPS_4802 and I applied this projection to each layer that was on my map.
Figure 1: Final Map

Figure 2: Work Flow Model

Results

The results of all of the data and tools used to complete my project is a map that shows potential areas suitable for deer tick habitat shown in green, areas that are not suited for deer tick to survive along the major roads in Eau Claire county, shown in orange and urban areas in Eau Claire county that would also be unsuitable for deer tick habitat shown in a salmon pink color. Streams, shown in blue lines on the map as well as Eau Claire county, shown in a light tan color serve as a backdrop to the features on the map. In layout view I created two other data frames to go along with the one containing my finished map (Figure 1). The second data frame contains a locator map that shows where my study area is located in the state of Wisconsin (Figure 3). The third data frame contains the data flow model I generated in ArcMap that shows the steps I took to complete my project. (Figure 2). The final product with all the data frames combined is shown in Figure 4 below.

Figure 3: Locator Map

Figure 4: Final Map Layout




Thursday, May 12, 2016

GIS Lab 5

Lab 5 Technical Report
Goals and Background:
The goal of this lab is to enable me to select and apply geoprocessing tools discussed in lecture and practiced in tutorials in order to find suitable bear habitats in a study area in Marquette County, Michigan. This lab will also be an introduction to using geoprocessing tools through python scripting

Methodology:
Part One
Objective One:

To begin, I downloaded the data for Lab 5 from my instructor and extracted the zipped files into my lab 5 folder. The data was provided by the Michigan Department of Natural Resources and Esri. In a blank map on ArcGIS I set my workspaces to my lab 5 folder as should be done in starting any new project and connected to my lab 5 folder in the catalog window. Under part one of my lab 5 data I expanded the bear_locations_geo.xls excel file and found the bear_locations_geo$ sheet. In the next step I was to create a feature class from this sheet, to do so I right-clicked on the bear_locations_geo$ sheet and chose "create a feature class from XY table". This opened up a new window in which I set the X field to "POINT_X" and the Y field to "POINT_Y". The new feature class would need to be set to the same coordinate system as the rest of the data in the Marquette geodatabase that came with the dataset. To set my new feature class to the correct coordinate system I first clicked on the button underneath the Z field, "Coordinate System of Input Coordinates". This opened up a new window where I chose the import option under the "add coordinate system" drop-down menu. From there I navigated to the Marquette geodatabase and chose any one of the feature classes contained to import its coordinate system. The last step was to save the new feature class as a shapefile to the Marquette geodatabase under the name "bear_locations".

Objective Two:
To start objective two I needed to add all of the feature classes from the "bear_management_area" feature dataset, including the bear_locations feature class. Then I needed to create a map showing the minor type field of the landcover feature class. In order to create this map I needed to change the symbology of the landcover feature class. I right-clicked on the landcover layer in the Table of Contents and chose "Properties", clicked on the "symbology" tab and chose "Unique values" under the categories section. Next I set the value field to "MINOR_TYPE", added all values, and chose an appropriate color ramp for the map, then clicked OK. Next I intersected the bear_locations feature class with the landcover feature class. This created a new feature class named "bear_cover". Finally I opened the Select By Attributes Table and found the top three habitat types in which bears could be found by selecting the layer as "bear_cover", and using the "MINOR_TYPE" field to get its unique values to find the top three habitats.
Selection of the top 3 Bear Habitats





Unique values map of the MINOR_TYPE field in the landcover data set.
Objective Three:
This section of part one involved finding the number of bears within 500 meters of a stream. To find the correct number of bears I used the buffer tool. Under the Geoprocessing menu in the toolbar, I chose the Buffer option. The Buffer window opened and I chose "streams" as the input feature and saved the output feature class in my lab 5 folder as "bearstreambuffer". Since objective three asked for the number of bears within 500 meters of a stream, the Distance value needed to be set to 500 meters. Everything else was left as its default and I clicked OK to create the new feature class. Then to clean up any overlapping boundaries between the buffers, I used the Dissolve tool which is located in the same place as the Buffer tool. Once the Dissolve tool opened I chose the input feature class as my "bearstreambuffer" feature class and saved it to my lab 5 folder. I left everything else alone and clicked OK to start the dissolve.





Objective 4:
Objective 4 asked to find suitable areas for bear habitats based on the two criteria of my choice, in this case being the dissolved bearstreambuffer feature class that showed the number of bears within 500 meters of a stream, and the top three habitats that I found in Objective Two from the MINOR_TYPE field. To isolate the top three habitats from the rest, I used the select by attributes table to create a query that highlighted the three desired habitats in the landcover feature class. From there I created a new layer from the selected features by right-clicking the landcover feature class in the Table of Contents and under the selection tab, choosing the "create layer from selected features" option. This created a new feature class that I named "suitable_habitats". The next step was to combine the two criteria and therefore their feature classes. To do so I used the intersect

tool, set the input features to "suitable_habitats" and "bearstreambuffer_Dissolve", saved the new feature class to my lab 5 folder and clicked Ok to perform the intersect. I named the created feature class "bear_habitats". Finally, to eliminate any boundaries within the bear_habitats feature class, I used the dissolve tool and created a new feature class "bearhabitats_final".



Objective 5:
The task for Objective 5 was to locate all suitable bear habitats within DNR management land. First I added the "dnr_mgmt." feature class from the Marquette geodatabase. From there, the task took only two steps, the first being to intersect the dnr_mgmt. feature class with the bearhabitats_final feature class. This gave me a new feature class that I named "dnr_bearhabitats" and saved it in my lab 5 folder. The final step was to dissolve the boundaries within the new feature class, and that was simply opening the dissolve tool and selecting the dnr_bearhabitats feature class as the input feature. A new feature class was created and saved to my lab 5 folder and I named it "dnr_bearfinal".
Dissolve tool to create the 'dnr_bearfinal' feature class



Objective 6:
Objective 6 is a second part to objective 5. for this objective I needed to exclude all areas for bear habitats that are within 5 kilometers of Urban or Built Up land. I began by finding where any Urban and Built Up land was by using the select by attributes tool and the 'Major Type' field in the landcover data set. After highlighting all of the Urban and Built up land on the map, I created a new layer from the selected features and used the buffer tool on the new feature class to create a buffer that was 5 kilometers. Finally I used the erase tool on the new buffered feature class to get the final version of the bear habitat in the study area.
Buffer tool to with distance set to 5 kilometers




Erase tool that created the final bear habitat feature class.
Objective 7:
To complete part one of my Lab 5 assignment I had to create a cartographically pleasing map displaying my final product. This map needed to include the locations of the bears, streams, the suitable habitat I created for the bears, the results from objective 6, a legend, a locator map that showed where in Marquette County the study was done and a workflow model that shows the steps used to create the final product. To start off I needed to create the map in an 11X17 frame. Then I added two other data frames for the locator map and for the workflow model. The only data frame that was filled at the time was the first data frame with my finished map. To add in the legend I went to the insert tab at the top of the page and chose the legend option from the dropdown menu. I selected the appropriate items to include and made sure to change the name of each item to an appropriate title. I then added the locator map and that was simply adding the Marquette County shapefile to one of the empty dataframes and then adding the study area shapefile over it in a different color. The next part was generating the workflow model for the third data frame. To do this I changed from layout view to data view so I could make any necessary changes without affecting the layout of my map. I clicked on the Model Builder button on the main toolbar and this opened a new window for me to start building my model. Before I began building however, I saved the model to my lab 5 folder in a new toolbox by clicking on the New Toolbox button in the Save window. I named my model and saved it in that toolbox. In the blank Model Builder window I first added a new feature layer by choosing ArcToolbox, Data Management Tools, Layer and Table Views, and Make a Feature Layer then dragging the Make a Feature Layer tool into the empty window. I set the input feature as landcover and the output feature as Top 3 Bear Habitats. I then added the Buffer tool by doing the same process with the previous tool, by dragging the buffer tool from Arctoolbox into the Model Builder window. I set the input feature to Streams and the output feature as Streams Buffer. Then from the Streams Buffer feature I added a new feature layer and named the output Bears Near a Stream. Next I added the intersect tool and set the input features to Top 3 Bear Habitats and Bears Near a Stream, and the output feature was named Bear Habitats. Finally I used the Dissolve tool, with Bear Habitats as my input and Bear Habitats (2) as my final output.  
Work flow model created for Lab 5

Results: The final result of all of the objectives is a map of a study area in Marquette County that shows bear locations, bear habitats, DNR management areas and streams. The map also features a legend with the symbols of these features displayed, a locator map of where this study area was in Marquette County and finally, the map shows the workflow model I created symbolizing the steps put into creating the final bear habitat feature class.

Final product of Lab 5 part one.
Part Two

Modeling air pollution impact zones
This section created a scenario in which I needed to develop an index model that will show zones of potential air quality problems at a one mile interval in the state of Wisconsin. To do so I needed to use python scripting. To start, I launched the python window by clicking the python window button in the main toolbar. This opened a small window that would later contain the code needed to create the correct map for this scenario. The beginning of the code starts with importing python for ArcGIS and that is done by typing "import arcpy" into the python window. Pressing enter starts another line of code, which will be used in the creation of the map. In this part of the code I called the multiple ring buffer tool from ArcGIS by entering "arcpy.MultipleRingBuffer_analysis". The next part of the code was adding in the input feature. I entered the input feature as "Interstates" followed by a comma. Next was to name my output feature that would result from using the multiple ring buffer tool on the input feature. In the same parentheses as the input feature I named the output feature "Inter_mul_Buff_RL" followed by a comma. Next I needed to enter the intervals for the distance units. Since the scenario called for 6 zones to be created, numbers 1 through 6 needed to be entered. Still in the same parentheses as the other two parts of the code, I entered [1,2,3,4,5,6,] as the intervals followed by a comma. After, I specified the distance unit and entered it as "Miles", followed by a comma, a pair of quotation marks and another comma as the optional parameters that take on a default value. Finally to finish the code I called the dissolve ALL function by entering "ALL" as the final part of the code and closed it off with the ending parenthesis. I then checked for any errors in the code by pressing F2, found that there were no errors and pressed enter to run the code. Lastly I created a map of the results with Wisconsin counties and cities as a backdrop and the interstate results as the main part of the map.

Results:
The results of this scenario is a model of six zones of potential air quality problems along interstates in Wisconsin. I used python scripting to call geoprocessing tools and features that created a cartographically pleasing map of the scenario required. Both the script for the scenario and the results of the script are shown below.




Python script code for creating the scenario
Final result is the state of Wisconsin, with its counties, cities and interstates, along with the zones of potential air quality problems along those interstates.