Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new column in SWE data #64

Merged
merged 5 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v0.20.0 (2024-03-06)

* Support new SWE column: `percentPeakSWE`.


# v0.19.1 (2024-03-06)

* Fix ingest code to put legends in the location mandated by the specification.
Expand Down Expand Up @@ -33,7 +38,7 @@
* Change of variable ids.


* # v0.17.0 (2024-02-08)
# v0.17.0 (2024-02-08)

* Overhaul and document interfaces with Snow Surface Properties and Snow Water
Equivalent providers.
Expand Down
2 changes: 1 addition & 1 deletion VERSION.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export SERVER_VERSION="v0.19.1"
export SERVER_VERSION="v0.20.0"
6 changes: 3 additions & 3 deletions doc/interfaces/incoming_snow_water_equivalent/data_points.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ provider: "External"
with no separator, and continuing until the end of the file. The beginning of the
body is indicated by a standard CSV header row.
* SWE data files **MUST** be named `SnowToday_USwest_{YYYYMMDD}_SWEsummary.txt`, e.g.
`SnowToday_USwest_20230920_SWEsummary.txt`.
`SnowToday_USwest_20240305_SWEsummary.txt`.
* SWE data files **MUST** be pushed, one at a time, to the incoming dir, e.g.
`{incomingDir}/SnowToday_USwest_20230920_SWEsummary.txt`.
`{incomingDir}/SnowToday_USwest_20240305_SWEsummary.txt`.
* SWE CSV data **MUST** include `Name`, `Lat`, `Lon`, `Elev_m`, `SWE`, `normSWE`,
`dSWE` columns.
* SWE CSV data **MAY** include additional columns, but the ingest process will drop
them.

<details>
<summary>Example</summary>
```{.yaml filename="SnowToday_USwest_20230920_SWEsummary.txt (example)" include="example_data/SnowToday_USwest_20230920_SWEsummary.txt"}
```{.yaml filename="SnowToday_USwest_20240305_SWEsummary.txt (example)" include="example_data/SnowToday_USwest_20240305_SWEsummary.txt"}
```
</details>

This file was deleted.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions snow_today_webapp_ingest/ingest/legends.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def generate_swe_legends(
colormap_id = variable_params["colormapId"]
colormap = colormaps_json[str(colormap_id)]["colors"]

to_path.mkdir(exist_ok=True)
to_path.mkdir(exist_ok=True, parents=True)
make_legend(
colormap=colormap,
# This value range could be static every day, or it could change
Expand Down Expand Up @@ -81,7 +81,7 @@ def generate_ssp_legends(
output_fn = f"{region_id}_{variable_id}.svg"
output_fp = to_path / output_fn

to_path.mkdir(exist_ok=True)
to_path.mkdir(exist_ok=True, parents=True)
make_legend(
colormap=colormap,
# This value range could be static every day, or it could change
Expand Down
1 change: 1 addition & 0 deletions snow_today_webapp_ingest/ingest/swe_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'Elev_m',
'SWE',
'normSWE',
'percentPeakSWE',
'dSWE',
'State',
'HUC02',
Expand Down
Loading