Adding XY Data
Table of Contents
- Geospatial Analysis Skills: Review and Self-Assessment
- Setting up Your Workspace
- Datums, Projections, and Spatial Reference Systems
- Working with Database Tables
- Adding XY Data
- Proximity and Overlay Operations
As you learned in a previous step, a CSV is one of the plainest forms of geospatial data. As mentioned before, each column of data gets separated by a comma, and the first row in the table contains the field names. When adding XY data with geographic coordinates, it is the two columns, latitude, and longitude, that are necessary to place this information on a map. The longitude in decimal degrees is the X coordinate, and the latitude in decimal degrees is the Y coordinate. ArcMap reads these numbers, the latitude, and longitude values in decimal degrees, to figure out where to place the points on the map.
Skill Drill: Downloading and adding XY data to the map
Using the Chrome browser, navigate to the Northern California Earthquake Data Center (NCEDC) website. Enter the following search parameters:
Output format: NCSN catalog in CSV format
- Start Time: 2002/01/01
- End Time: 2019/08/31
- Min Magnitude: 5.0
- Min Latitude: 32
- Min Longitude: -114
- Max Latitude: 47
- Max Longitude: -130
- Event Types: Earthquakes
- Under Output Mechanism, select Send output to an anonymous FTP file on the NCEDC
When you are ready, click Submit request. In the Chrome browser, the results load in a new tab. Under output can be downloaded from, click the link next to the word URL (Figure 1.9)
The next page displays the data in CSV format (Figure 1.10). You need to save the results to your original folder.
In the Chrome browser hit Ctrl S to save. Browse to your original folder. For the filename, enter earthquakes.csv. Next to Save as type, choose All files. When you are ready, click Save. In Microsoft Windows, navigate to your original folder and open the earthquake 2017 CSV to view the results. By default, a CSV file should open in Microsoft Excel (Figure 1.11).
When opened in Microsoft Excel, the CSV file appears as a table. The commas in the data create fields. Each record represents a single earthquake. In this instance, the top row is different from the remaining records. It is made up of field names. When working with geospatial data, this format is critical. The first row of any geospatial data table must contain the field names to work correctly. Go ahead and close the CSV file in Microsoft Excel.
Using the skills you learned previously, add the earthquake CSV to the map document as XY data. Make sure you use the correct spatial reference system for this data. Most readers make mistakes here. Many people assume that latitude and longitude coordinates are universal. They are not. There are many different spatial reference systems available when you make maps. Different datums use distinct values for latitude and longitude. ArcMap does not know from which spatial reference system the latitude and longitude values come. Instead, it tries to guess. The mistake many make is that they allow ArcMap to guess incorrectly. In this instance, these latitude and longitude values come from a spatial reference system called GCS WGS 1984, which uses the World Geodetic System of 1984 as the datum. Check to make sure that the Geographic Coordinate System is GCS WGS 1984. If not, manually set the spatial reference information for the earthquake data in the Add XY Data dialog box (Figure 1.12).
Hint: If you forgot how to add XY data, review the skills you learned in the Chapter 7 Tutorial Mapping Earthquakes in California, from the Geospatial Concepts Text.
Export the earthquake events layer and save it as a shapefile. Be sure to save the shapefile to your working folder.
Skill Drill: attribute and Spatial Queries
In your Microsoft Word document, record the answers to the following questions.
19. How many earthquakes above a 5.5 magnitude occurred within 100 miles of Humboldt County?
Hint: If you forgot how to perform attribute queries and spatial queries, review the skills you learned in the Chapter 6 Tutorial Mapping Food Deserts in LA County, from the Geospatial Concepts Text.