Skill Drill: Adding XY Data

In this scenario, a small number of local business have decided to participate in the pilot program. Information about these businesses, including location and the average weight of organic waste is available in a comma separated values (CSV) file. If you are a registered student at Humboldt State University, you may access the local business data used in this lab by logging into the course using the Canvas LMS. Find the link to download the data on the assignment page in Canvas. Download and then decompress the file into your original folder.

Launch Microsoft Excel open the businesses.csv file. Here you will see a table of businesses participating in the pilot program. Take a moment to read through available information about the businesses. Included in the table are a series of fields you will use in your vehicle routing model. Each business has a name and address. A time window, specified by the Window Start and Window End fields, indicates when organic waste pickups are allowed in our model. In this scenario, most businesses allow pickups throughout the day, yet, a few only allow pickups between 5 am and 8 am. The service time indicates the average time, in minutes, spent at each location during a pickup. The pickup quantities field indicates the average weight of the organic waste in pounds. This attribute will be used in our model in conjunction with the cargo capacity of the garbage truck. Together, these attributes determine when a truck is full and must return to the garbage station to unload before continuing on the route. After you have looked over the CSV table, be sure to close Microsoft Excel before returning to the ArcGIS software.

An image showing a table in Excel of participating businesses
A CSV table of participating businesses

I geocoded the address of each business via a web-based service to generate a series of latitude and longitude values in decimal degrees. It’s important to remember that each geodedic datum as a unique set of latitude and longitude values. For example, the latitude and longitude values for your home using the North American Datum of 1983 will be different than the latitude and longitude values using the North American Datum of 1927. Likewise, the World Geodedic Datum of 1984 will use yet another set latitude and longitude values to define the location of your home. Like most latitude and longitude values you will obtain from the internet or from a GPS reciever, the decimal degrees in this CSV table are currently in the geographic spatial reference system WGS 1984. When adding XY data, the ArcGIS software only reads the decimal degrees. It is unaware to which spatial reference system these decimal degree values belong. ArcMap will assume, incorrectly, that the spatial reference is the same as the dataframe. You must indicate in the Add XY data dialog box that this series of decimal degree values belong to the WGS 1984 spatial reference system. If you do not, your businesses will likely end up somewhere in the ocean.

An image of the Add XY data dialog box.
You can locate the spatial reference ArcMap will use under the Description. To re-define the spatial reference, click on the Edit button to select the correct spatial reference.

After adding XY data, the ArcGIS software will create a temporary events layer. In many ways, the events layer appears to be similar to a shapefile. However, it is only a temporary representation and does not have an associated database.

An image of the Warning Dialog Box in ArcMap.
The ArcGIS software will remind you that you will still need to export the events layer in order to create a permanent shapefile that includes database functionality.

Export the events layer as a shapefile and save it to your working folder. You should now have a shapefile of the businesses in the WGS 1984 spatial reference system saved in your working folder. Next use the Project tool to create a copy of the data with the NAD 83 UTM Zone 10 spatial reference system. Add the layer with the correct spatial reference to your Table of Contents and remove the old version.

An image of the businesses added as an events layer.
An events layer is temporary and should be exported as a shapefile.