Skip to content

Commit

Permalink
4121 - Bulk download: for 2025, include 2c and 2d total table (#4124)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorja authored Nov 18, 2024
1 parent f6d6335 commit 7ca93f6
Showing 1 changed file with 60 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const entries = (
]
: []

const carbonStock = {
const carbonStockAvg = {
tableName: cycle.name === '2020' ? 'carbonStock' : 'carbonStockAvg',
variables: [
{
Expand All @@ -64,6 +64,37 @@ export const entries = (
],
}

const carbonStockTotal =
cycle.name === '2020'
? []
: [
{
tableName: 'carbonStockTotal',
variables: [
{
variableName: 'carbon_forest_above_ground',
csvColumn: '2d_carbon_agb_total',
},
{
variableName: 'carbon_forest_below_ground',
csvColumn: '2d_carbon_bgb_total',
},
{
variableName: 'carbon_forest_deadwood',
csvColumn: '2d_carbon_dw_total',
},
{
variableName: 'carbon_forest_litter',
csvColumn: '2d_carbon_litter_total',
},
{
variableName: 'carbon_forest_soil',
csvColumn: '2d_carbon_soil_total',
},
],
},
]

const degradedForest = {
tableName: cycle.name === '2020' ? 'degradedForest' : 'degradedForestMonitoring2025',
variables: [
Expand Down Expand Up @@ -105,7 +136,7 @@ export const entries = (
]
: []

const biomassStock = {
const biomassStockAvg = {
tableName: cycle.name === '2020' ? 'biomassStock' : 'biomassStockAvg',
variables: [
{
Expand All @@ -123,6 +154,29 @@ export const entries = (
],
}

const biomassStockTotal =
cycle.name === '2020'
? []
: [
{
tableName: 'biomassStockTotal',
variables: [
{
variableName: 'forest_above_ground',
csvColumn: '2c_agb_total',
},
{
variableName: 'forest_below_ground',
csvColumn: '2c_bgb_total',
},
{
variableName: 'forest_deadwood',
csvColumn: '2c_dwb_total',
},
],
},
]

const growingStockComposition = {
tableName: cycle.name === '2020' ? 'growingStockComposition' : 'growingStockComposition2025',
variables: [
Expand Down Expand Up @@ -427,8 +481,10 @@ export const entries = (
],
},
growingStockComposition,
biomassStock,
carbonStock,
biomassStockAvg,
...biomassStockTotal,
carbonStockAvg,
...carbonStockTotal,
{
tableName: 'carbonStockSoilDepth',
variables: [
Expand Down

0 comments on commit 7ca93f6

Please sign in to comment.