Exploring spatial data with the Geomap visualization
You should be all set up at this point to start downloading our data and then storing it in our InfluxDB bucket.
Ingesting a new earthquake dataset
The USGS maintains a comprehensive earthquake catalog and it is freely available via a simple REST interface at https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php. The USGS provides continually updated catalogs of earthquakes, which are filtered by size over a variety of time periods ranging from one hour to one month.
To load the earthquake data, we only need to create a new Python script that is similar in structure to weather.py
from Chapters 5, 6, and 7. We’ll call this new script earthquake.py
, and you can find it in the Chapter08/app
folder of the repository. Let’s take a quick peek at the changes we made from weather.py
to earthquake.py
.
Updating process_cli()
The first big change occurs in process_cli()
. First, we change the parser description...