From 7fd17e46a8dc55f0c32c283acadcbcc144dd8831 Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Fri, 29 Nov 2024 11:01:14 +0100 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=93=8A=20Add=20data=20on=20battery=20?= =?UTF-8?q?cell=20prices?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 189a1eb7f8281b84c64f87e4382a358b69c14571 Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Fri, 29 Nov 2024 11:47:26 +0100 Subject: [PATCH 2/7] Add data on battery cell prices --- dag/energy.yml | 15 ++++++ .../2024-11-29/battery_cell_prices.meta.yml | 22 +++++++++ .../2024-11-29/battery_cell_prices.py | 46 +++++++++++++++++++ .../2024-11-29/battery_cell_prices.py | 28 +++++++++++ .../2024-11-29/battery_cell_prices.py | 33 +++++++++++++ .../2024-11-29/battery_cell_prices.py | 25 ++++++++++ .../2024-11-29/battery_cell_prices.xlsx.dvc | 30 ++++++++++++ 7 files changed, 199 insertions(+) create mode 100644 etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml create mode 100644 etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py create mode 100644 etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py create mode 100644 etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py create mode 100644 snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py create mode 100644 snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc diff --git a/dag/energy.yml b/dag/energy.yml index 0ec3bdb2621..44b6adbeb6e 100644 --- a/dag/energy.yml +++ b/dag/energy.yml @@ -228,3 +228,18 @@ steps: # data://grapher/energy/2024-11-15/photovoltaic_cost_and_capacity: - data://garden/energy/2024-11-15/photovoltaic_cost_and_capacity + # + # Benchmark Mineral Intelligence - Battery cell prices. + # + data-private://meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices: + - snapshot-private://benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx + # + # Benchmark Mineral Intelligence - Battery cell prices. + # + data-private://garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices: + - data-private://meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices + # + # Benchmark Mineral Intelligence - Battery cell prices. + # + data-private://grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices: + - data-private://garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices diff --git a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml new file mode 100644 index 00000000000..cc929245540 --- /dev/null +++ b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml @@ -0,0 +1,22 @@ +definitions: + common: + processing_level: minor + presentation: + topic_tags: + - Energy + +dataset: + update_period_days: 365 + +tables: + battery_cell_prices: + variables: + battery_cell_price: + title: "Average battery cell price" + unit: "current US$ per kilowatt-hour" + short_unit: "$/kWh" + description_short: |- + Average price of lithium ion battery cells per [kilowatt-hour](#dod:watt-hours). + display: + numDecimalPlaces: 2 + diff --git a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py new file mode 100644 index 00000000000..c1d995b3c59 --- /dev/null +++ b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py @@ -0,0 +1,46 @@ +"""Load a meadow dataset and create a garden dataset.""" + +from etl.helpers import PathFinder, create_dataset + +# Get paths and naming conventions for current step. +paths = PathFinder(__file__) + + +# Select and rename columns. +COLUMNS = { + "year": "year", + "global_avg__cell_price__dollar_kwh": "battery_cell_price", +} + + +def run(dest_dir: str) -> None: + # + # Load inputs. + # + # Load meadow dataset. + ds_meadow = paths.load_dataset("battery_cell_prices") + + # Read table from meadow dataset. + tb = ds_meadow.read("battery_cell_prices") + + # + # Process data. + # + # Select and rename columns. + tb = tb[COLUMNS.keys()].rename(columns=COLUMNS, errors="raise") + + # Clean year column. + tb["year"] = tb["year"].str.strip().str[0:4].astype("Int64") + + # Add country column. + tb["country"] = "World" + + # Improve table format. + tb = tb.format(["country", "year"]) + + # + # Save outputs. + # + # Create a new garden dataset. + ds_garden = create_dataset(dest_dir, tables=[tb], check_variables_metadata=True) + ds_garden.save() diff --git a/etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py b/etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py new file mode 100644 index 00000000000..fc377d8c4e8 --- /dev/null +++ b/etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py @@ -0,0 +1,28 @@ +"""Load a garden dataset and create a grapher dataset.""" + +from etl.helpers import PathFinder, create_dataset + +# Get paths and naming conventions for current step. +paths = PathFinder(__file__) + + +def run(dest_dir: str) -> None: + # + # Load inputs. + # + # Load garden dataset. + ds_garden = paths.load_dataset("battery_cell_prices") + + # Read table from garden dataset. + tb = ds_garden.read("battery_cell_prices", reset_index=False) + + # + # Save outputs. + # + # Create a new grapher dataset with the same metadata as the garden dataset. + ds_grapher = create_dataset( + dest_dir, tables=[tb], check_variables_metadata=True, default_metadata=ds_garden.metadata + ) + + # Save changes in the new grapher dataset. + ds_grapher.save() diff --git a/etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py b/etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py new file mode 100644 index 00000000000..7e027f880f7 --- /dev/null +++ b/etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py @@ -0,0 +1,33 @@ +"""Load a snapshot and create a meadow dataset.""" + +from etl.helpers import PathFinder, create_dataset + +# Get paths and naming conventions for current step. +paths = PathFinder(__file__) + + +def run(dest_dir: str) -> None: + # + # Load inputs. + # + # Retrieve snapshot. + snap = paths.load_snapshot("battery_cell_prices.xlsx") + + # Load data from snapshot. + tb = snap.read(skiprows=8) + + # + # Process data. + # + # Remove empty columns. + tb = tb.dropna(axis=1, how="all") + + # Ensure all columns are snake-case, set an appropriate index, and sort conveniently. + tb = tb.format(["year"]) + + # + # Save outputs. + # + # Create a new meadow dataset. + ds_meadow = create_dataset(dest_dir, tables=[tb], check_variables_metadata=True, default_metadata=snap.metadata) + ds_meadow.save() diff --git a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py new file mode 100644 index 00000000000..fa0dd194a6e --- /dev/null +++ b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py @@ -0,0 +1,25 @@ +"""Script to create a snapshot of dataset.""" + +from pathlib import Path + +import click + +from etl.snapshot import Snapshot + +# Version for current snapshot dataset. +SNAPSHOT_VERSION = Path(__file__).parent.name + + +@click.command() +@click.option("--upload/--skip-upload", default=True, type=bool, help="Upload dataset to Snapshot") +@click.option("--path-to-file", "-f", prompt=True, type=str, help="Path to local data file.") +def main(path_to_file: str, upload: bool) -> None: + # Create a new snapshot. + snap = Snapshot(f"benchmark_mineral_intelligence/{SNAPSHOT_VERSION}/battery_cell_prices.xlsx") + + # Copy local data file to snapshots data folder, add file to DVC and upload to S3. + snap.create_snapshot(filename=path_to_file, upload=upload) + + +if __name__ == "__main__": + main() diff --git a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc new file mode 100644 index 00000000000..507a09e3f3c --- /dev/null +++ b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc @@ -0,0 +1,30 @@ +# Learn more at: +# http://docs.owid.io/projects/etl/architecture/metadata/reference/ +meta: + origin: + # Data product / Snapshot + title: Lithium ion batteries prices + description: |- + Historic prices on lithium ion battery cells. + date_published: "2024-11-26" + + # Citation + producer: Benchmark Mineral Intelligence + citation_full: |- + Benchmark Mineral Intelligence - Lithium ion batteries prices (2024). + + # Files + url_main: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table + date_accessed: 2024-11-29 + + # License + license: + name: © Benchmark Mineral Intelligence 2024 + url: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table + + is_public: false + +outs: + - md5: 525d53a612d1552b1ba4bfe480a9f1b8 + size: 153096 + path: battery_cell_prices.xlsx From d6a4a9f8fccc277ac503f5b846b7b67ccbfcf73a Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Fri, 29 Nov 2024 15:35:13 +0100 Subject: [PATCH 3/7] Avoid downloads in chart --- .../2024-11-29/battery_cell_prices.meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml index cc929245540..10f385175a8 100644 --- a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml +++ b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml @@ -6,6 +6,7 @@ definitions: - Energy dataset: + non_redistributable: true update_period_days: 365 tables: From 1c3b1228acdfbc2bf809cb2c7c8fba10f2122fc0 Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Mon, 9 Dec 2024 15:06:12 +0100 Subject: [PATCH 4/7] Add data on battery prices by chemistry --- dag/energy.yml | 1 + .../2024-11-29/battery_cell_prices.meta.yml | 36 ++++++++- .../2024-11-29/battery_cell_prices.py | 76 ++++++++++++++++--- .../2024-11-29/battery_cell_prices.py | 13 +++- .../2024-11-29/battery_cell_prices.py | 12 ++- .../battery_cell_prices_by_chemistry.py | 25 ++++++ .../battery_cell_prices_by_chemistry.xlsx.dvc | 29 +++++++ 7 files changed, 175 insertions(+), 17 deletions(-) create mode 100644 snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.py create mode 100644 snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc diff --git a/dag/energy.yml b/dag/energy.yml index 9f3009ccbb6..91e6ff57f79 100644 --- a/dag/energy.yml +++ b/dag/energy.yml @@ -284,6 +284,7 @@ steps: # data-private://meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices: - snapshot-private://benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx + - snapshot-private://benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx # # Benchmark Mineral Intelligence - Battery cell prices. # diff --git a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml index 10f385175a8..f4dee0e4bff 100644 --- a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml +++ b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml @@ -9,15 +9,45 @@ dataset: non_redistributable: true update_period_days: 365 +# TODO: Add description key to explain how weighted averages are calculated (confirm with Benchmark) and what each of the battery chemistries are and where they are used. tables: battery_cell_prices: variables: battery_cell_price: - title: "Average battery cell price" + title: "Annual average battery cell price" unit: "current US$ per kilowatt-hour" short_unit: "$/kWh" description_short: |- - Average price of lithium ion battery cells per [kilowatt-hour](#dod:watt-hours). + Average annual price of lithium ion battery cells per [kilowatt-hour](#dod:watt-hours). + display: + numDecimalPlaces: 2 + battery_cell_prices_by_chemistry: + variables: + ncm_battery_cell_price: + # TODO: Define acronyms used for batteries. + title: "Quarterly NCM battery cell price" + unit: "current US$ per kilowatt-hour" + short_unit: "$/kWh" + description_short: |- + Average quarterly price of NCM battery cells per [kilowatt-hour](#dod:watt-hours). + display: + numDecimalPlaces: 2 + lfp_battery_cell_price: + title: "Quarterly LFP battery cell price" + unit: "current US$ per kilowatt-hour" + short_unit: "$/kWh" + description_short: |- + Average quarterly price of LFP battery cells per [kilowatt-hour](#dod:watt-hours). + display: + numDecimalPlaces: 2 + battery_cell_prices_combined: + variables: + price: + title: "Battery cell prices" + unit: "current US$ per kilowatt-hour" + short_unit: "$/kWh" + # TODO: Improve description. + description_short: |- + Battery prices per [kilowatt-hour](#dod:watt-hours). display: numDecimalPlaces: 2 - diff --git a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py index c1d995b3c59..422afb946fd 100644 --- a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py +++ b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py @@ -1,5 +1,8 @@ """Load a meadow dataset and create a garden dataset.""" +import owid.catalog.processing as pr +from owid.datautils.dataframes import map_series + from etl.helpers import PathFinder, create_dataset # Get paths and naming conventions for current step. @@ -7,10 +10,21 @@ # Select and rename columns. -COLUMNS = { +COLUMNS_ANNUAL = { "year": "year", "global_avg__cell_price__dollar_kwh": "battery_cell_price", } +COLUMNS_QUARTERLY = { + "date": "date", + "ncm_weighted_average_cell_price": "ncm_battery_cell_price", + "lfp_weighted_average_cell_price": "lfp_battery_cell_price", +} +# Mapping of battery chemistries. +CHEMISTRY_MAPPING = { + "battery_cell_price": "Average", + "ncm_battery_cell_price": "NCM", + "lfp_battery_cell_price": "LFP", +} def run(dest_dir: str) -> None: @@ -20,27 +34,71 @@ def run(dest_dir: str) -> None: # Load meadow dataset. ds_meadow = paths.load_dataset("battery_cell_prices") - # Read table from meadow dataset. - tb = ds_meadow.read("battery_cell_prices") + # Read table on annual data of historical battery prices (since 2014). + tb_annual = ds_meadow.read("battery_cell_prices") + + # Read table on quarterly data of battery prices by chemistry. + tb_quarterly = ds_meadow.read("battery_cell_prices_by_chemistry") # # Process data. # + # Process annual data on historical battery prices. + # Select and rename columns. - tb = tb[COLUMNS.keys()].rename(columns=COLUMNS, errors="raise") + tb_annual = tb_annual[COLUMNS_ANNUAL.keys()].rename(columns=COLUMNS_ANNUAL, errors="raise") # Clean year column. - tb["year"] = tb["year"].str.strip().str[0:4].astype("Int64") + tb_annual["year"] = tb_annual["year"].str.strip().str[0:4].astype("Int64") # Add country column. - tb["country"] = "World" + tb_annual["country"] = "World" + + # Process quarterly data on battery prices by chemistry. + + # Select and rename columns. + tb_quarterly = tb_quarterly[COLUMNS_QUARTERLY.keys()].rename(columns=COLUMNS_QUARTERLY, errors="raise") + + # Clean date column. + quarter_to_date = {"Q1": "-02-15", "Q2": "-05-15", "Q3": "-08-15", "Q4": "-11-15"} + tb_quarterly["date"] = [date[-4:] + quarter_to_date[date[:2]] for date in tb_quarterly["date"]] + + # Add country column. + tb_quarterly["country"] = "World" + + # Create a combined table. + + # For annual data, assume the date is July 1st of each year. + _tb_annual = tb_annual.copy() + _tb_annual["date"] = _tb_annual["year"].astype(str) + "-07-01" + + # Combine tables. + tb_combined = pr.concat([_tb_annual.drop(columns=["year"]), tb_quarterly]) + + # Remove country column, and use the battery chemistry as "country" instead. + tb_combined = tb_combined.drop(columns=["country"]).melt(id_vars=["date"], var_name="chemistry", value_name="price") + + # Rename battery chemistries. + tb_combined["chemistry"] = map_series( + tb_combined["chemistry"], CHEMISTRY_MAPPING, warn_on_missing_mappings=True, warn_on_unused_mappings=True + ) + + # Remove empty rows. + tb_combined = tb_combined.dropna().reset_index(drop=True) - # Improve table format. - tb = tb.format(["country", "year"]) + # Improve table formats. + tb_annual = tb_annual.format(["country", "year"]) + tb_quarterly = tb_quarterly.format(["country", "date"], short_name="battery_cell_prices_by_chemistry") + tb_combined = tb_combined.format(["chemistry", "date"], short_name="battery_cell_prices_combined") # # Save outputs. # # Create a new garden dataset. - ds_garden = create_dataset(dest_dir, tables=[tb], check_variables_metadata=True) + ds_garden = create_dataset( + dest_dir, + tables=[tb_annual, tb_quarterly, tb_combined], + check_variables_metadata=True, + default_metadata=ds_meadow.metadata, + ) ds_garden.save() diff --git a/etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py b/etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py index fc377d8c4e8..6c843fefa2a 100644 --- a/etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py +++ b/etl/steps/data/grapher/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py @@ -13,8 +13,17 @@ def run(dest_dir: str) -> None: # Load garden dataset. ds_garden = paths.load_dataset("battery_cell_prices") - # Read table from garden dataset. - tb = ds_garden.read("battery_cell_prices", reset_index=False) + # Read combined table from garden dataset. + tb = ds_garden.read("battery_cell_prices_combined") + + # + # Process data. + # + # Rename columns to adapt to grapher requirements. + tb = tb.rename(columns={"chemistry": "country"}, errors="raise") + + # Improve table format. + tb = tb.format(["country", "date"]) # # Save outputs. diff --git a/etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py b/etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py index 7e027f880f7..a1ccf7c71e7 100644 --- a/etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py +++ b/etl/steps/data/meadow/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.py @@ -10,24 +10,30 @@ def run(dest_dir: str) -> None: # # Load inputs. # - # Retrieve snapshot. + # Retrieve snapshots. snap = paths.load_snapshot("battery_cell_prices.xlsx") + snap_by_chemistry = paths.load_snapshot("battery_cell_prices_by_chemistry.xlsx") - # Load data from snapshot. + # Load data from snapshots. tb = snap.read(skiprows=8) + tb_by_chemistry = snap_by_chemistry.read(skiprows=7) # # Process data. # # Remove empty columns. tb = tb.dropna(axis=1, how="all") + tb_by_chemistry = tb_by_chemistry.dropna(axis=1, how="all") # Ensure all columns are snake-case, set an appropriate index, and sort conveniently. tb = tb.format(["year"]) + tb_by_chemistry = tb_by_chemistry.format(["date"]) # # Save outputs. # # Create a new meadow dataset. - ds_meadow = create_dataset(dest_dir, tables=[tb], check_variables_metadata=True, default_metadata=snap.metadata) + ds_meadow = create_dataset( + dest_dir, tables=[tb, tb_by_chemistry], check_variables_metadata=True, default_metadata=snap.metadata + ) ds_meadow.save() diff --git a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.py b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.py new file mode 100644 index 00000000000..35c5fca947b --- /dev/null +++ b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.py @@ -0,0 +1,25 @@ +"""Script to create a snapshot of dataset.""" + +from pathlib import Path + +import click + +from etl.snapshot import Snapshot + +# Version for current snapshot dataset. +SNAPSHOT_VERSION = Path(__file__).parent.name + + +@click.command() +@click.option("--upload/--skip-upload", default=True, type=bool, help="Upload dataset to Snapshot") +@click.option("--path-to-file", "-f", prompt=True, type=str, help="Path to local data file.") +def main(path_to_file: str, upload: bool) -> None: + # Create a new snapshot. + snap = Snapshot(f"benchmark_mineral_intelligence/{SNAPSHOT_VERSION}/battery_cell_prices_by_chemistry.xlsx") + + # Copy local data file to snapshots data folder, add file to DVC and upload to S3. + snap.create_snapshot(filename=path_to_file, upload=upload) + + +if __name__ == "__main__": + main() diff --git a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc new file mode 100644 index 00000000000..d267c1e5500 --- /dev/null +++ b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc @@ -0,0 +1,29 @@ +# Learn more at: +# http://docs.owid.io/projects/etl/architecture/metadata/reference/ +meta: + origin: + # Data product / Snapshot + title: Batteries prices by chemistry + description: |- + Prices of different types of battery cells. + date_published: "2024-11-26" + + # Citation + producer: Benchmark Mineral Intelligence + citation_full: |- + Benchmark Mineral Intelligence - Batteries prices by chemistry (2024). + + # Files + url_main: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table + date_accessed: 2024-11-29 + + # License + license: + name: © Benchmark Mineral Intelligence 2024 + url: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table + + is_public: false +outs: + - md5: 3ddaab5198d57080c72e87760df8b26a + size: 153127 + path: battery_cell_prices_by_chemistry.xlsx From b1e975fbceaa3def824cee213886b5760f9f75a6 Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Mon, 9 Dec 2024 15:50:30 +0100 Subject: [PATCH 5/7] Improve metadata --- .../2024-11-29/battery_cell_prices.meta.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml index f4dee0e4bff..49a0ec12c78 100644 --- a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml +++ b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml @@ -9,7 +9,6 @@ dataset: non_redistributable: true update_period_days: 365 -# TODO: Add description key to explain how weighted averages are calculated (confirm with Benchmark) and what each of the battery chemistries are and where they are used. tables: battery_cell_prices: variables: @@ -24,30 +23,30 @@ tables: battery_cell_prices_by_chemistry: variables: ncm_battery_cell_price: - # TODO: Define acronyms used for batteries. - title: "Quarterly NCM battery cell price" + title: Quarterly NCM battery cell price unit: "current US$ per kilowatt-hour" short_unit: "$/kWh" description_short: |- - Average quarterly price of NCM battery cells per [kilowatt-hour](#dod:watt-hours). + Average quarterly price of lithium nickel manganese cobalt oxide (NMC) battery cells per [kilowatt-hour](#dod:watt-hours). Prices are expressed in US dollars, not adjusted for inflation. display: numDecimalPlaces: 2 lfp_battery_cell_price: - title: "Quarterly LFP battery cell price" + title: Quarterly LFP battery cell price unit: "current US$ per kilowatt-hour" short_unit: "$/kWh" description_short: |- - Average quarterly price of LFP battery cells per [kilowatt-hour](#dod:watt-hours). + Average quarterly price of lithium iron phosphate (LFP) battery cells per [kilowatt-hour](#dod:watt-hours). Prices are expressed in US dollars, not adjusted for inflation. display: numDecimalPlaces: 2 battery_cell_prices_combined: variables: price: - title: "Battery cell prices" + title: Battery cell prices unit: "current US$ per kilowatt-hour" short_unit: "$/kWh" - # TODO: Improve description. description_short: |- - Battery prices per [kilowatt-hour](#dod:watt-hours). + Average price of battery cells per [kilowatt-hour](#dod:watt-hours). The data includes quarterly average prices of different types of lithium ion batteries, as well as an annual average. Prices are expressed in US dollars, not adjusted for inflation. + description_key: + - Lithium iron phosphate (LFP) and lithium nickel manganese cobalt oxide (NMC) are two types of rechargeable batteries commonly used in electric vehicles and renewable energy storage. display: numDecimalPlaces: 2 From 454c44ca1546d41a7e01737a4306e1746232a15f Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Mon, 9 Dec 2024 17:25:12 +0100 Subject: [PATCH 6/7] Rename NMC->NCM for consistency with Benchmark nomenclature in the dataset --- .../2024-11-29/battery_cell_prices.meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml index 49a0ec12c78..523625b9723 100644 --- a/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml +++ b/etl/steps/data/garden/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.meta.yml @@ -27,7 +27,7 @@ tables: unit: "current US$ per kilowatt-hour" short_unit: "$/kWh" description_short: |- - Average quarterly price of lithium nickel manganese cobalt oxide (NMC) battery cells per [kilowatt-hour](#dod:watt-hours). Prices are expressed in US dollars, not adjusted for inflation. + Average quarterly price of lithium nickel manganese cobalt oxide (NCM) battery cells per [kilowatt-hour](#dod:watt-hours). Prices are expressed in US dollars, not adjusted for inflation. display: numDecimalPlaces: 2 lfp_battery_cell_price: @@ -47,6 +47,6 @@ tables: description_short: |- Average price of battery cells per [kilowatt-hour](#dod:watt-hours). The data includes quarterly average prices of different types of lithium ion batteries, as well as an annual average. Prices are expressed in US dollars, not adjusted for inflation. description_key: - - Lithium iron phosphate (LFP) and lithium nickel manganese cobalt oxide (NMC) are two types of rechargeable batteries commonly used in electric vehicles and renewable energy storage. + - Lithium iron phosphate (LFP) and lithium nickel manganese cobalt oxide (NCM) are two types of rechargeable batteries commonly used in electric vehicles and renewable energy storage. display: numDecimalPlaces: 2 From b4b4abb4d85bd3db772cbd0b9e22702ddd41d559 Mon Sep 17 00:00:00 2001 From: Pablo Rosado Date: Tue, 10 Dec 2024 09:56:07 +0100 Subject: [PATCH 7/7] Change Benchmark URL as they suggested --- .../2024-11-29/battery_cell_prices.xlsx.dvc | 2 +- .../2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc index 507a09e3f3c..6b74a5b5086 100644 --- a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc +++ b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices.xlsx.dvc @@ -14,7 +14,7 @@ meta: Benchmark Mineral Intelligence - Lithium ion batteries prices (2024). # Files - url_main: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table + url_main: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table?utm_source=Our%20World%20in%20Data&utm_medium=Website&utm_campaign=Battery%20cell%20data date_accessed: 2024-11-29 # License diff --git a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc index d267c1e5500..e1f26858eeb 100644 --- a/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc +++ b/snapshots/benchmark_mineral_intelligence/2024-11-29/battery_cell_prices_by_chemistry.xlsx.dvc @@ -14,7 +14,7 @@ meta: Benchmark Mineral Intelligence - Batteries prices by chemistry (2024). # Files - url_main: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table + url_main: https://www.benchmarkminerals.com/lithium-ion-batteries/lithium-ion-batteries-prices/table?utm_source=Our%20World%20in%20Data&utm_medium=Website&utm_campaign=Battery%20cell%20data date_accessed: 2024-11-29 # License