Masthead

Creating Collection and Publishing Apps From a Single Feature Layer

Introduction

In this digital world, one of the simplest and yet effective ways of collecting spatial data in a participatory manner is the use of mobile web apps. In this exercise, you will learn to:

Requirements

You should all now have an ESRI ArcGIS for developers account on our HUmboldt State University organization. Click here to sign in:
https://HumboldtState.maps.arcgis.com
If asked, specify your Organization as Humboldt State University and for Organization short name, use anything appropriate such as humboldt.

Part 1: Create a Simple Geoform

A GeoForm allows users to enter data through a form and thereby add locations and information to a hosted feature layer in a web map, both of which must be public-facing and editable. What’s cool about hosted feature layers is that you can add them to multiple web maps, and you can create multiple web apps from a single feature layer. GeoForms are a great way to crowdsource data; they allow you to collect data and display it in another web app.

Usually when we talk of web GIS folks think about writing html or java script codes, right? One thing that might surprise you before you start working on this lab is that you will not need to write any code, but you will use the ESRI web developer options available to you via an ESRI ArcGIS online account.

If you remember in GSP 270, we talked of two main ways used to create websites: coding from scratch or using templates. In this lab, we will use existing ESRI templates to create a simple parking information web app that we will publish to the HSU community and they will tell us about their present day's parking experience answering simple questions like when and where they parked, what options they had, which buildings they were visiting etc. Such data, if collected over time can help analyze the trends in parking demand at HSU. If you master all the concepts in this lab you can easily create and use similar web apps in your own field for example if you want the community to help record sightings of an invasive plant you can publish a similar crowdsourcing app to a bunch of hikers and each time they encounter one, they can enter the location information in real time. All you have to do is periodically monitor the app’s site for updates.

Step 1: Creating a feature layer

We will use a shapefile to create a hosted feature layer. A hosted feature layer is a collection of geographic data in the form of points, lines, or polygons that support vector querying, visualization, and editing.

Feature layers are added to the Map Viewer in ArcGIS Online, where you can symbolize, analyze, and combine them with basemaps and other feature layers to create great-looking web maps. Remember, the Map Viewer is the place where we author maps; web maps themselves should not be shared with people who are not involved in the map-making process. Web apps, or geo apps, are the mechanism for sharing or, in this case, collecting geographic information.

  1. Make sure you are still logged in to your developer account. On the top right corner you should see your first and last name and then your user name below that
  2. If not logged in, click Sign In and sign in with the detailes sent to you earlier on.
  3. Click the App Launcher Icon on the top-right corner
  4. Near the bottom of the page, under Layers, click Create New Layer
  5. On the next page Click Create an Empty Layer and complete the New Layer Details section as follows:
    1. For Title, type HSU Campus Parking (Your name).
    2. Note: Add your name to the end of the title since there will be many of us creating this layer.

    3. For Tags, type geoform
  6. Click on Geometry and select Points
  7. For Spatial Reference type 4326 if it’s not the default. This is the code for WGS GCS
  8. Click on Fields
  9. In the Name box, type Date and keep the Alias as Date.
  10. For Type use the drop-down list to select Date
  11. Enable (check) the No Domain radio button and click Add Field
  12. Now we define two more fields:

  13. Type Prior_Attempts in the Field Name box. Note that this has to be one word.
  14. Keep the alias as Prior_Attempts
  15. For Type use the drop-down list to select Integer
  16. Enable (check) the No Domain radio button and click Add Field.
  17. In the Name box type Building and keep the alias as Building
  18. For Type, use the drop-down list to select String
  19. Enable (check) the No Domain radio button and click Add Field.
  20. For all the 3 field, make sure the Required box is checked
  21. Click on Settings
  22. Check the Allow attached images……..box
  23. Under Share Layer set This layer can be accessed by: to Me (Private)
  24. Under Permission Settings, check the Enable editing box
  25. Set “What kind of editing is allowed?” to Add, update and delete features
  26. Set “What features can editors see?” to Editors can see all features
  27. Set “What features can editors edit?” to Editors can edit all features
  28. Set “What access do anonymous editors (not signed in) have?” to The same as signed in editors
  29. Click Create Layer.
  30. You are directed to a page with information about your new feature layer. There is no data in it yet, which is why you want to build a GeoForm to populate it. To create the GeoForm, you need to work with the feature layer in ArcGIS Online.

Step 2: Edit and save the map

  1. Click View in ArcGIS Online.
  2. You will be directed to the feature layer’s item details page.

  3. Click Open In Map Viewer.

Now lets add a shape file of the designated parking lots so it will be easier for our target public to see where they are and enter their location data.

  1. Click Add and then select Add Layer from file

A zipped folder with all the files that make up a shapefile is required for this option.

  1. Click choose file and navigate to your originals folder and select the designated_parking.zip file.
  2. Click the Generalize features for web display radio button and then click IMPORT LAYER

Now we will configure the map

  1. Click on Basemap and select the Streets basemap.

Next, we will customize the layer on the map. Make sure the Choose An Attribute to show option is set to Show Location Only. If not change it accordingly.

  1. Adjust your map scale so that you see around the HSU campus, as shown below then click on Options
  2. Now, click on Symbols
  3. Click on Fill and choose an appropriate color
  4. Now click on Outline and select the Red Color
  5. Uncheck the Adjust outline automatically radio bottom and set line width to 2. The preview should like the graphic below. Click OK
  6. Set the transparency to something around 50 % and click OK>
  7. Click Done
  8. Click Content and then hover your mouse over HSU Campus Parking (Your name) until you see some symbols appearing, then click the third symbol from the left.
  9. In the Change Style pane, make sure the Choose an attribute to show box is still set to Show Location Only. If not, change it accordingly and then click Options
  10. Click on Symbols
  11. Under Shapes choose an appropriate theme and then chose a symbol of your preference. Also, set a good size (not too big, not too small). I decided to go with a fancy car so I chose the Transportation theme and selected a cool car as shown below. When satisfied, click OK
  12. Click OK again

Now that our parking lots appear clear and nice, we need to save the map.

  1. Click Save and, from the drop-down list, choose Save.
  2. In the Save Map dialog box, enter the following information:
    1. For Title, type HSU Campus Parking Survey.
    2. For Tags, type geoform.
    3. For Summary, type Web map for HSU campus parking survey.
  3. Accept the default value for the Save In the Folder field and click Save Map.

Now that the web map is saved, you can create a GeoForm.

Step 3: Use a GeoForm to collect crowdsourced data

Before you create a GeoForm web app that can be used to collect crowdsourced data, you will share your map.

  1. From the ribbon near the top of the ArcGIS Online window, click Share.
  2. Share your map with everyone by selecting the Everyone (Public) check box.

Remember, you are creating a crowdsourcing app, so you want it to be accessible to the public. By default, your feature services and web maps are private. When you update the sharing settings of a web map, you will be asked whether you would like to update the sharing settings for the feature services in that web map. Generally, you will want to update the feature services’ sharing settings to align with the web map. If you do not, someone could access your web map but receive an error message (for example, when a web map is shared with everyone, but the feature service is set to private).

  1. Click Update Sharing, and OK on the message that pops up.
  2. Click Create A Web App.
  3. In the list on the left, select Collect/Edit Data, and then click GeoForm.
  4. In the right pane, click Create Web App.
  5. In the Create a New Web App dialog, enter the following information:
    1. For Title and Tags, accept the defaults.
    2. For Summary, type GeoForm to collect information from drivers.
    3. For Save In Folder, accept the default.
  6. Click Done.
  7. You are directed to the GeoForm Builder, which will help you configure your app.

Step 4: Use the GeoForm Builder to configure the collection app

  1. In the GeoForm Builder, on the Start tab, click Next.

The web map you want to use for the GeoForm is already selected. The selected web map is the HSU campus parking survey map you created previously.

  1. On the Select A Webmap page, click Next.
  2. On the Select Editable Layer(s) page, from the Layer drop-down, choose the HSU_Campus_Parking_(Your Name).
  3. This is the hosted feature layer you created previously

  4. Click Next.
  5. On the next window, under Title, type HSU Campus Parking Survey.
  6. Under Form Instructions & Details, type
  7. Please fill out the simple survey below about your parking today. The results of the survey are strictly for academic purposes only. The survey will help GSP330 students learn to collect and analyze crowdsourced spatial data. Thank you.

  8. Leave the Submit Button Text (Optional) As Is
  9. Under View Submissions Text (Optional), type Click here to view other participants’ responses if you wish
  10. Click Next.
  11. On the next window, uncheck the Enable Attachments check box.
  12. Click the Configure button for the Date field.
  13. Under the Help Text section, type Make sure the date and time displayed here is correct, if not, please refresh your browser.
  14. The Display As section should be set to Date Picker

  15. Check the Set this field with the current date and time check box and click Close.
  16. Click the Configure button for the prior_attempts field.
  17. Under the Help Text (optional) section, type
  18. Enter 0 (Zero) if this was your first choice parking lot for today, otherwise, enter the number of failed attempts you have made at other parking lots before visiting this one. If you simply came to this parking lot because you "knew" it would be the best gamble on this day and time, enter 20.

    Note : Feel free to edit this text to something that you think is more understandable.

  19. For Display As, choose Text.
  20. Click Close
  21. Click the Configure button for the Building field.
  22. Under the Help Text section, type
  23. Please type the name of the building are you going to.

  24. For Display As, choose Text and then click Close.
  25. If your Fields page should look like the graphic below, click Next.
  26. On the Style page, under Select your GeoForm ………choose Cyborg.
  27. Click Next.
  28. However, you can explore the other if you want.

  29. Under Viewer, for the Display Field, select prior_attempts and then click Next.
  30. Configure the options as shown below and then click Next.

You are directed to the Preview page. However, you can select Preview from the side menu at any time to preview any changes you make.

  1. When you are satisfied with your application, click Next and you will be taken to the Publishing page.
  2. Click Save
  3. Copy the form link so you can share it with the targeted public. You can also directly share it via email or social media.
  4. Note: It can be confuding and frustrating to get back to this stage of the web app development so make sure you copy the link now and keep it in such a way that you can easily retrieve it when needed.

  5. Click Close and then click Save and Exit.

Well done! You just published your crowdsourcing geo app. Reward yourself, take a small break and get ready for part 2 of this lab.

Part 2: Create a Summary Viewer App

Step 1: View the GeoForm web data-collection app

Now you will create a Summary Viewer app to display the crowdsourced data as the public participates in the survey.

There is only one problem: You have not collected any data yet! For this exercise to make sense, open your app (using the link you got earlier) and pretend to be a participant. Submit at least 3 entries and then proceed to the next steps.

  1. Now go to https://developers.arcgis.com/, if you had logged out, log back in.
  2. Click View Dashboard.
  3. On your Dashboard, click on your (HSU Campus Parking Survey) Application.
  4. On the next page, click on View in ArcGIS Online.
  5. On the next page, click on Content/

Depending on how much work you have done in ArcGIS online, you will see a list of items linked to your account.

  1. Click on the HSU Campus parking Survey Web map type.
  2. On the next page, click Open in Map Viewer.
  3. In the Map Viewer, click Share.
  4. In the Share window, Make sure Everyone (public) is selected and then click Create A Web App.
  5. From the pane on the left, select Explore/Summarize Data, and click the Summary Viewer configurable app template.
  6. Click Create Web App.
  7. Make changes so that your window looks something like the following graphic, and then click Done.

You should see something like the graphic below. if so, you ready to do a very simple app configuration.

Step 2: Configure the Summary Viewer display app

  1. Select the General tab and type an appropriate title, such as HSU Parking Map
  2. Select the Theme tab and choose an appropriate color
  3. Click Save to see your changes reflected in the preview.
  4. Next, select the Summary Layer tab and from the drop-down list, select HSU Campus Parking (Your name).
  5. In the Average Fields section, select prior_attempts, and then click Save.

That’s it!

Now, when you pan and zoom, the total number of surveys in the field of view will return along with the average prior_attempts for all of the entries within the map extent. This way, you can see how people chose different parking lots for the duration of the survey.

  1. Click Launch to view your App. You should see something like this graphic:

Note: The numbers inside each parking lot’s polygon indicates the number of responses from that lot. The color of your app is based on the color you selected earlier in the app configuration process.

Admire your app, take a break and get ready to complete the last part of this lab.

PART 3: Download Data From Your Crowdsourcing App

The data within the web app is for visualization only. If you want to do further analysis, you will need to download it to a desktop application. In this part of the lab, you will download the fake data that you created before you started working on part 2.

  1. Go to https://developers.arcgis.com/, if you had logged out, log back in.
  2. Click View Dashboard
  3. On your Dashboard, click on your (HSU Campus Parking Survey) Application .
  4. On the next page, click on View in ArcGIS Online.
  5. On the next page, click on Content.
  6. On the next page, on the right pane, click on Export Data and select Export to CSV file.
  7. You can also export a shapefile but the only problem is it doesn’t come with the time attribute.

  8. Under Tags, type geoform and click Export.
  9. The file will be saved to your cloud folder and you are taken to your app’s page.

  10. On the right panel, click Download.

A Zipped file is downloaded to your local computer’s “Downloads” folder by default. You can redirect it to your working folder and then save it there. Now you can unzip the folder and explore the data.

Conclusion

Although the data you worked on here is not real, I hope that this lab demonstrated the potential of a workflow that collects, publishes and analyses data through the same feature service.

Now, think of a potential web app you can create in your own field to collect, visualize and analyze crowdsourced data. I like participatory GIS stuff so I can think of a geoform that I can publish to hikers and let them record the sightings of certain invasive plants.

© Copyright 2018 HSU - All rights reserved.