Skip to content

eyeseast/seismic-analysis

Repository files navigation

Mapping seismic risk in Datasette

This is a demo project showing how I use SpatiaLite with Datasette for quick spatial analysis, based on Peter Aldhous' 2022 NICAR session. To see this done in R, follow Peter's tutorial.

Libraries used

Run pipenv install to create a virtual environment and get the latest version of everything. I also recommend installing SpatiaLite.

Building locally

Run make install to load dependencies from Pipfile.lock. This should recreate the same environment every time.

Once that's done, run make quakes.db to create a SpatiaLite database and load in seismic risk data.

To geocode the addresses table, run make geocode, which will use OpenStreetMap's nominatim geocoder. This is fine for a 30-row table, but for larger datasets, consider a different geocoder.

Running queries

Run the Datasette server using make run and open http://localhost:8001.

About

Using Peter Aldhous' R tutorial with Datasette and SpatiaLite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published