AMAZONES - Non-timber rubber
Part of the project Amazon Ecoservices (AMAZONES).
This map belongs to Amazon Ecoservices (AMAZONES) and is shown on its rubber page. The “Rubber” group maps the favourability, yield and rent of rubber across the Amazon. The query layer “Rubber values per region” turns that into a comparison: choose whether to work with municipalities or protected areas, choose the item
- total potential production (kg), mean productivity (kg/ha) or mean rent (US$/ha/year) - then click areas on the map. Each click adds or removes an area, and a column chart compares the areas you picked. The code is query 3.
How it is built
- Two comboboxes. One picks the kind of region, the other the item to compare. See Combobox.
- Collecting clicked areas. A
pickpointwidget withmarkLayerInd=1gathers the attributes of each clicked polygon;beforeCalcreads them withgetAttributes(1)and clears them withremoveAttributewhen a combobox changes. See PickPoint. - Switching the map. When either combobox changes,
beforeCalccallschangeLayersto put the municipalities or protected-areas map in the layer, with the style of the chosen item. See the execution model. - The chart. Highcharts draws one column per picked area, in the colour the area has on the map. See charts.
- No pixel calculation. The layer’s
expressionisnull: the query only reacts to widgets and redraws the chart, while the maps come straight from the server. - Groups. “Base Maps”, “Rubber” and “Queries” are arrays whose first item gives the group
titleandcolor. See the layer and group model.
Try this
- Choose Protected Areas and “Mean rent (US$/ha/year)”, click three protected areas and compare the bars.
- Click one of them again to drop it from the chart.