From 77f7d644fbd2dad27c1f11189366ee7dff4ae7c4 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Wed, 4 Sep 2024 18:09:45 -0700 Subject: [PATCH 1/2] Refactor JSON mapping keys from "account", "beneficiary", and "note" to "retirement_account", "retirement_beneficiary", and "retirement_note". --- .../configs/credits-raw-columns-mapping.json | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/offsets_db_data/configs/credits-raw-columns-mapping.json b/offsets_db_data/configs/credits-raw-columns-mapping.json index 1b1c98c..a575d57 100644 --- a/offsets_db_data/configs/credits-raw-columns-mapping.json +++ b/offsets_db_data/configs/credits-raw-columns-mapping.json @@ -1,130 +1,130 @@ { "american-carbon-registry": { "cancellations": { - "account": null, - "beneficiary": null, - "note": null, + "retirement_account": null, + "retirement_beneficiary": null, + "retirement_note": null, "project_id": "Project ID", "quantity": "Quantity of Credits", - "reason": null, + "retirement_reason": null, "transaction_date": "Status Effective (GMT)", "vintage": "Vintage" }, "issuances": { - "account": null, - "beneficiary": null, - "note": null, + "retirement_account": null, + "retirement_beneficiary": null, + "retirement_note": null, "project_id": "Project ID", "quantity": "Total Credits Issued", - "reason": null, + "retirement_reason": null, "transaction_date": "Date Issued (GMT)", "vintage": "Vintage" }, "retirements": { - "account": "Account Holder", - "beneficiary": null, - "note": "Purpose of Retirement", + "retirement_account": "Account Holder", + "retirement_beneficiary": null, + "retirement_note": "Purpose of Retirement", "project_id": "Project ID", "quantity": "Quantity of Credits", - "reason": "Retirement Reason", + "retirement_reason": "Retirement Reason", "transaction_date": "Status Effective (GMT)", "vintage": "Vintage" } }, "art-trees": { "cancellations": { - "account": null, - "beneficiary": null, - "note": null, + "retirement_account": null, + "retirement_beneficiary": null, + "retirement_note": null, "project_id": "Program ID", "quantity": "Quantity of Credits", - "reason": null, + "retirement_reason": null, "transaction_date": "Status Effective", "vintage": "Vintage" }, "issuances": { - "account": null, - "beneficiary": null, - "note": null, + "retirement_account": null, + "retirement_beneficiary": null, + "retirement_note": null, "project_id": "Program ID", "quantity": "Credits Verified", - "reason": null, + "retirement_reason": null, "transaction_date": "Date Approved", "vintage": "Vintage" }, "retirements": { - "account": "Account Holder", - "beneficiary": null, - "note": "Retirement Reason Details", + "retirement_account": "Account Holder", + "retirement_beneficiary": null, + "retirement_note": "Retirement Reason Details", "project_id": "Program ID", "quantity": "Quantity of Credits", - "reason": "Retirement Reason", + "retirement_reason": "Retirement Reason", "transaction_date": "Status Effective", "vintage": "Vintage" } }, "climate-action-reserve": { "cancellations": { - "account": null, - "beneficiary": null, - "note": null, + "retirement_account": null, + "retirement_beneficiary": null, + "retirement_note": null, "project_id": "Project ID", "quantity": "Quantity of Offset Credits", - "reason": null, + "retirement_reason": null, "transaction_date": "Status Effective", "vintage": "Vintage" }, "issuances": { - "account": null, - "beneficiary": null, - "note": null, + "retirement_account": null, + "retirement_beneficiary": null, + "retirement_note": null, "project_id": "Project ID", "quantity": "Total Offset Credits Issued", - "reason": null, + "retirement_reason": null, "transaction_date": "Date Issued", "vintage": "Vintage" }, "retirements": { - "account": "Account Holder", - "beneficiary": null, - "note": "Retirement Reason Details", + "retirement_account": "Account Holder", + "retirement_beneficiary": null, + "retirement_note": "Retirement Reason Details", "project_id": "Project ID", "quantity": "Quantity of Offset Credits", - "reason": "Retirement Reason", + "retirement_reason": "Retirement Reason", "transaction_date": "Status Effective", "vintage": "Vintage" } }, "gold-standard": { "issuances": { - "account": null, - "beneficiary": null, - "note": null, + "retirement_account": null, + "retirement_beneficiary": null, + "retirement_note": null, "project_id": "GSID", "quantity": "Quantity", - "reason": null, + "retirement_reason": null, "transaction_date": "Issuance Date", "vintage": "Vintage" }, "retirements": { - "account": null, - "beneficiary": "Using Entity", - "note": "Note", + "retirement_account": null, + "retirement_beneficiary": "Using Entity", + "retirement_note": "Note", "project_id": "GSID", "quantity": "Quantity", - "reason": null, + "retirement_reason": null, "transaction_date": "Retirement Date", "vintage": "Vintage" } }, "verra": { "transactions": { - "account": null, - "beneficiary": "Retirement Beneficiary", - "note": "Retirement Details", + "retirement_account": null, + "retirement_beneficiary": "Retirement Beneficiary", + "retirement_note": "Retirement Details", "project_id": null, "quantity": null, - "reason": "Retirement Reason", + "retirement_reason": "Retirement Reason", "transaction_date": null, "vintage": null } From 4d539b33a78adbe5a1de0bffba726e3fad29a57a Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Wed, 4 Sep 2024 18:11:11 -0700 Subject: [PATCH 2/2] sort keys --- .../configs/credits-raw-columns-mapping.json | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/offsets_db_data/configs/credits-raw-columns-mapping.json b/offsets_db_data/configs/credits-raw-columns-mapping.json index a575d57..d5a7d6c 100644 --- a/offsets_db_data/configs/credits-raw-columns-mapping.json +++ b/offsets_db_data/configs/credits-raw-columns-mapping.json @@ -1,31 +1,31 @@ { "american-carbon-registry": { "cancellations": { + "project_id": "Project ID", + "quantity": "Quantity of Credits", "retirement_account": null, "retirement_beneficiary": null, "retirement_note": null, - "project_id": "Project ID", - "quantity": "Quantity of Credits", "retirement_reason": null, "transaction_date": "Status Effective (GMT)", "vintage": "Vintage" }, "issuances": { + "project_id": "Project ID", + "quantity": "Total Credits Issued", "retirement_account": null, "retirement_beneficiary": null, "retirement_note": null, - "project_id": "Project ID", - "quantity": "Total Credits Issued", "retirement_reason": null, "transaction_date": "Date Issued (GMT)", "vintage": "Vintage" }, "retirements": { + "project_id": "Project ID", + "quantity": "Quantity of Credits", "retirement_account": "Account Holder", "retirement_beneficiary": null, "retirement_note": "Purpose of Retirement", - "project_id": "Project ID", - "quantity": "Quantity of Credits", "retirement_reason": "Retirement Reason", "transaction_date": "Status Effective (GMT)", "vintage": "Vintage" @@ -33,31 +33,31 @@ }, "art-trees": { "cancellations": { + "project_id": "Program ID", + "quantity": "Quantity of Credits", "retirement_account": null, "retirement_beneficiary": null, "retirement_note": null, - "project_id": "Program ID", - "quantity": "Quantity of Credits", "retirement_reason": null, "transaction_date": "Status Effective", "vintage": "Vintage" }, "issuances": { + "project_id": "Program ID", + "quantity": "Credits Verified", "retirement_account": null, "retirement_beneficiary": null, "retirement_note": null, - "project_id": "Program ID", - "quantity": "Credits Verified", "retirement_reason": null, "transaction_date": "Date Approved", "vintage": "Vintage" }, "retirements": { + "project_id": "Program ID", + "quantity": "Quantity of Credits", "retirement_account": "Account Holder", "retirement_beneficiary": null, "retirement_note": "Retirement Reason Details", - "project_id": "Program ID", - "quantity": "Quantity of Credits", "retirement_reason": "Retirement Reason", "transaction_date": "Status Effective", "vintage": "Vintage" @@ -65,31 +65,31 @@ }, "climate-action-reserve": { "cancellations": { + "project_id": "Project ID", + "quantity": "Quantity of Offset Credits", "retirement_account": null, "retirement_beneficiary": null, "retirement_note": null, - "project_id": "Project ID", - "quantity": "Quantity of Offset Credits", "retirement_reason": null, "transaction_date": "Status Effective", "vintage": "Vintage" }, "issuances": { + "project_id": "Project ID", + "quantity": "Total Offset Credits Issued", "retirement_account": null, "retirement_beneficiary": null, "retirement_note": null, - "project_id": "Project ID", - "quantity": "Total Offset Credits Issued", "retirement_reason": null, "transaction_date": "Date Issued", "vintage": "Vintage" }, "retirements": { + "project_id": "Project ID", + "quantity": "Quantity of Offset Credits", "retirement_account": "Account Holder", "retirement_beneficiary": null, "retirement_note": "Retirement Reason Details", - "project_id": "Project ID", - "quantity": "Quantity of Offset Credits", "retirement_reason": "Retirement Reason", "transaction_date": "Status Effective", "vintage": "Vintage" @@ -97,21 +97,21 @@ }, "gold-standard": { "issuances": { + "project_id": "GSID", + "quantity": "Quantity", "retirement_account": null, "retirement_beneficiary": null, "retirement_note": null, - "project_id": "GSID", - "quantity": "Quantity", "retirement_reason": null, "transaction_date": "Issuance Date", "vintage": "Vintage" }, "retirements": { + "project_id": "GSID", + "quantity": "Quantity", "retirement_account": null, "retirement_beneficiary": "Using Entity", "retirement_note": "Note", - "project_id": "GSID", - "quantity": "Quantity", "retirement_reason": null, "transaction_date": "Retirement Date", "vintage": "Vintage" @@ -119,11 +119,11 @@ }, "verra": { "transactions": { + "project_id": null, + "quantity": null, "retirement_account": null, "retirement_beneficiary": "Retirement Beneficiary", "retirement_note": "Retirement Details", - "project_id": null, - "quantity": null, "retirement_reason": "Retirement Reason", "transaction_date": null, "vintage": null