Next you can put your new “Economic Power” viz into an app with some interaction with another viz.
- Click on “Apps” in the top bar.
- Click “New App” on the top left.
- In the sidebar, click on “World Life Expectancy.” This will display all the vizes that have been built from this dataset.
- Click on the new viz you just built (
“Economic Power in <<Year:2010>>”). This will insert the viz into the app.
- Next you’ll add a second viz that has already been built and have the two interact. Add
“GDP per capita Trend for <<Country>>”. It is near the bottom of the sidebar, so scroll down and click it.
- Edit the title of your app (it currently says “Untitled”) to something like
“Economic Power over Time.”
- Click the orange “Save” button on the top left.
So now you have an app, but right now it just sits there and doesn’t do much. Let’s give it some interaction.
Filtering and Interaction
When you set up filters and interactions in Arcadia, you need to define them on a per-viz basis but they can act across multiple vizes.
If you create a filter on the app or implement a click filter (action) in the app, the viz you want to affect must have that field on its own filter shelf with no specific filter selections made.
Having a specific filter selection on a viz level (such as “Year=2010”) tells Arcadia that wherever that viz is implemented you want that filter to remain fixed.
Your goal in this tutorial is to have three filter interactions:
- Interaction A: An app-level filter that will let the user pick any UN Region(s) or all of them and have it affect both the “Economic Power” and “GDP per Capita Trend” vizes.
- Interaction B: An app-level filter that will let the user pick any UN Region(s) or all of them and have it affect both the “Economic Power” and “GDP per Capita Trend” vizes.
- Interaction C: Click a year in the “GDP per Capita Trend” line chart and have it filter the “Economic Power viz.”
Start with filter interaction B because the trend chart already has the appropriate filter on its filter shelf. (You can check this by clicking the “Edit” pen symbol in the corner of the viz.)
- You don’t need to add a filter to the trend chart’s filter shelf because “Country” is already there, with no country specified.
- Click on a bubble in the “Economic Power” chart (such as “Germany”).
- Click “Enable Filter on Click.”
- Click on a bubble again and then on “Test click behavior.” The trend chart will transform to show just Germany.
- Click the orange Save button to save the app.
To accomplish filter interaction C:
- Follow similar steps as above for B but first edit the “Economic Power” chart (this will open in a new tab).Change the “Year” filter from the 2010 selection to blank (i.e., nothing selected). (Note: Normally this would change the visual to all time, but the parameter in the Title
<<Year:2010>>means that it will filter to 2010 if there are not any other selections made.)
- Click the orange “Save” button.
- Return to the “Economic Power App” tab. Refresh the bubble chart (top corner of the viz).Enable filter on click.” Then click it again and test the click behavior.
- In the trend chart, click any point in the line, then click “Enable filter on click.” Then click it again and “Test click behavior.”
Next you can set a filter on the app’s filter shelf (to implement A). Let’s say you want to filter both the visuals by “UN Region.”
- Edit both the “Economic Power” bubble and “GDP per Capita Trend” vizes in a new tab.Dimensions”) to the filter shelf (do not make a selection) for both of the vizes.
- Drag the “UN Region” (or un_region) field from the data source sidebar (under “Dimensions”) to the filter shelf (do not make a selection) for both of the vizes.
- Save both vizes. Return to the app tab and click both the vizes’ refresh button.
- Click the apps reset button to clear any filters you currently have in place from your previous actions.
- Click the filters tab in the sidebar
- Select “World Life Expectancy” from the dataset dropdown menu.
- Click “UN Region” in the “Dimension” section. “UN Region” will then appear in the Apps filter shelf.
- Select a value in the new filter and both visuals will transform.
Save the app!
You can now launch the app from “Apps” with all the desired functionality. You may also wish to put it in your App Group.
Interactions Note: Current Filters and Filtering Back Button—On the top right of your app is the following (see image below). The icon gives you a tooltip with information about all the filters and parameters that are currently being used. If you click the “Back” button next to it, you will restore the filters to their previous state. The “Refresh” icon next to this is actually “reset;” it returns the app to its state at launch.