Skip to content

Commit

Permalink
fix(fao-reforestation): add iso to the SQL query
Browse files Browse the repository at this point in the history
  • Loading branch information
willian-viana committed Dec 29, 2023
1 parent 0df52e3 commit e7abf0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/widgets/forest-change/fao-reforest/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const parseData = createSelector(

return dataTrimmed?.map((d) => ({
...d,
label: d.iso,
label: d.name,
color: colors.main,
value: d.rate,
}));
Expand Down
2 changes: 1 addition & 1 deletion services/forest-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const NEW_SQL_QUERIES = {
faoExtent:
'SELECT iso, country, "planted forest (ha)" AS planted_forest__ha, "primary (ha)" AS primary_forest__ha, "naturally regenerating forest (ha)" AS regenerated_forest__ha, "forest (ha)" AS fao_treecover__ha, "total land area (ha)" as area_ha FROM data WHERE {location} AND year = {year}',
faoReforest:
'SELECT country AS iso, year, "reforestation (ha per year)" AS reforestation__rate, "forest expansion (ha per year)" AS fao_treecover_reforest__ha FROM table_1_forest_area_and_characteristics as fao WHERE fao.year = {yearRange} AND "reforestation (ha per year)" > 0 ORDER BY reforestation__rate DESC',
'SELECT iso, country AS name, year, "reforestation (ha per year)" AS reforestation__rate, "forest expansion (ha per year)" AS fao_treecover_reforest__ha FROM table_1_forest_area_and_characteristics as fao WHERE fao.year = {yearRange} AND "reforestation (ha per year)" > 0 ORDER BY reforestation__rate DESC',
faoDeforest:
'SELECT iso, country as name, "deforestation (ha per year)" as fao_treecover_deforest__ha, "reforestation (ha per year)" as fao_reforestation__ha, "forest expansion (ha per year)" as fao_expansion__ha, year FROM data where year = {yearRange}',
faoDeforestRank:
Expand Down

0 comments on commit e7abf0d

Please sign in to comment.