Wednesday, November 30, 2016

Open Sourced - From Analysis to Communication in the Age of Web Mapping - Analyze Week 2

Special Topics - Project 4 Week 3

 I downloaded the 2010 census shapefile from FGDL, and used the Florida Counties shapefile from Prepare Week to create my county shape to clip the census shapefile to, and then created my study area and centroid shapefiles from that within QGIS.  I then used Google Earth to identify grocery stores within that study area and created a KLM file from that search and opened that in ArcMap and saved the results to a shapefile, then added my centroid shapefile.  With these two layers I then ran the Analyst tool Near to locate those stores within 1 mile of the census tract centroids and add that data to the centroid attribute table.

With the centroid layer modified in ArcMap I opened the database file in Excel and saved it as a .csv file then went back into QGIS and added the table as a Delimited Text Layer and joined it to the Study Area layer.  This added those new distance fields to the Study area layer.  From this field I was able to select those records in my Study Area that did not have a store within a 1 mile radius of the tract centroid and create a Food Desert shapefile from that.  Reversing the selection I then created a Food Oasis shapefile from the rest.

Moving on to MapBox I uploaded my zipped Food Desert and Grocery Store shapefiles to new Tilesets, then created a basemap from the basic style, changed a few elements, then added the tilesets to the basemap.  After that I added the Study Area to ArcMap and investigated the results of different classes and classification methods and finally settled on Jenks Natural Breaks with 4 classes as the most reasonable distribution, then switched to Colorbrewer for the HEX and RGB color codes for the color scheme I wanted to use.  Back in MapBox I created a Group for the food desert layer and made three duplicates of the layer to represent the four classes, then added filters and changed colors so each layer would represent the correct class.

The last step was to create a webmap in Leaflet.  To do this I copied the text file from Analyze Week 1 and made the adjustments in the text file that were appropriate for the differences between maps.  Basically, all the things that needed to be added or adjusted for Analyze Week 1 also needed to be adjusted for Analyze Week 2. With that done I save the text file as a HTML on my I drive.  This is the link for it:  http://students.uwf.edu/mr80/STGIS/OkDesert.html

The Study Area encompasses the Greater Fort Walton Beach area in South Okaloosa County, Florida, including the surrounding rural area.  Within this area are 10 grocery stores that service most of the urban area, but not all, and there is not one grocery store within the rural area.

Fort Walton Beach is not my home town but I am pretty familiar with it and was actually surprised to see so little of it falls within a food desert.  I didn’t realize there were so many grocery stores within town.  I was also surprised to discover there were no grocery stores at all within the rural area outside of town.  I would have expected there to be at least one. 

Friday, November 25, 2016

Open Sourced - From Analysis to Communication in the Age of Web Mapping - Analyze Week 1

Special Topics - Project 4 Week 2

Analyze Week 1 introduced us to Mapbox, Leaflet and web mapping.  Using the data we created last week in QGIS, this week we uploaded our food desert and grocery store shapefiles to Mapbox, then symbolized it.  This was a little more complicated than in ArcMap.  In Mapbox, first copies needed to be made of the food desert layer for every class we had, then the class and color needed to be assigned to each layer.  There were a few ways this data could be derived.  I chose to use ArcMap and experiment a bit with the classes in the layer symbology window until I felt I had a reasonable distribution of the classes, then I made a note of those ranges.  Then I went back to Mapbox and added that many layers.  Next I went to the Color Brewer and selected the color scheme I liked best and specified the number of classes.  I made note of the HEX and RGB codes for those colors.  Back in Mapbox I started with the lowest copy of the food desert layer and in the Select data window associated that layer with the lowest range of data based on the POP2000 field of the attribute table for all the layers, then went back through all the layers and in the Style window used the RGB codes noted from the Color Brewer to assign the correct symbol color to each of the layers.

Next we moved to Leaflet to create a web map to be hosted on our UWF I Drive.  We started with the source of the Leaflet map as a base template, then adjusted the code to meet our requirements.  This included changing the location of the style sheet and script files, changing the center point so the map would open centered on Pensacola, FL, editing pop-ups, polygons and circles, adding a legend and a geocoder to make the map searchable.  Adding the legend required us to add a long section of code that was provided, then changing the population ranges and the HEX codes we had noted earlier.  I also adjusted the size of the map view and scale so almost my whole study area would show when the map opened.  This file was then saved to the I Drive as an html file.

It was an interesting assignment, but a lot of new stuff to deal with for a final project.  Here is the link to the web map:

Monday, November 21, 2016

GIS Day Around the Kitchen Table

GIS Internship - Week 13

This year on GIS Day I was in New Mexico visiting my daughter so I decided to make my GIS day an opportunity to share GIS with her.  My daughter is a park ranger and has been looking for openings at parks on the east coast, preferably in Virginia because she'd like to go back to school and get her Masters in History, focusing on Constitutional History.  One of the things she has said over and over is that she'd like to be close enough to make trips up to DC so she can go to the Library of Congress to do research. So of course the very first thing I did was share a fellow classmate's post about her GIS Day visit to the Library of Congress.  My daughter was very jealous and very impressed.  She was also surprised to hear they had material from the medieval age since that preceded not only the founding of this country, but also its discovery. So she is very anxious now to discover what that material is and why it was included in the library's collection.
Once I got her to quit drooling over the library I showed her the Residential Location Study I did for my final project for Applications in GIS.  She got a kick out of seeing I had done it for a mother and daughter moving to St. Augustine, a place I've told her many times I'd like to go visit with her, and the mother would be working at the county GIS office and the daughter as a park ranger at Castillo de San Marcos National Monument.  I summarized the process of creating the location study and we talked about the different criteria we could use to help her chose a location to start looking for houses once she finds a job back east.
Last we used google maps to plan her drive from New Mexico to Florida, selecting good stopping points along the way and investigating the hotels in those areas where she can spend the night with her two furry babies when she drives out to spend Christmas with me.
We had a good time and several giggles, and she said she thought she understood much better now what I've been studying, but it really wasn't anything to take pictures of.

Thursday, November 17, 2016

Open Sourced - From Analysis to Communication in the Age of Web Mapping - Prepare Week

Topics - Project 4 Week 1


The first week of our final project was spent learning Quantum GIS (QGIS) and about Food Deserts.  Part A taught how to use QGIS by adding layers, setting a coordinate reference system, clipping layers, and grouping layers in the main window.  Grouping the layers allows for multiple frames in the Print Composer, QGIS' Layout View.  Just as in ArcMap's Layout View, Print Composer is where map elements, such as legends, scale bars, etc., are added.  Unlike ArcMap, the data frames in QGIS must be locked if they are not being manipulated or what is done in one frame will affect what is in another.  This was less of a problem in Part A than it was in Part B.

In Part B the layers were grouped by the results of our analyses.  Using the census tracts of Escambia County a study area was created, then created centroids for those polygons.  Using the Join tool in the
Study Area layer a join with the Near.csv file was performed to add the NEAR_DIST field from that table to the Study area attribute table.  From this field we were able to create selection sets for those census groups that were within and those that were without Food Deserts.  Statistics were done on each of these layers to determine the percent of the population that fell into each category.  With the statistics done the layers were duplicated where necessary and grouped for their different data frames.  In this second map there were more layers to contend with and forgetting to turn layers on and off  in the main window and lock and unlock the data frames in the Print Composer window resulted in a lot of repetitive steps.  But in the end it all came out right.  Except I still haven't figured out how to put a neatline around the entire map.

Monday, November 7, 2016

Supervised Classification

Photo Interpretation and Remote Sensing - Mod 10

This week we created a land use map of Germantown, Maryland using Supervised Classification tools in Erdas.  Training sites were created using a combination of polygons and the Growing Properties tool.  With these tools, features were selected and defined so an algorithm would know what class to assign to each pixel.  We started by defining 14 classes, then merged them down to 8 using the Recode tool.    Once that was done a Class Name column was added and the classes renamed, then an area column was added to the attribute table to calculate the area covered by each class.  To finish the map off it was added to ArcMap and symbolized appropriately.  

Saturday, November 5, 2016

Statistical Analysis with GIS - Analyze Week

Special Topics - Project 3 Weeks 2 & 3

For the analyze portion of this project we ran numerous iterations of the Ordinary Least Squares (OLS) regression starting with 29 independent variables and removing one with each iteration.  To
determine which variable to remove the first three of six checks were performed in combination.  Each variable was tested for Probability, Value Inflation Factor (VIF), Coefficient, and Importance.  If the answer to all these questions were "No" the OLS was repeated with that variable removed.  If just one question returned a "Yes" the variable remained.  This process was to be repeated until either all the variable that failed the test were removed or the Adjusted R-Squared value was as high as it could get.  The Adjusted R-Squared value was expected to come in between 0.0-1.0, but during this process mine seldom came close.

Once all the variables were removed the next step was to check the Jarque-Bera Statistic score to check for bias.  If the p-value was less than 0.05 and has an asterisk next to it the model is biased.  To analyze the data to find the skewed results a Scatterplot Matrix graph was created.  This graph also included a histogram of each variable provided a second way to view the data.  For each variable that was skewed the OLS was run again with that variable removed and the Jarque-Bera score checked for improvement.

Check 5 was the first time we viewed the map for results.  A part of the OLS process is the creation of a layer of Standard Residual values.  The Standard Residual categorized the residual values making them comparable between different models.  The residual is the difference between the density of meth labs the model predicted would be in a census tract and the density that actually exists.

Check 6 was to see how well the model was predicting the dependent variable.  It seemed okay to me.