Skip To Content

Prepare and publish a layer

In the previous lesson, you joined your homeless data to a layer of the United States. You can use this layer to map homelessness variables in North Dakota and the rest of the country. To share your results as widely as possible, you'll publish your layer to ArcGIS Online.

Clean up the joined table

Before you publish data, it should be as clear and concise as possible. When you opened the United States layer’s attribute table, you saw there was much more data than necessary. As with the original Excel file, you'll clean up the table to show only the data you intend to use.

  1. If necessary, open your Homeless Map in ArcMap.
  2. In the Table of Contents, right-click USA_States_Generalized and choose Properties.
  3. In the Layer Properties window, click the Fields tab.

    The Fields tab shows all fields for the layer. If a field is checked, it's visible in the attribute table.

  4. In the row of tools above the field names, click the Turn all fields off button.

    Turn all fields off button

  5. Check the boxes next to the following fields:
    • Change
    • Pop13
    • Homeless13

    Visible fields

  6. Click OK.
  7. Open the USA_States_Generalized attribute table to confirm that only the fields you checked remain visible.

    The other fields have been turned off but not removed entirely. You can turn them back on the same way you turned them off.

  8. Close the attribute table.

Export the layer to a new feature class

The current layer can't be published for two reasons. First, it’s already a published feature service on ArcGIS Online; you originally added it from there, after all. Second, you can't publish a layer if all or part of its table is from a data source unsupported by ArcGIS Online (such as Microsoft Excel or a similar spreadsheet program). You can bypass both problems by exporting the layer as a new shapefile, which will preserve the data but change the source to a publishable file type.

  1. In the Table of Contents, right-click USA_States_Generalized, point to Data, and choose Export Data.
  2. In the Export Data window, for Output feature class, click the Browse button and browse to the Homeless Project folder.
  3. In the Saving Data window, for Name, type USA_States. For Save as type, choose Shapefile.

    Saving Data settings

    Upon choosing Shapefile, .shp (the file extension for shapefiles) is automatically added to the end of the file name.

  4. Click Save to return to the Export Data window.

    The Output feature class setting should look similar to the following image:

    Export Data output

    Alternatively, you can edit the Output feature class text box directly to contain both the navigation path to the Homeless Project folder and the output file name as formatted above.

  5. Click OK. When prompted to add the exported data to the map as a layer, click Yes.

    The symbology of the new layer has changed, but otherwise it looks the same.

  6. In the Table Of Contents, right-click USA States (Generalized) and choose Remove to remove the original group layer from the map.


  7. Open the Layer Properties window for the new USA_States layer and click the Fields tab.

    Fields tab

    Another benefit of exporting data is that fields that are not checked are not copied to the new dataset. The only fields now are the four fields you checked and the FID and Shape fields, which are mandatory fields for shapefiles and managed by the software.

    The field names are inconsistently formatted and not very descriptive. Shapefile field names must be no more than 10 characters and have no spaces or symbols other than underscores. Field aliases, which act as display names for fields, have no such restrictions.

  8. Click the STATE_NAME field. In the right pane of the Fields tab, change the alias to State.

    Appearance pane

  9. Change the aliases of the following fields. When you’re finished, click OK.
    • Change: Homeless Change (2012-13)
    • Pop13: Population (2013)
    • Homeless13: Homeless Count (2013)
  10. Open the attribute table to confirm your changes.

    Confirm changes

  11. Close the attribute table and save the map.

Publish the layer to ArcGIS Online

You'll now publish the layer as a hosted feature layer to ArcGIS Online. To transform a disk-based layer to a web-based layer, you must have a Publisher role in an ArcGIS Online organization.

  1. On the main menu, click File and choose Sign In.
  2. Sign in to your ArcGIS organizational account.

    If you don't have an organizational account, you can sign up for an ArcGIS free trial.

  3. On the main menu, click File, point to Share As, and choose Service.
  4. In the Share as Service window, confirm that the option to Publish a service is selected and click Next.
  5. Ensure that Choose a connection is set to your organization. Change the service name to Homelessness and add your name to the end (use underscores, as spaces are prohibited in the name).

    Service name

    The service name must be unique within the organization. If you use a name that someone else in the organization has already used, you’ll receive an error message.

  6. Click Continue.

    The Service Editor window opens. The Service Editor is where you specify the properties of the layer you are publishing.

  7. In the left pane of the Service Editor window, click Capabilities.

    Service Capabilities tab

    The Capabilities pane has two options: Tiled Mapping and Feature Access. Tile layers are collections of spatially-adjacent images, or tiles, and are usually used as basemaps. Feature layers are composed of discrete elements that can be edited and symbolized. Publishing this layer as a feature layer will allow you to symbolize the states according to their attributes.

  8. If necessary, uncheck the Tiled Mapping box and check the Feature Access box.

    Service capabilities

  9. In the left pane, click Item Description.

    For a layer to be published as a service, it must have metadata (data about data). Only a summary and search tags are necessary, but adding more metadata will clarify to users what your layer contains and from where you retrieved the data.

  10. Fill in the following fields:
    • Summary: Homeless data in the United States
    • Tags: homelessness, United States, 2013
    • Description: A feature layer of the United States with data by state on the 2013 homeless population and the change in homeless population between 2012 and 2013.
    • Access and Use Constraints: None
    • Credits: United States Department of Housing and Urban Development

    Service description

  11. In the left pane, click Sharing. Check the box next to your organization to make your layer viewable by everyone in the organization. Optionally, you can check the box next to Everyone (public) to make it viewable by all users of ArcGIS Online.

    Service sharing

    If you check Everyone, your organization is automatically checked.

    Before publishing, you'll analyze the service to ensure there are no outstanding problems.

  12. At the upper right of the Service Editor window, click Analyze.


    The Prepare window opens, showing any errors, warnings, and messages. The service editor will not publish your layer if there are any errors (marked by a red X), but warnings and messages will not prevent publication. In this case, there should not be any errors.


    ArcGIS Help has additional details on the types of messages you may receive.

  13. Close the Prepare window.
  14. At the upper right of the Service Editor window, click Publish.


    After a few moments, a message indicates that the service has been published successfully.

  15. Click OK in the Service Publishing Result window.
  16. Save your map and close ArcMap.

In this lesson, you prepared your layer for the web and published it. In the next lesson, you'll use your published layer to create three maps about homelessness in the United States to show how North Dakota’s homeless problem compares to the rest of the country.