Community Snow Observations has switched to a new API, built on top of AWS Lambda. Code can be found here
- Create virtualenv with necessary packages
conda env create --file environment.yml
- Activate virtualenv
conda activate cso_api
- Setup .env file
GOOGLE_API_KEY=<GOOGLE_API_KEY>
SNOWPILOT_USERNAME=<SNOWPILOT_USERNAME>
SNOWPILOT_PASSWORD=<SNOWPILOT_PASSWORD>
- Run application
python application.py
- Install package using conda or pip
conda install <package>
pip install <package>
- Update environment.yml
conda env export --no-build --file environment.yml
API Docs available at [https://communitysnowobs.docs.apiary.io/#]. Basic information about endpoints can also be found below.
Params:
- limit (int) (default = 1000) - Maximum number of records to return
- page (int) (default = 1) - Page number of results
- start (int) default = 1427458000000) - Earliest unix timestamp (in milliseconds) to return results from
- end (int) (default = current time) - Latest unix timestamp (in milliseconds) to return results from
- region (str) (default = None) - Region to return results from. Can be specified as a series of coordinates separated by
|
, e.g.<lat_1>,<long_1>|<lat_2>,<long_2>|<lat_3>,<long_3>
or as an encoded polyline
Params:
- lat (int) (default = None) - Latitude of SNODAS records to return
- long (int) (default = None) - Longitude of SNODAS records to return