This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
Working with the US Geological Survey earthquake data set #12
Labels
Comments
Closed
Open
nuttamas
added a commit
to nuttamas/rse-classwork-2020
that referenced
this issue
Oct 28, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This exercise will look at how to read data from an online source (web service), explore and and process it.
You will write some code, then review each other's work on GitHub and discuss on Moodle.
Step 0: Setup
Make sure you have read the note chapters on working with files, Internet data and structured data files.
Set up your copy of this repository following the guide on Moodle. Then pull the latest changes (
git pull upstream
) and checkout the branchweek04
(git checkout week04
).Step 1: Exploration
Read the exercise description in the lecture notes.
Your task will be to find the location and magnitude of the strongest earthquake in the UK in the last century. You don't need to create any maps or other plots!
Before you start, take some time to understand the structure of the data. To see the data, you can try different things; for example:
quakes = requests.get(...)
quakes.text
) in a text file (give the file an appropriate extension to help applications display it nicely!)The following questions may help you explore and understand how the data is laid out:
response.text
) in? Can you read it into a data structure programatically?"features"
) is by far larger than the others. How many entries does it hold?Step 2: Coding and discussion
When you think you understand enough, start writing your answer in the
week04/quakes.py
file in your fork.When you are happy with your solution (or want some feedback!):
week04
branch of the original repository.Answers UCL-RITS/rse-classwork-2020#12
. If you have finished the exercise, also give the answers you found (e.g. "The maximum magnitude is 3 and it occurred at coordinates (4.0, -3.8)."Sample solution
The text was updated successfully, but these errors were encountered: