# Mapping Earthquakes in Northern California

As you learned in a previous step, a CSV is one of the simplest forms of geospatial data. As mentioned before, each column of data is separated by a comma, and the first row in the table contains the field names. When adding XY data, it is the two columns, Latitude and Longitude, that are necessary to place this information on a map.  When I talk about XY data, the Longitude in decimal degrees is the X coordinate, and the Latitude in decimal degrees is the Y coordinate.

You will learn more about latitude and longitude in a later chapter. For now, just understand that ArcMap will read these numbers, the latitude, and longitude values in decimal degrees, to figure out where to place the points on the map. In ArcMap, from the File menu, select Add XY Data.

When the Add XY Data window opens, click the yellow file folder icon and browse to the Original folder.

ArcMap reads the CSV table and tries to find the XY data automatically. In this instance, it assigns Longitude as the X field and Latitude as the Y field.

The next step is the most important one. Most students 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 spatial reference systems use different latitude and longitude values. You will learn more about spatial reference systems in a later chapter. For now, just understand that ArcMap does not know from which spatial reference system the latitude and longitude values come. Instead, it tries to guess. The mistake students make is that they allow ArcMap to guess incorrectly. Check to make sure that the Geographic Coordinate System is GCS WGS 1984.

If not, then follow the next few steps to manually set the spatial reference information for the earthquake data. On the Add XY Data window, click the Edit button under Coordinate System of Input Coordinates.

The Spatial Reference Properties window opens up. Scroll to the top and expand the Geographic Coordinate Systems folder.

Then scroll down until you see the World subfolder. Expand the World folder.

Scroll down until you see WGS 1984. There are several versions. Select the simple one that only says “WGS 1984.” When you are ready, click OK.

Check to make sure everything matches the settings below. When you are ready, click OK.

You will get an error message warning you that the table does not have an object id field. Take a moment to read the warning. When you Add XY data, ArcMap creates a temporary representation of the data. It might look like a regular shapefile, but it does not have a database. To make it into a permanent shapefile with a database, you will have to export the layer. Go ahead and click OK to close the warning.

All the earthquakes above a magnitude of 3.0 get added to the map. In the Table of Contents, right click on earthquake2017.csv Events and select Zoom to Layer.

Make the earthquake layer a permanent shapefile by exporting it. The process is the same as when you exported the California selection and the Humboldt County selection. However, in this instance, with nothing selected, the entire layer gets exported. In the Table of Contents, right-click on earthquake2017.csv Events and select Data, then Export Data. Save the file to your Working folder and name it “CA_earthquakes_2017.” Add the exported data as a map layer. When done, right-click on the Events layer and select Remove.

You should now have four layers in the Table of Contents, the California earthquakes of 2017, Humboldt County, California, and the United States. Take a moment to save your map document before continuing to the next step.