Juicebox apps are subdivided into stacks that are made up of one or more slices. Below is an image of The NFL App that we’re building in this tutorial as a finished product, with its one stack and four slices labeled.
Often in Juicebox apps we want to tell more than one story with the data we have, or even a new story with a whole new dataset. In Juicebox we separate our stories into stacks. The stacks are usually accessible by clicking on the tabs at the top of the page. In the app we’re building, there will only be one stack called NFL Contracts.
Slices are the building blocks of stacks, and their content can range from being a section of guiding text to a complex data visualization. The nice thing about Juicebox slices is that they make data visualization incredibly easy – you just need to feed in the data. In the NFL app there are 4 slices (Even though it may look like less).
Tip
Selections that are made in a slice will filter the slices below it, as well. This means that if you find an aspect of the data that interests you, you can focus on that aspect.
For more on these slices and the others that are built into Juicebox, see our slice reference.
Global filters are filters that the user selects that are applied to the entire stack. For instance, in the global filter menu shown below, player position is selected as the filter and defensive tackle (DT) is the chooser option. This means every slice will only look for data about DTs and ignore every other position.
Global filters help the user simplify the dataset they are working with.
Juicebox is a web-based front end that interacts with hosted data services. Each slice calls a data service that is designed specifically to answer whatever question that slice is asking. At the heart of every slice is a SQL query, and the code in each data service is responsible for creating that query.
In the figure below, you can see that the slices use data services to communicate with the database. The slices only know how to display the data that is provided to them; a slice relies on its respective data service to gather the data that it needs.
The conversation between the slice, data service and database goes a little bit like this:
Continue onward to Part 2 - Folder Structure & App Configuration