Friday, November 20, 2015

Exercise 7: Network Analysis

Goals and Objectives
During this lab I practiced preforming a Network Analysis, using frac sand transportation as the network. Within this exercise, I will determine routes from a mine to its nearest railroad terminal, as well as calculated the total cost each county will incur based on the amount of sand truck traffic on the local roads. This lab was broken down into two parts. In Part 1, I was required to run Pyscript to create my features for my geodatabase. In Part 2, I used these previous outputs to preform my network analysis, which I documented in model build.

*It is important to note the data values, such as the amount of trips or the costs per mile traveled, analysis within this lab are hypothetic values created by our professors. The dataset used during this is created by Esri (street map USA).

Methods
After run Pyscripter, I had a collection of output. I began by bringing theses into my map document in ArcMap. One of these was a feature class of mines, within Wisconsin, that are more than 1.5 km away from a rail terminal. Another is a feature class of rail terminals within Wisconsin that are capable of loading sand. After these classes were added, I turn on the Network Anlysis toolbar, which allowed me to begin creating a new closest facility layer. This required me to designate my terminals feature class as the facility (destination) and my mines feature class as the incident (source). From here I solved to find the closest facilities to each mine.

Next, I began using Model builder. The first item I added was the Closest Facility layer, and the Esri streets layer became the input. From here I added Add Location tool. This allowed me to specify my mines feature class as incidents. Next, I added an Add Location tool again, however this time I specified my rail terminal feature class as the facilities. From there, I added the Solve tool, which generated the closest facility routes. Next, I added the Select Data tool, which allows me to select the new closest facility routes that I just created. Next, by adding the Copy Features tool, I was able to make these selected features into a new feature class, which I named Routes.

From here I began to calculate the statistics of the model. The first goal was to calculate the total road length for the routes by county. The second goal was to calculate the costs each county should expect to have based on the hypothetic costs that every mile driven on a country road by a sand truck driver costs the county 2.2 cents. To approach these, I began with the first task. I ran the Project tool to project the output into WGS UTM Zone 15N. From there I located the WDNR county boundaries of Eau Claire, and projected  this feature class into the same coordinate system. Next, I added the Intersect tool, which overlaps the Route and Countybundaries. From here, I ran the Summary Statistic to get a sum of the Routes shape length per county, as well as how many trips were taken on each route. Now I had a table with a "Sum_Shape_Length" which represented the total road length per county, however it was in meter. To convert this to miles, I added the Add Field tool, and named this field totaldistance_meters. To calculate what would go into this new field, I added a Calculate Field tool, and added the equation [Sum_Shape_Length] * 0.00062137. This number is the conversion factor of meters to miles.

To approach the second goal, I added a Add Field tool, to create a field called cnty_cost. This field represents the total cost incurred by each county. I then added a Calculate Field tool to specify the equation used to calculate the values for this field. The equation I used here was 100 * [totaldistance_meters] * 0.022. I used this equation because each mine is visited 50 time per year, however the trucks make a return trip as well, meaning each route will be driven 100 times per year. Therefore this number would then be times by 2.2 cents to determine each counties total cost.

Figure 1: Process ran in Modelbuilder
 
Results



Figure 2: This map displays location of mines, rail terminals, and sand truck routes from mines to the close rail terminal.  Additionally, counties that contain a sand truck route are display with an estimated annual cost incurred at a rate of $0.022 per miles traveled by sand truck.


Figure 3: This graph represents the amount of money each county will incur within a year. These counties all have sand truck routes running through them.

Discussion
Referring to Figure 3, the top three counties incurring the highest costs are Chippewa County, Dunn County, and Wood County. These top three counties are represented at the darkest green counties within Figure 2. These counties, along with the other countries that experience sand mine traffic should be aware of the potential impacts associated with the increased traffic. It is possible drive time, road maintenance, traffic incidences, and noise pollution may increase within these areas. Prevention for these may need to be discussed amongst the county. Additionally, funding for these yearly costs should be discussed as well.

Conclusion
In this lab I practiced running a transportation Network Analysis. I used this tool to narrow down the Closest Facility route from mines to terminals. This output allowed me to extend to analysis to a cost analysis. To run a cost analysis, I was required to build a model in Modelbuilder. This allowed me document my process. With the outputs of this models, I created a map to display the trends in the date. Furthermore, I displayed the cost analysis in a graph. Both of these from of displaying data are helpful to determine which counties are experiencing highest maintenance costs.

Sunday, November 8, 2015

Exercise 6: Geocoding Addresses

Goals and objectives
During this assignment I practiced geocoding addresses gathered by my professor from the WDNR. I was personally given 21 sand mine addresses. During this lab, I practiced the steps that are typically taking when geocoding addresses. For example, I was required to normalize my data table of addresses, geocode them using ArcMap, and assessed the error between my geocoded addresses, my classmates geocoded address, and the addresses actual location. The precise methods, and results of my lab are documented below.

Methods
I began this lab by locating a document of sand mine addresses produced my the DNR. Of these, I was designated 21 of the address. In order to geocode the addresses, I was required created a normalized excel data table (Figure 1). I created new columns for the following information: Unique Mine ID, PLSS code, Street Address, City, State, Zip Code, and any additional addresses. This process creates a standard for how the data is entered and organized.

After my table was normalized, I imported it into ArcMap. From here I turned on the geocoding tool. With the geocoding tool, I used two different methods to locate my addresses.

If an address was provided in the table, the geocoding tool located the correct location based on the address, city, state, and zip code provided. I verified these locations using the ERSI base imagery and Google maps imagery. Majority of this points were initial accurate, however a few required minor adjustments to place the address point at the entrance along the main road.

If an address was not provided in the table, I was required to locate the address point myself. When this occurred, I used the PLSS code to locate the address. The geocoding tool automatically defaulted these points to be located at the city's center, which was a highly inaccurate location. The PLSS is a four number code that signifies the Quarter Plot, Section, Township, and Region of the address, respectively. To find the location, I brought in each of these data layers from the WDNR database. The code is read from right to left, therefore I first located the Region of the code, followed by the Township, Section, and Quarter Plot. After I narrowed the address to the Quarter plot section, similar to the other method, I placed the address point at the entrance along the main road.

Once I plotted all addresses, I located my classmates' geocoded addresses and brought the shapefiles into my ArcMap document. From here I merged all of my classmates' shapefiles together. The output resulted in a feature class that contained all of their geocoded mines. From here, I ran the Near Proximity ArcTool to find the distance between my geocoded addresses and the my classmates geocoded addresses that shared the same Unique_ Mine_ID, therefore being the same mine. This output table result can be seen in Figure 2. This Near Proximity ArcTool method was repeated for the actual location of the address points, provided by the WDNR. Once again I compared my address locations with WDNR's geocoded addresses that shared the same Unique_ Mine_ID. This output table result can be seen in Figure 3.

Results

Below are my outputs and tables created throughout the lab.

Figure 1: My final normalized table including 21 sand mine addresses provided by the DNR


Figure 2: This is the Near Proximity ArcTool output, displaying the distance between my geocoded mines and my classmates' geocoded mines of the same Mine_Unique ID. This was ran to assess error between to two points, based on their distance apart.

Figure 3: This is the Near Proximity ArcTool output, displaying the distance between my geocoded mines and WDNR actual location of mines with the same Mine_Unique ID. This was ran to assess error between to two points, based on their distance apart.

Figure 4: Below is my map displaying my geocoded addresses, their actual locations, and my classmates geocoded mines. These points represent the location of 21 mines within Wisconsin.

Discussion
There are several types of errors that can occur during geocoding. According to Lo Chapter 4, there are three sources where errors may originate. These are from the original map, during data automation, or during the data processing and analysis stage. Within these, errors my begin at the earliest stage of setting your map projection and scale, or during image selection. However, the possibly of accruing errors continues during processes such as attribute input. Additionally, errors can arise while interpolation the data, during data classification, or but incorrectly rounding number values. The complete list of errors discussed by Lo can be seen below in figure 5.

Figure 5: Lo chapter 4 table that lists errors that may arise while analyzing geographic data.
Knowing there are an abundance of errors that may arise throughout the geocoding process makes it difficult to determine which of your geocoded points are actuate or not. In this lab, we practiced ways of eliminating error and assessing error while geocoding. For example, data that is normalized before it is geocoded should theoretically be more accurate than if than data that is not initially normalized because it would lacked an initial process of standardization that causes data format errors. Another way to increase a data point's accuracy is to compare the geocoded locations in ArcMap with their location through other sources such as Google maps. For example in our lab, mines that were visible in Google maps were most likely geocoded more accurately than mines that weren't visible because their address was able to be reaffirmed.  However, even using Google Maps to located the mine, it is possible the geocoded location are still inaccurate. In order to compare which points are most accurate, an error assessment can be ran. In this lab, it was used to compare distances between my personal geocoded addresses and the same address geocoded by a creditable source, such as the DNR. For example, as seen in figure 3, the Near Point Tool will show which points had the smallest distances to the DNR's location. In this case, the smaller distances to the DNR's mine suggests a smaller error margin exists, and therefore we assume these points are more accurate.

Conclusion 
This lab shows there is a great chance that error and variation will occur between the Ersi Geocoding tool users. This is due to the fact that errors mar arise through out the geocoding process, such as during data entry, placement of address point, or during error analysis. Also, it is likely the users are basing the address locations on entities that are subject to change, such as roads and entrances since within images. Setting data entry and overall geocoding standizations will help to minimize this error rate.