4
$\begingroup$

Where can I find a list of all earthquakes that happened on Earth since 1900?
I need time, longitude/latitude, and power -- preferably in .csv format.

$\endgroup$
  • 1
    $\begingroup$ Maybe at usgs. you have json data format. earthquake.usgs.gov/fdsnws/event/1 $\endgroup$ – user12525 Jun 7 '18 at 12:08
  • 1
    $\begingroup$ Welcome to EarthScience.SE. Where did you look for these data already on yourself? If you get the information here, you might try OpenData.SE. $\endgroup$ – daniel.neumann Jun 7 '18 at 12:13
  • $\begingroup$ @Universal_learner thanks, I used exactly that website. The only problem I had was that I could get 20000 records at a time only. So I made a little script to get all the relevant data. I'll answer my own question how I did it. $\endgroup$ – Kristjan Jun 7 '18 at 14:25
  • $\begingroup$ You are welcome. That's what I said maybe. Haven't tried the api. xml also $\endgroup$ – user12525 Jun 7 '18 at 14:26
  • 1
    $\begingroup$ I answered myself with a python script so someone else could use it in future... I hope I'm not breaking any rules answering myself. $\endgroup$ – Kristjan Jun 7 '18 at 14:28
6
$\begingroup$

Okay so I got the data from https://earthquake.usgs.gov

Since the website only allows to get 20k records at a time I made a little python script that downloads data for each month.

import os
import requests

for x in range(1900,2016):
    for y in range(1,13):
        url='https://earthquake.usgs.gov/fdsnws/event/1/query.csv?starttime='+str(x)+'-'+str(y)+'-31%2023:59:59&endtime='+str(x)+'-'+ str(y+1) +'-31%2023:59:59&minmagnitude=2.5&orderby=time'
        print(url)
        response = requests.get(url)
        with open(os.path.join("C:/Users/kristjag/OneDrive/delo/potresi", "potresi_"+str(x)+"_"+str(y)+".csv"), 'wb') as f:
            f.write(response.content)

Code above take some time to finish but when completed you get earthquake data for every month from 1900-2016

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.