Move custom batteries from web.py into data/raw/extra_batteries.json
This commit is contained in:
parent
d6a3d53a04
commit
ae994a7ded
3 changed files with 25 additions and 22 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -22,5 +22,6 @@ data/processed/*
|
||||||
!data/raw/solar_hourly.csv
|
!data/raw/solar_hourly.csv
|
||||||
!data/raw/thuisbatterijgids_catalog.csv
|
!data/raw/thuisbatterijgids_catalog.csv
|
||||||
!data/raw/thuisbatterijgids_catalog.json
|
!data/raw/thuisbatterijgids_catalog.json
|
||||||
|
!data/raw/extra_batteries.json
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
||||||
17
data/raw/extra_batteries.json
Normal file
17
data/raw/extra_batteries.json
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": -1,
|
||||||
|
"title": "Tesla Powerwall 3 (installed)",
|
||||||
|
"url": "https://www.tesla.com/powerwall",
|
||||||
|
"brand": "Tesla",
|
||||||
|
"brand_slug": "tesla",
|
||||||
|
"capacity": 13.5,
|
||||||
|
"power_continuous": 11500,
|
||||||
|
"price": 9500,
|
||||||
|
"price_per_kwh": 704,
|
||||||
|
"review_score": null,
|
||||||
|
"recommended": false,
|
||||||
|
"installation": "hybrid",
|
||||||
|
"image_url": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -49,28 +49,13 @@ _AVG_CONSUMER_BASE = float(_BASE_DF["eur_per_kwh"].mean())
|
||||||
with open(DATA_DIR / "thuisbatterijgids_catalog.json") as _f:
|
with open(DATA_DIR / "thuisbatterijgids_catalog.json") as _f:
|
||||||
_CATALOG = json.load(_f)
|
_CATALOG = json.load(_f)
|
||||||
|
|
||||||
# Hybrid / DC-coupled units — not on thuisbatterijgids.net (they only list
|
# Edit data/raw/extra_batteries.json to add anything not on thuisbatterijgids.net
|
||||||
# plug-in), but useful as a reference point. Prices are NL street price incl.
|
# (hybrids, PV-DC-coupled units, alternative SKUs). Same schema as the scraped
|
||||||
# a typical install (since these can't be self-installed). Mark with
|
# catalog; set "installation" to "hybrid" for batteries that can export to grid.
|
||||||
# installation == "hybrid" so the LP runs with allows_export=True.
|
_EXTRAS_PATH = DATA_DIR / "extra_batteries.json"
|
||||||
HYBRID_EXTRAS = [
|
if _EXTRAS_PATH.exists():
|
||||||
{
|
with open(_EXTRAS_PATH) as _f:
|
||||||
"id": -1,
|
_CATALOG = _CATALOG + json.load(_f)
|
||||||
"title": "Tesla Powerwall 3 (installed)",
|
|
||||||
"url": "https://www.tesla.com/powerwall",
|
|
||||||
"brand": "Tesla",
|
|
||||||
"brand_slug": "tesla",
|
|
||||||
"capacity": 13.5,
|
|
||||||
"power_continuous": 11500,
|
|
||||||
"price": 9500,
|
|
||||||
"price_per_kwh": 704,
|
|
||||||
"review_score": None,
|
|
||||||
"recommended": False,
|
|
||||||
"installation": "hybrid",
|
|
||||||
"image_url": "",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
_CATALOG = _CATALOG + HYBRID_EXTRAS
|
|
||||||
|
|
||||||
|
|
||||||
def _category(power_kw: float, allows_export: bool) -> str:
|
def _category(power_kw: float, allows_export: bool) -> str:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue