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

Deploy #4856

Merged
merged 3 commits into from
Sep 23, 2024
Merged

Deploy #4856

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/widgets/forest-change/tree-loss/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ export default {
threshold: 30,
extentYear: 2000,
ifl: 2000,
startYear: MIN_YEAR,
endYear: MAX_YEAR,
},
getData: (params = {}) => {
const { adm0, adm1, adm2, type } = params || {};
Expand Down
4 changes: 3 additions & 1 deletion services/analysis-cached.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const SQL_QUERIES = {
treeCoverDensity:
'SELECT {select_location}, wri_tropical_tree_cover__decile, SUM(wri_tropical_tree_cover_extent__ha) AS wri_tropical_tree_cover_extent__ha FROM data {WHERE} AND wri_tropical_tree_cover__decile >= 0 GROUP BY {location}, wri_tropical_tree_cover__decile ORDER BY {location}, wri_tropical_tree_cover__decile',
treeLossOTF:
'SELECT umd_tree_cover_loss__year, SUM(area__ha) FROM data WHERE umd_tree_cover_loss__year >= {startYear} AND umd_tree_cover_loss__year <= {endYear} AND umd_tree_cover_density_2000__threshold >= {threshold} GROUP BY umd_tree_cover_loss__year&geostore_id={geostoreId}',
'SELECT umd_tree_cover_loss__year, SUM(area__ha) FROM data WHERE umd_tree_cover_loss__year >= {startYear} AND umd_tree_cover_loss__year <= {endYear} AND umd_tree_cover_density_{extentYear}__threshold >= {threshold} GROUP BY umd_tree_cover_loss__year&geostore_id={geostoreId}',
treeLossOTFExtent:
'SELECT SUM(area__ha) FROM data WHERE umd_tree_cover_density_2000__threshold >= {threshold}&geostore_id={geostoreId}',
};
Expand Down Expand Up @@ -692,6 +692,7 @@ export const getTreeLossOTF = async (params) => {
geostore,
startYear,
endYear,
extentYear,
threshold,
} = params || {};

Expand All @@ -707,6 +708,7 @@ export const getTreeLossOTF = async (params) => {
.replace('{startYear}', startYear)
.replace('{endYear}', endYear)
.replace('{threshold}', threshold)
.replace('{extentYear}', extentYear)
);
const urlExtent = encodeURI(
`${urlForExtent + sqlExtent}`
Expand Down
Loading