Underfoot is a mobile app for revealing the hydrological and geological world beneath your feet. Well, sort of. It's mostly just something I tinker with in my spare time. It'll probably never be done. If you're interested in a more fully-functional app for geological exploration, check out rockd.
Still reading? This repo is mostly for data prep. I used to have some Ionic-based mobile app stuff here but I've given up on Ionic and am currently just tinkering with a native Android app.
You'll need to install Vagrant and VirtualBox.
git clone https://github.com/kueda/underfoot.git
cd underfoot
vagrant up # This will take a while
vagrant ssh
# Subsequent commands in the Vagrant VM
# This is kind of optional. You could just run the code from /vagrant/, i.e. the
# files on the host, but it might be a bit safer to clone them from the repo and
# work on a separate clone. Then you have the awkwardness of copying files back
# and forth if you're developing, or syncing folders
# (https://www.vagrantup.com/docs/synced-folders/basic_usage.html). Up to you.
git clone https://github.com/kueda/underfoot.git
cd underfoot
# Set up a python virtual environment
virtualenv venv -p python3
source venv/bin/activate
# Install deps and some stuff for working with ESRI Arc/Info coverages
pip install -r requirements.txt
python setup.py
# Make a pack
python packs.py us-ca-oakland
Each source is an executable Python script that creates a directory at sources/work-SCRIPT_NAME
containing data in a standardized format that can be synthesized. Rocks and water sources have different requirements.
- A GeoJSON filed named
units.geojson
that contains all the geological map units, each of which contains the following properties:code
: Code used to label the unittitle
description
lithology
: rocks included in this unitrock_type
: igneous, sedimentary, or metamorphicformation
grouping
: i.e. the group, e.g. Franciscan Complexspan
: geologic time span of unit formation, e.g. Cretaceous, extracted from source but generally verbatimcontrolled_span
: geologic time span of unit based on a controlled vocabulary dereived from the Wikipedia "Period start" templatemin_age
: Minimum age of the unitmax_age
: Maximum age of the unitest_age
: Estimated age of the unit
- A JSON file named
citation.json
containing a single-item array of CSL Data items of the kind exported from Zotero.
- A GeoPackage named
waterbodies.gpkg
containing a singlewaterbodies
layer with the following properties:waterbody_id
: unique identifier within this filesource_id
: unique identifier provided by the sourcesource_id_attr
: name of the attribute thesource_id
was derived fromname
type
: type of waterbody, one oftreatment
storage
evaporator
swamp/marsh
reservoir
lake/pond
is_natural
: boolean indicating whether or not the body was made by humanspermanence
:perennial
orephemeral
geom
:MultiPolygon
geometry
- A GeoPackage named
waterways.gpkg
containing a singlewaterways
layer with the following properties:- TODO
- A GeoPackage named
watersheds.gpkg
containing a singlewatersheds
layer with the following properties:- TODO
- A CSV named
waterways-network.csv
describing the connectivity and direction of flow in thewaterways
, using thesource_id
attribute.source_id
to_source_id
from_source_id
- A JSON file named
citation.json
containing a single-item array of CSL Data items of the kind exported from Zotero.
Sources can be single scripts or modules. Preferrably they will contain as little data as possible and instead download and transorm open data from the Internet, e.g. USGS publications, though some data will probably be necessary since few sources are fully machine-readable. There are numerous helper methods for writing source scripts in the sources/util
module.
If you'd like to contribute a source, please file an issue first proposing a new source, and if we agree it should be added, work on a feature branch in your own fork and issue a pull request when it's ready. If that sounds like too much coding, file an issue anyway and I might put together a script if you perform some of the digitization / transcription.
Coverage is pretty limited but there are a few.
pytest