Masthead

Lab: Converting Files

For this assignee, you'll download a read USGS Earthquake file from the Web and write the Python code to perform a series of conversions on the data. I highly recommend you take the following steps to complete the assignment:

  1. Make a copy of the Python script that we did in lab and use it for your final assignment.
  2. Comment out the call to the "ComputerDateToNiceDate()" function.
  3. Setup your main while loop to read the file and make sure it is working correctly.
    1. Extract the column data that you want to have in your output file and write it to a new file
  4. Test the file in ArcMap to make sure it can be displayed.
    1. I recommend doing this periodically as you make changes.
    2. Remember to check your file in NotePad if ArcMap will not load it.
  5. Finish the ComputerDateToNiceDate() function and add the nice date to a column in your output file
  6. Create a function to convert the DD latitude and longitude to a nice looking DMS format.
    1. You can use the "hexadecimal" degree symbol "\xB0" to put a degree symbol into your DMS formated coordinate values. These should appear correct in ArcMap as labels and in the attribute table.
  7. Create a function to reformat the magnitude values and types to a readable format.

 

© Copyright 2018 HSU - All rights reserved.