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

Feature/2017 loss #3481

Merged
merged 11 commits into from
Jun 25, 2018
Merged
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
4 changes: 2 additions & 2 deletions app/assets/javascripts/map/views/layers/LossLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ define([
options: {
threshold: 30,
dataMaxZoom: 12,
urlTemplate: 'https://storage.googleapis.com/wri-public/Hansen_16/tiles/hansen_world/v1/tc{threshold}{/z}{/x}{/y}.png',
currentDate: ['2001-01-01','2017-01-01']
urlTemplate: 'https://storage.googleapis.com/wri-public/Hansen17/tiles/hansen_world/v1/tc{threshold}{/z}{/x}{/y}.png',
currentDate: ['2001-01-01','2018-01-01']
},

init: function(layer, options, map) {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/map/assets/layers/loss.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const OPTIONS = {
urlTemplate:
'https://storage.googleapis.com/wri-public/Hansen15/tiles/hansen_world/v1/tc{threshold}/{z}/{x}/{y}.png',
startYear: 2001,
endYear: 2016
endYear: 2017
};

class Loss extends Canvas {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
admins: ['country', 'region', 'subRegion'],
selectors: ['indicators', 'startYears', 'endYears', 'units'],
units: ['biomassCarbon', 'co2Emissions'],
yearRange: ['2001', '2016'],
yearRange: ['2001', '2017'],
metaKey: 'widget_carbon_emissions_tree_cover_loss',
type: 'loss',
colors: 'emissions',
Expand All @@ -32,7 +32,7 @@ export default {
unit: 'biomassCarbon',
threshold: 30,
startYear: 2001,
endYear: 2016
endYear: 2017
},
enabled: true
};
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const parseConfig = createSelector(
xAxis: {
tickFormatter: tick => {
const year = moment(tick, 'YYYY');
if ([2001, 2016].includes(tick)) {
if ([2001, 2017].includes(tick)) {
return year.format('YYYY');
}
return year.format('YY');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {
pageSize: 5,
page: 0,
startYear: 2001,
endYear: 2016,
endYear: 2017,
layers: ['loss']
},
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const initialState = {
categories: ['forest-change'],
admins: ['country', 'region', 'subRegion'],
selectors: ['startYears', 'endYears', 'thresholds'],
yearRange: ['2013', '2016'],
yearRange: ['2013', '2017'],
type: 'loss',
metaKey: 'widget_plantations_tree_cover_loss',
layers: ['loss', 'plantations_by_type'],
Expand All @@ -23,7 +23,7 @@ export const initialState = {
settings: {
threshold: 30,
startYear: 2013,
endYear: 2016,
endYear: 2017,
layers: ['loss', 'plantations_by_type']
},
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const initialState = {
settings: {
threshold: 30,
startYear: 2001,
endYear: 2016,
endYear: 2017,
unit: '%',
extentYear: 2000,
layers: ['loss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const initialState = {
settings: {
threshold: 30,
startYear: 2001,
endYear: 2016,
endYear: 2017,
extentYear: 2000,
layers: ['loss']
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const parseConfig = createSelector([getColors], colors => ({
xAxis: {
tickFormatter: tick => {
const year = moment(tick, 'YYYY');
if ([2001, 2016].includes(tick)) {
if ([2001, 2017].includes(tick)) {
return year.format('YYYY');
}
return year.format('YY');
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/pages/dashboards/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const mapStateToProps = ({ countryData, location, header, widgets }) => {
);
const downloadLink = `http://gfw2-data.s3.amazonaws.com/country/umd_country_stats${
country ? '/iso' : ''
}/tree_cover_stats_2016${country ? `_${country}` : ''}.xlsx`;
}/tree_cover_stats_2017${country ? `_${country}` : ''}.xlsx`;
const locationOptions = { ...countryData };
const locationNames = getAdminsSelected({ ...countryData, ...location });

Expand Down