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

Add regions to gcp gcb #66

Merged
merged 8 commits into from
Apr 18, 2022
4 changes: 2 additions & 2 deletions gcp_gcb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Dataset constants.
DATASET_NAME = "Global Carbon Budget"
DATASET_AUTHORS = "Global Carbon Project"
DATASET_VERSION = "2021"
DATASET_VERSION = "v2021"
DATASET_LINK = "https://doi.org/10.18160/gcp-2021"
DATASET_RETRIEVED_DATE = "4-November-2021"
DATASET_RETRIEVED_DATE = "14-April-2022"
DATASET_DIR = os.path.dirname(__file__).split("/")[-1]
DATASET_NAMESPACE = f"{DATASET_DIR}@{DATASET_VERSION}"
CONFIGPATH = os.path.join(DATASET_DIR, "config")
Expand Down
10 changes: 5 additions & 5 deletions gcp_gcb/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ def _construct_source(
),
),
"derived_gdp": _construct_source(
name=f"Our World in Data based on the {DATASET_AUTHORS} and {gdp_source['s_name']}",
dataPublishedBy=f"Our World in Data based on the {DATASET_AUTHORS} and {gdp_source['s_name']}",
dataPublisherSource=f"{default_data_publisher_source} and {gdp_source['s_name']}",
name=f"Our World in Data based on the {DATASET_AUTHORS} and {gdp_source['source']['name']}",
dataPublishedBy=f"Our World in Data based on the {DATASET_AUTHORS} and {gdp_source['source']['name']}",
dataPublisherSource=f"{default_data_publisher_source} and {gdp_source['source']['name']}",
appendAdditionalInfo=(
f"\n\nGDP figures are sourced from "
f"{gdp_source['source']['dataPublishedBy']} "
Expand Down Expand Up @@ -530,12 +530,12 @@ def population_id(self) -> int:
@property
def gdp_id(self) -> int:
"""OWID variable ID for the latest Maddison GDP series"""
return 146201
return 417484

@property
def primary_energy_id(self) -> int:
"""OWID variable ID for the latest primary energy consumption series"""
return 143360
return 413912

@property
def variables_to_drop(self) -> List[str]:
Expand Down
Loading