A Python library for working CAAML.XML files from SnowPilot
Project description
SnowPylot
A Python library for working with CAAML snow profile data from SnowPilot.org.
Installation
pip install snowpylot
Usage
from snowpylot import caaml_parser
# Parse a CAAML file
snowpit = caaml_parser("path/to/snowpit.caaml.xml")
# Access snow pit data
print(f"Pit ID: {snowpit.coreInfo.pitID}")
print(f"Date: {snowpit.coreInfo.date}")
print(f"Location: {snowpit.coreInfo.location}")
# Work with layers
for layer in snowpit.snowProfile.layers:
print(f"Layer at depth {layer.depthTop}")
print(f"Grain form: {layer.grainFormPrimary.grainForm}")
# Access stability tests
for test in snowpit.stabilityTests.ECT:
print(f"ECT at depth {test.depthTop}: {test.testScore}")
Features
- Parse CAAML snow profile data from SnowPilot.org
- Access core information (pit ID, date, location, etc.)
- Work with snow layers and grain types
- Access stability test results
- Handle whumpf observations
Development
To set up the development environment:
git clone https://github.com/yourusername/snowpylot.git
cd snowpylot
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
Run tests:
pytest
License
This project is licensed under the MIT License - see the LICENSE file for details.
Mary Kate's SP2025 Independent Study
The data for this project comes from Snowpilot.org
Setting up Jupyter Notebook
-
Install Jupyter Notebook
python3 -m venv .venv .venv\Scripts\activate pip install jupyter -
Install necessary libraries
choco install python pip install pandas pip install numpy pip install matplotlib pip install seaborn pip install scikit-learn
Resources:
https://github.com/SnowpitData/AvscienceServer
https://github.com/abkfenris/snowpit/tree/master/snowpit
https://github.com/ArcticSnow/snowpyt
http://caaml.org/Schemas/V4.2/Doc/#complexType_RescuedByBaseType_Link0BC1FC30
https://github.com/ronimos/snowpack/tree/main
Project Objectives:
- Create a data model and GitHub repository for working with CAAML files from the SnowPilot database (SnowPylot?)
- Use Jupyter Notebooks to analyze the data and answer research questions
- Summarize and present results at the Western Snow Conference in May 2025
To do Testing
- Add tests to check if updating library (Explore Pytest)
- Add tests to make sure parsing matches caaml file
- Test process Load file parse file check if parsing matches expected output
- Set up smaller tests ex. "test get_longitude"
Structure
- Make snowPilotObs class a shell
- Make separate caaml-parser class
- Input: caaml file, version. return: snowpit object
Create Package https://www.freecodecamp.org/news/build-your-first-python-package/ https://realpython.com/pypi-publish-python-package/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snowpylot-1.0.0.tar.gz.
File metadata
- Download URL: snowpylot-1.0.0.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f25a7b61e7067b3971c6333bb074c9bec9b49cd8fff623491ed4891795233aa2
|
|
| MD5 |
7abcaf415e291a0fa7224aeb316d0f39
|
|
| BLAKE2b-256 |
ec8ccd5890d261b018fd10d91e86bbda4b1e26457fd10af17bbd7e710ce4b508
|
File details
Details for the file snowpylot-1.0.0-py3-none-any.whl.
File metadata
- Download URL: snowpylot-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f1251c5a1c7964657db183ae35fca19d44b00e1679c4c54292e01fb93410619
|
|
| MD5 |
9804753991863a475a041a79a58fb268
|
|
| BLAKE2b-256 |
bebb72bda39037b5598effc316684635ea98c15b9914c85696430388016b4256
|