GeoJSON is a json-based file format for sharing geographic data. One example dataset is the USGS earthquake data:
import requests
quakes=requests.get("http://earthquake.usgs.gov/fdsnws/event/1/query.geojson",
params={
'starttime':"2000-01-01",
"maxlatitude":"58.723",
"minlatitude":"50.008",
"maxlongitude":"1.67",
"minlongitude":"-9.756",
"minmagnitude":"1",
"endtime":"2015-11-22",
"orderby":"time-asc"}
)
quakes.text[0:100]
'{"type":"FeatureCollection","metadata":{"generated":1493848661000,"url":"https://earthquake.usgs.gov'
Exercise: Determine the location of the largest magnitude earthquake in the UK this century.
You’ll need to:
You will need to include the following at the top of your Notebook file:
%matplotlib inline
from matplotlib import pyplot as plt
Next: Module - Plotting