Skip to main content

SQL Database software for SnowEx data

Project description

Welcome to snowexsql

Documentation Status Testing Status Code Coverage Code Coverage

Database access and tools for using the SnowEx database. This tool is simply a client for accessing the database using python

WARNING - This is under active development in preparation for SnowEx Hackweek. Use at your own risk. Data will change as it is QA/QC’d and the end goal is for all data in this database to be pulled from NSIDC. The goal is for this to become a community database open to all.

DOI

  • SnowEx Hackweek 2022

https://zenodo.org/badge/DOI/10.5281/zenodo.7618102.svg

Features

  • Database access for SnowEx Database

  • Analysis tools

  • Useful conversions to pandas and geopandas

  • Lots of examples

Installing

If you are just planning on using the database, then only install the python package instructions below.

I just want to use it

Install using pip:

pip install snowexsql

I want to contribute!

Install the python package by:

python3 setup.py install

If you are planning on running the tests or building the docs below also run:

pip install -r requirements_dev.txt

If you are using conda you may need to reinstall the following using conda:

  • Jupyter notebook

  • nbconvert

I want data fast!

A programmatic API has been created for fast and standard access to Point and Layer data. There are two examples covering the features and usage of the api. See the specific api documentation for detailed description.

from snowexsql.api import PointMeasurements, LayerMeasurements
# The main functions we will use are `from_area` and `from_filter` like this
df = PointMeasurements.from_filter(
    date=date(2020, 5, 28), instrument='camera'
)
print(df.head())

Tests

Before testing, in a seperate terminal, we need to run a local instance of the database. This can be done with

docker-compose up -d

When you are finished testing, make sure to turn the docker off

docker-compose down

Quickly test your installation by running:

python3 -m pytest tests/

The goal of this project is to have high fidelity in data interpretation/submission to the database. To see the current test coverage run:

make coverage

Documentation

There is a whole host of resources for users in the documentation. It has been setup for you to preview in your browser.

In there you will find:

  • Examples of database use

  • Database structure

  • API to the python package snowexsql

  • Links to other resources

  • Notes about the data uploaded

  • And more!

To see the documentation in your browser:

Warning: To see the examples/gallery, the snowex db needs to be up. Otherwise they will be left with the last image submitted to GitHub.

make docs

History

0.1.0 (2020-06-12)

  • Project Created.

Hack Week 2021 (2021-07-15)

  • Fully deployed database with around 100 users

  • Uploaded with fully reproducible DB using Snowex Data for Grand Mesa 2020

  • Timezones all in Mountain Standard

0.2.0 Repo Split (2022-06-20)

  • Repo was split into an access client and a db builder to reduce overhead

  • snowexsql is now an access client and python tools to make life easy

  • snowex_db is now a repo containing all necessary assets to build db.

0.3.0 (2022-07-6)

  • New columns were added to the LayerData table for flags

  • Converted surveyors to observers

  • Changed utm zone to be an integer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowexsql-0.4.1.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

snowexsql-0.4.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file snowexsql-0.4.1.tar.gz.

File metadata

  • Download URL: snowexsql-0.4.1.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for snowexsql-0.4.1.tar.gz
Algorithm Hash digest
SHA256 8caeeadbc2d21ec1ba7a00dbd7318e7fea104f9c32d605de5b61fbf3874ae021
MD5 f8c10922608ce3099ac01203c3eb5d82
BLAKE2b-256 171749a7774848f4a36e85b6a516536085611787f6aa625e8aa0ac672b139c93

See more details on using hashes here.

File details

Details for the file snowexsql-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: snowexsql-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for snowexsql-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 883703f318386c7068a1084ead1d3b7c9b55ee362e2633ff6478d6a42dc94539
MD5 4f18f5185f7bf17503b563c3d939eccd
BLAKE2b-256 a069339e50c39471de49d9a8f5fac722e6ae8a64d41236640225d2faaffeaa99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page