With the new map module you can easily add a dropdown menu to your map. With such a menu, your reader can for example switch between different years. However, in order to do this your data needs to be structured correctly.
In many cases your table looks like the one on the left. But to add a dropdown menu, it needs to be structured like the table on the right. You can find the table we’ll use in this example here.
We inserted a button that automatically transforms your table. This ‘unpivot’-button puts data in columns underneath each other in rows. This is how this function works in the platform:
- Add a new map layer, add your table en click on ‘unpivot’
2. Select the columns you want to show in the dropdown menu. In this case we want to able to switch between years. Click ‘apply’ and your table is transformed.
3. Name the new column. Press the settings-symbol in the ‘Value’ column and check the ‘Color areas’ box.
4. Go to the column you’d like to put in a dropdown menu. Click on options in the column header and check both ‘Dropdown’ and ‘Single select’.
Below you’ll find the interactive version of the map with a dropdown menu.