Skip to content

Commit cda7561

Browse files
authored
Merge pull request #462 from switchbox-data/396-ny-ancillary-generation
Add NYISO supply ancillary MC generation capability
2 parents ccd54c6 + dbfa65c commit cda7561

10 files changed

Lines changed: 1788 additions & 88 deletions

data/nyiso/ancillary/Justfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# NYISO ancillary service clearing prices (day-ahead hourly + real-time 5-min AS)
2+
#
3+
# Same recipe shape as data/isone/ancillary/Justfile: fetch, validate, prepare,
4+
# upload, update, clean. Default ``markets=rt`` (5-minute real-time)—finest MIS
5+
# resolution. Override: ``markets=dam`` (hourly day-ahead) or ``markets=both``.
6+
#
7+
# Run from repo root: just -f data/nyiso/ancillary/Justfile <recipe>
8+
# Or from this dir: just <recipe>
9+
10+
path_local_repo := `git rev-parse --show-toplevel`
11+
path_local_base := justfile_directory()
12+
path_local_parquet := path_local_base + "/parquet"
13+
14+
# Mirror ISO-NE: s3://data.sb/isone/ancillary/ → s3://data.sb/nyiso/ancillary/
15+
16+
path_s3_parquet := "s3://data.sb/nyiso/ancillary/"
17+
start := "2010-01"
18+
end := ""
19+
markets := "rt"
20+
21+
fetch:
22+
uv run python "{{ path_local_base }}/fetch_nyiso_as_prices_parquet.py" \
23+
--start "{{ start }}" --end "{{ end }}" \
24+
--path-local-parquet "{{ path_local_parquet }}" \
25+
--markets "{{ markets }}"
26+
27+
validate:
28+
uv run python "{{ path_local_base }}/validate_nyiso_as_prices_parquet.py" \
29+
--path-local-parquet "{{ path_local_parquet }}"
30+
31+
prepare: fetch validate
32+
33+
# Upload: syncs whatever is under parquet/ (resolution is determined at fetch time).
34+
upload:
35+
aws s3 sync "{{ path_local_parquet }}/" "{{ path_s3_parquet }}" \
36+
--exclude "*" --include "*.parquet"
37+
@echo "Uploaded to {{ path_s3_parquet }}"
38+
39+
update:
40+
uv run python "{{ path_local_base }}/update_nyiso_as_prices_to_latest.py" \
41+
--path-local-parquet "{{ path_local_parquet }}" \
42+
--path-s3-parquet "{{ path_s3_parquet }}" \
43+
--markets "{{ markets }}"
44+
45+
clean:
46+
rm -rf "{{ path_local_parquet }}"
47+
@echo "Removed parquet/"

0 commit comments

Comments
 (0)