jenningsplanet.files.wordpress.com€¦  · Web viewOne of these datasets contains all of the...

6
Michael Dobyns W1459582 GEOG 385 (FALL 2014) FINAL PROJECT PAPER “Farmers Market Web Application” Project Summary: For my final project, I created a web application which consists of a map service, along with a geoprocessing service. The focus of the web application is on the farmers markets of the Sacramento region. The goal of the project was to create a web application that would allow the user to access information about the local markets and to find a market near them. I was also interested in displaying the census tracts in the region which are designated as “Food Deserts” by the USDA. The services utilize several operational data layers stored in Dobyns_Project.gdb. The primary data layer being utilized is a geodatabase feature class named Farmers_Markets (point). To assist with the users search, I included a geoprocessing service which allows the user to search for farmers markets by neighborhood name. This is accomplished through the use of a geoprocessing model which selects points from the Farmers_Markets feature class which are inside of the selected neighborhood in the Sacramento_Neigh feature class (polygon). The map and geoprocessing services were included in a web application which I built in ArcGIS Viewer for Flex. Within the Flex builder I was able to add additional functionality, allowing the user to further utilize the data. I was also able to change the style and other elements of the web application for a better user experience. Overall, the web application is successful in both its operation and in fulfilling the goal of the project. As a result of this project I am now more confident about web application development methods and best practices. Purpose: Sacramento is known as the “farm to fork” capital of California and we have a large number of farmers markets in the region. However sometimes, it can be hard to find one because they are spread out all over the area, they’ve all got different days/hours they are open, some are only open seasonally, and to top it off they are run by many different groups! So I decided to create a web application where the user could go to find up to date information on all of the markets in the area.

Transcript of jenningsplanet.files.wordpress.com€¦  · Web viewOne of these datasets contains all of the...

Page 1: jenningsplanet.files.wordpress.com€¦  · Web viewOne of these datasets contains all of the tracts in the US which are classified by the USDA as food deserts. “USDA, Treasury

Michael DobynsW1459582

GEOG 385 (FALL 2014)FINAL PROJECT PAPER

“Farmers Market Web Application”

Project Summary:For my final project, I created a web application which consists of a map service, along with a geoprocessing service. The focus of the web application is on the farmers markets of the Sacramento region. The goal of the project was to create a web application that would allow the user to access information about the local markets and to find a market near them. I was also interested in displaying the census tracts in the region which are designated as “Food Deserts” by the USDA. The services utilize several operational data layers stored in Dobyns_Project.gdb. The primary data layer being utilized is a geodatabase feature class named Farmers_Markets (point). To assist with the users search, I included a geoprocessing service which allows the user to search for farmers markets by neighborhood name. This is accomplished through the use of a geoprocessing model which selects points from the Farmers_Markets feature class which are inside of the selected neighborhood in the Sacramento_Neigh feature class (polygon). The map and geoprocessing services were included in a web application which I built in ArcGIS Viewer for Flex. Within the Flex builder I was able to add additional functionality, allowing the user to further utilize the data. I was also able to change the style and other elements of the web application for a better user experience. Overall, the web application is successful in both its operation and in fulfilling the goal of the project. As a result of this project I am now more confident about web application development methods and best practices.

Purpose:Sacramento is known as the “farm to fork” capital of California and we have a large number of farmers markets in the region. However sometimes, it can be hard to find one because they are spread out all over the area, they’ve all got different days/hours they are open, some are only open seasonally, and to top it off they are run by many different groups! So I decided to create a web application where the user could go to find up to date information on all of the markets in the area.

I am also interested in the subject of food access and how the farmers markets in the region could help increase access to those in need. The USDA has produced some wonderful datasets which address the subject of food access at the census tract level (ERS, 2014). One of these datasets contains all of the tracts in the US which are classified by the USDA as food deserts. “USDA, Treasury and HHS have defined a food desert as a census tract with a substantial share of residents who live in low-income areas that have low levels of access to a grocery store or healthy, affordable food retail outlet (AMS, 2014).” The dataset contains relevant social and economic indicator data for the selected census tracts. For the web application, I initially wanted to come up with some way of performing an analysis which would quantify the impact of the local markets on a food desert tract. My idea was that the web application could be used a tool for someone who wanted to establish a new market in the region by showing them the area of greatest need/impact.

Data and Application Development (including issues encountered):The most time consuming process of the data development stage of this project was the creation of the Farmers_Markets feature class. This is a custom dataset which I created. The USDA “National Farmers

Page 2: jenningsplanet.files.wordpress.com€¦  · Web viewOne of these datasets contains all of the tracts in the US which are classified by the USDA as food deserts. “USDA, Treasury

Market Directory” is the best resource available for a national or statewide dataset of farmers market locations, and at first glance it appeared to be fairly detailed and complete (AMS, 2014). However, when it was examined on a local level, it was found to have many inaccurate entries. Issues with the dataset included incorrect coordinates and out of date or missing attribute data. It became apparent that it would be necessary to create a local Sacramento dataset from scratch. To create this dataset a web search was performed to find all farmers markets in the area. Relevant attributes were recorded in a spreadsheet. Locations were then input in Google Earth and a series of place points created. These points were exported from Google Earth as a KMZ file and then converted to a geodatabase feature class format using XTools Pro; Import from KML tool. Once in ArcMap, the points were joined with the attribute data collected in during the web search.

Once the Farmer_Market feature class was built, the collection of the remaining data was fairly straightforward. I acquired shapefiles for the light-rail (and stops) from Sacramento County’s website. I also downloaded city and town boundaries (CENSUS_DESIGNATED_PLACES.shp) from Cal-Atlas, and the Sacramento City neighborhoods (neigh_hd.shp) from the City of Sacramento’s website. These were essentially the only active data layers utilized in the web application. For the Basemap I utilized the ArcGIS Online services “Streets basemap”, which included all necessary and relevant base data. For this application it seemed more appropriate than imagery.

Once the data was acquired, I created a map document in ArcMap and styled my layers appropriately for use in a map service. Overall, that translated to bold colors and simple symbology. I encountered some challenges with my initial styling, particularly with scale issues. I resolved this by creating Group Layers for each feature dataset. I drew the same layer into the Group Layer three times, each layer having a different scale range, and then styling the layer to look/perform well within the specified range. I wanted the neighborhoods to be available for use in the geoprocessing service, but I didn’t want to clutter the screen with a lot of boundary lines, so my solution was to turn on the layer and then give it no color for fill or outline. Another minor issue I encountered had to do with the use of transparency in ArcMap. Instead of making the layer translucent as it appears in ArcMap, it is opaque when published as a web service (it just appears washed out). My solution was to simply remove the transparent elements from the styling, and instead utilize the function available in Flex. After I was happy with the styling, I published the map document as a map service.

Screenshot of styled map document with group layers expanded:

Page 3: jenningsplanet.files.wordpress.com€¦  · Web viewOne of these datasets contains all of the tracts in the US which are classified by the USDA as food deserts. “USDA, Treasury

Once the map document was completed, I then focused on building a model in ArcCatalog (from within ArcMap) which would serve as my geoprocessing service. Since my goal was to create a tool which would allow the user to search for a market based on the location of their neighborhood, I used the model below:

I ran the completed model within the map document, styled the resulting layer, and then published it as a geoprocessing service. The only real challenge I ran into occurred when I made changes to the model. It was necessary to go into the geodatabase and delete the feature class which the model created. Only then could I re-run the edited model. Another issue occurred when I decided to create the scale dependent group layers. The model would only accept one of the layers within the group layer as an input. This was ok for running the model; however within the web application it created issues with the display of the selected set in the attribute table. Since the model only referenced one layer, you had to be within the scale range of the layer used in the model for the web application to display the attribute data.

Once I published the map and geoprocessing services, I created my web application in ArcGIS Viewer for Flex. I found the Flex Builder to be very intuitive. In the Maps tab, I created the application, added the map and geoprocessing services as Operational Layers, and include an ESRI Basemap. Once this was saved, the web application was active. I could then view the application in a browser to see how everything was looking. From there I used the application builder to add functionality and to style to the app. I really had no problem here; it was simply a process of trial and error to learn about the different widgets and other elements available. As usual the online help resources from ESRI were very useful here.

For my application I ultimately added the Layer List, Geoprocessing (linked to the model), and Query widgets. I was able to add additional functionality in the Layout tab by adding an attribute table. This is especially useful because the user can export data from here as a .csv. I also adjusted the look and changed the title in the Design tab. I added pop-ups through the Maps tab. Again, everything within the Application Builder is very intuitive and allowed for easy editing of the application. Ultimately, I was able to view my changes in Preview tab or I could save and view changes instantly from the link in the Maps tab.

Page 4: jenningsplanet.files.wordpress.com€¦  · Web viewOne of these datasets contains all of the tracts in the US which are classified by the USDA as food deserts. “USDA, Treasury

Screenshot of the final web application with pop-up:

Screenshot of Food Deserts Operational Layer and Query Widget:

Final Web Map: Summary and DiscussionFor my first time building one, I felt that the final web application and services were functional and had a good look. I built a geodatabase in ArcCatalog, created a styled map document and a geoprocessing model in ArcMap which was able to be shared as a service successfully. The geoprocessing model performed as expected. The styling of the operational layers looked good on the screen, and the group layers based on scale ranges seemed to work ok. While I feel that my symbology worked ok, there is certainly room for improvement. Scale ranges are particularly cumbersome, but ultimately important to achieving a good look/feel.

I also feel that the web application achieves its intended purpose. The user is able to view the farmers market points and interact with them on the screen. The user can search for markets in his area and obtain useful information on the selected set. I would have like to have developed a more sophisticated geoprocessing model which would have incorporated the USDA food desert layer. Nevertheless, the user can interact with this data as well. From this experience I have learned a great deal for future web application development. I am now far more confident about composing a map document for use in a map service. By the end of this project I also have a better feel for what can be done from within the Flex Viewer and what must be handled in the map document. I look forward to my next development opportunity.

Page 5: jenningsplanet.files.wordpress.com€¦  · Web viewOne of these datasets contains all of the tracts in the US which are classified by the USDA as food deserts. “USDA, Treasury

References/Sources:

Agricultural Marketing Service (AMS), United States Department of Agriculture (USDA). “Farmers Markets Search.” Search.ams.usda.gov. n.p. December, 2014. < http://search.ams.usda.gov/FARMERSMARKETS/>.

Economic Research Service (ERS), U.S. Department of Agriculture (USDA). “Food Access Research Atlas.” ers.usda.gov. n.p. 2014. <http://www.ers.usda.gov/data-products/food-access-research-atlas.aspx>.