Posted in Uncategorized

Choose Your Own Research Adventure: A Resource Guide for the UBC Information Literacy Tutorial

When I was earning my MLIS from UBC, I took a Teaching and Learning Enhancement-funded (TLEF) position to work with Katherine Miller on revising the Land and Food Systems Information Literacy Tutorial. We developed a Choose Your Own Adventure-style tutorial module to assess students’ familiarity with certain tools and resources and to inform decisions about the ongoing development and sustainability of the tutorial and its integration with LFS course content.

This format was chosen because it was not intrusive, largely enjoyable to students, and flexible – giving students additional help when desired and skipping ahead to more relevant content when it was not. Building the tutorial in a survey platform provided rich insight into the decision-making of students during the research process, which allowed us to revise the format of the tutorial and switch over to a more sustainable tool going forward.

We suggest this kind of gamification as less invasive and more informative alternative to pre- and post-testing, which merely tests recall of information, puts a significant time and effort burden on students, and offers only limited utility to the librarians responsible for developing and maintaining the content. Embedding Choose Your Own Adventure-style content in a more traditional/linear tutorial can give you a balance of assessment and sustainability, and help serve students with a variety of different learning styles.


Want a template for your own work? Download the Twine File as using Save Link As  to save the file to your computer. To modify or edit the content, visit on your own browser and import the file. This tutorial is licensed with Creative Commons Attribution Share Alike.

Thinking about making your own from scratch? Learn from our trials and errors and check out the overview of key tools below:

Tools Overview

Narrative Development Tools


Twine is a free, open source tool built for Choose-Your-Own-Adventure-style branching narratives. It’s one of the easiest tools to manage, track, and revise the various content paths you develop, and the simple [[double bracket]] branching makes it an easy drafting tool, as well.

However, Twine does not have any tracking ability built into the program. There are instructions for using Google Analytics as a tracker here, but even with the ability to track clicks, the data is fairly complex and difficult to interpret.

Twine can also be used as a rudimentary visualization tool, as it allows you to zoom out to a structural-level view of your content as your drafting. This creates a node-link visualization that you can manually arrange without having to create each box and link by hand (as with Excel or Tableau).


  • A brief tutorial on Twine is available here.

Survey Tools

FluidSurvey was the survey tool supported by UBC and has robust tracking and embedding capabilities, as well as the ability to easily copy surveys, collaboratively write, and customize URLs. However, any survey tool with “skip logic” or branching functionality, which makes questions appear and disappear based on user selections, could work for this kind of project. However, the conditional rules quickly become complex to navigate, and it’s very hard to draft within the survey tool itself.



Quest is an interactive fiction tool that is designed for exploratory environments, rather than a directed path. For example, in Quest you build a room with objects in it (a library with a book) and users have a text-based game (“pick up book”, “look at book”, “read book”) for which you have drafted various responses.

 Visualization/Analysis/Reporting Tools

As far as I know, there are no “out of the box” tools to work with this kind of data. A list of the analysis and visualization tools we used in this project are described below, but all take a fairly significant degree of effort before you can find insights in the data.


In Tableau, we were able to create an overview of the tutorial structure that would provide the text of each node on hover and show the different paths through the content. The template was labor intensive to create, but allows you to filter the results, orient yourself within the content, and see the overall user response to the module.


The initial dashboard template was designed as part of Tamara Munzner’s Information Visualization Fall 2015 course. A copy of the final paper explaining and rationalizing the visualization choices in the dashboard above is available online here.


The first attempt to visualize the LFS CYOA tutorial was made in Excel. The image below is a screenshot of the flowchart we designed to understand the various paths through the tutorial. This was hand-created and arranged using the shapes and arrows tools.



This was a force-directed algorithm available online that uses a two-character arrow -> to connect the points on a node-link graph. Nodes can be color coded, as below, and manually or automatically arranged (and the amount of “gravity” and attraction/repulsion between nodes can be adjusted dynamically). However, this layout was also not very intuitive, as users experienced the narrative linearly, even if we did not design it that way.


Additional Resources

Interactive Fiction Database: A catalogue of Interactive Fiction/Choose Your Own Adventure-style games available to play online. To narrow the range of possibilities, check out this Top 50 list, past winners from the annual IF Competition, or XYZZY Award winners.

One Book, Many Readings: Beautiful analysis of printed CYOA books that offers some insight into the structure of CYOA narratives and is an enjoyable read in its own right.

Standard Patterns in Choice-Based Games takes a closer look at the structure of interactive narratives.

Choice Of Games offers Choose Your Own Adventure-style narratives in ebook form (Choice Of the Dragon is personally beloved). They have two posts (here and here) about their format that are worth checking out.

While none of these offer a step-by-step guide to the dashboard above, there are two Data+Science posts on Sankey Diagrams (here and here) and a post at Clearly and Simply on Network Graphs (here) that were essential in putting together the Tableau visualizations.

Posted in Uncategorized

Copy/Paste Text from Tableau to the Clipboard: A Quick Tableau Hack

If you’ve ever tried to copy/paste a line of text from a Tableau visualization, you’ve probably discovered that Tableau renders all text in visualizations as images. Even if you set “text” as the visualization type, it will still render as an image of the text that cannot be copied to the clipboard.

If you want your users to be able to copy a line of text – or even a small handful of text values –there’s a workaround you can build that allows them to do so. Because the titles of workbooks are rendered as text that can be copy/pasted, we can allow the user to select one comment at a time and copy paste from a separate location. It’s not an ideal solution by any means – and you can vote up an improved text feature request here [find link] – but it might work as a stopgap measure.

  1. Create a new worksheet and drag the field you would like to copy/paste (e.g. “Comment”) to Rows. If your users will be selecting a numeric value, you can construct a contextual phrase by concatenating a few values in a calculated field:
    "The value on "+STR([Date])+" was "+STR([Value])
  2. Drag the new workbook onto the dashboard with the primary visualization and edit the title of your new view:
    • Insert>[Comment]
    • This should now say “All”
  3. Add a new dashboard actions by going to Dashboard>Actions. This will allow users to select a single comment and have the text show up in the title of your new workbook.
    • Add Action>Filter
    • Source sheet: Your original visualization
    • Target Sheets: Your new workbook
    • Run on: Select
    • Clearing will: Exclude all values
    • The title should now say “None”
  4. Test your dashboard to see that the action works. When you select a value from your source sheet, the title should change to the text value you have selected.
  5. Now hide the data in the underlying file so that only the title is visible.
    • Uncheck “show header”
    • Under Format: remove shading, lines, and turn text white
    • Resize window to fit the space allotted
  6. Add instructions to make this action clear to your users (e.g. “select a value above to copy/paste text from here)


Posted in Uncategorized

Library Space Assessment in Tableau: A Step by Step Guide to Custom Polygon Maps and Dashboard Actions

This slideshow requires JavaScript.


Libraries need a tool for understanding observational space count data that’s as flexible as the spaces they’re trying to assess. Endless rows of numbers are difficult to interrogate or understand with any degree of nuance – whether that’s observing how one area is used compared to the whole, or how popular a particular kind of seating is by time of day.

Interactive visualization provides one solution to this problem. By building a map of the space and connecting it to the data, libraries are able to quickly see patterns and query them on the fly. The ability to subdivide and cross-section your data allows you to answer the questions you’re particularly interested in and supports finding new answers to the questions you develop.

This tutorial presents two methods for building interactive Space Assessment dashboards in Tableau. If you already have observation data, you should be able to select the method that best matches your needs and the format of your data. If you’re considering a space assessment project, thinking about the desired visualization can help identify collection methods and sampling schedules that will better answer the questions you have about your space.

Sample Projects


If you’re fairly comfortable with Tableau, don’t like detailed instructions, or just want to jump right in, here’s a quick reference version of the tutorial below:

  1. Gather the key information for your project: floorplan map, seating capacity for each area, and the observation data
  2. Use the GitHub tool or Drawing Tool to trace polygons over your floorplan. If you are making the map with icons, also place those coordinates at this time
  3. Export the polygon data. Give each shape the same name as the space has in the observation data. If you have icons, create a new column to tag those coordinates with the supplementary information, such as the type of seating the icon represents
  4. Combine all of your data sources into a single Excel workbook with separate tabs for each data source. Ensure that the Location field shows up in each tab, and that the naming is consistent across all sources.
  5. In Tableau, drag the X Coordinate to Columns and the Y Coordinate to rows. Change the mark type to Polygon, then add Path ID to Path and Location Name to details.
  6. For icons, also drag the Seating Type to details, and duplicate the X and Y pills to create a dual axis map. Change this mark type to Shape, and assign each seating type the appropriate icon from the custom shapes window. NULLs along the edge of the polygon should be assigned a transparent pixel.
  7. Color underlying map by location (categorical color scheme) or number of people (sequential color scheme) and add the underlying floorplan under the Background Images menu
  8. Synchronize axis and uncheck “show header” to remove axis

1. Data Prep

The instructions for Tableau assume you are working with a normalized dataset. If you don’t have normalized data, follow these instructions to manipulate your data into the appropriate format. If you’re not sure what normalized data looks like, check out the example below:

Cross-tab Data 

This is the format that you often see when you export observation data from Google Forms or other survey programs. In order to build the maps and visualizations shown above, we need to normalize the data so it looks like the example below.

If you’ve used Tableau’s “Data Interpreter” to normalize data in the past,  you will still need to pre-process the data before uploading, as the built in tool only supports one pivot and we’ll end up needing four.

Normalized Data


If you don’t have normalized data but are comfortable with manipulating data, check out this quick normalization trick in Excel and check back in at the next step. Otherwise, you can follow along with the sample cross-tab data to work though the data processing steps below:

  1. Unmerge all cells
  2. Fill in empty dates with the appropriate value
  3. Insert a column between Time and “Printing Scanning Info Desk”
  4. Concatenate Date and Time using the following formula: =CONCATENATE(A3,”?”,B3) and copy formula to all cells
  5. Using another concatenate formula or with copy/paste, combine the location with the study information. Instead of:  merged we want: unmerged
  6. Use the method here to normalize your data. Select only the concatenated field on the left and the newly combined field names, as in the example below:highlighting
  7. In your new, normalized workbook, insert new columns between “Row and Column” and “Column and Value”
  8. Select the “Row” column and navigate to Data>Text to Columns>Delimited and type ? into Other.  If Excel reformatted your dates into a series of numbers, you can manually format the cell to ensure your dates have copied correctly. Repeat for the “Column” column.
  9. Rename your fields as below:
    • Row → Date
    • New Column 1 → Time
    • Column → Location
    • New Column 2 → Group/Individual Study
    • Value → Count

2. Custom Polygon Coordinates

Tableau uses longitude and latitude for its out of the box GIS mapping. When you need a custom map such as a floorplan, it uses an XY coordinate plane to recognize and draw polygon shapes.

Using an external tool to find the edges of your polygon is much easier than trying to find this data within Tableau. When you use these tools, you will generally upload an image of your map to the program and draw (by clicking on the corners of the location) the shapes you want. The program will then give you the coordinates of every point you clicked and the order in which you clicked them, which you can give to Tableau as your XY coordinate plane.

The following instructions walk you through the two most popular tools of this type. You will need:

Bryant B. Howell’s Open Source GitHub Tool

This is an open source program that runs off your hard drive to allow you to draw polygons over an image. You must store the code and the desired images in the same folder.

  1. Create a new folder on your computer for storing mapping files and data
  2. Follow this link and save the code provided to the folder you just created. (I right-click the Raw button and “save link as” from there, but you can also copy the code into a program such as Notepad ++ and save as an html file type)
  3. Copy the map(s) of the desired location into your mapping folder.
  4. Open the html file from your folder and follow the instructions from there.
  5. If you are making a normal location map, draw a polygon around each location where you collected data
  6. If you are making a map with icons, draw the polygon around each location, and also select the desired locations for your icons before closing your shape. Don’t worry if your polygon shape starts to looks funny – we’ll fix it in Tableau!
  7. After you “Output Polygons,” copy/paste the data back into Excel

Power Tools for Tableau: Drawing Tool

This tool is a free, browser-based polygon tool that works with online images with a direct URL. You have to provide your name, email, phone number, and company in order to access the tool, but it also has features such as grid overlay, snap to existing point, and align with previous point.

  1. Follow this link and provide the requested credentials.
  2. Share the URL to the desired map and click “load image”
  3. For perfect corners, make sure the”Align with previous point” and “show grid line” options have been selected
  4. Follow the provided instructions
  5. If you are making a normal location map, draw a polygon around each location where you collected data
  6. If you are making a map with icons, draw the polygon around each location, and also select the desired locations for your icons before closing your shape. Don’t worry if your polygon shape starts to looks funny – we’ll fix it in Tableau!
  7. Click “Output Polygons” and copy/paste the data into Excel


If you have a shapefile map of your library or location, you could also use one of the Shapefile To Tableau Conversion tools to generate the coordinates your map:

Polygon Processing 

Once you have the XY coordinates for your polygons, create a new tab in your space count data file and paste the data into the worksheet.

  1. Rename the Shape or Identifier field to “Location” (or whatever you call “Location” in your data file)
  2. Check that the names of each shape mirror the name of the location in your data file. Capitalization, spelling, and spaces matter!
  3. If you are making a map with icons, create a new column and tag each icon location (the XY coordinates where the icon will appear) with the type of activity you want the icon to represent. Leave the points marking the edge of the polygon shape blank.

Custom Shape Library

If you are creating a polygon map with icons, you will need to add at least one custom shape to your library. If you would like your icons to be more informative than “triangle” or “square,” you can search for custom icons at or or use the package below:

carrel       Carrel

opendoor      Study Room

roundtable       Table

workstation       Computer Workstation

lounge       Lounge Chairs

floor       Sitting on the Floor

transparantpixel       Transparent Pixel (for edges)

Once your desired shapes are selected, you need to create a custom shapes menu. Navigate to Documents>My Tableau Repository>Shapes. Create a folder called Library Icons and add image files of the desired icons. Be sure to include a transparent pixel (file provided above), as you will need this to hide points along the edges of your shapes.

3. Custom Mapping in Tableau

Join all worksheets on Location field. If you have used the same field names across all data sources, Tableau should detect the connection automatically. However, you can also manually edit the connection using the Join menu below:


Polygon Location Map

  1. Drag the X field to Columns and the Y field to Rows
  2. Change the mark type to Polygon
  3. Drag Path ID to Path and drag Location to Detail or Color.

Dual Axis Polygon Map with Icons

  1. Follow the instructions for the Location map. Then:
  2. Drag seating to the Detail mark
  3. Copy the X on Columns and Y on Rows by selecting the pill and Ctrl + Drag Right, or by dragging the field onto each shelf a second time
  4. Right click each pill and select “Dual Axis” to combine the shapes into a dual axis chart
  5. Change the secondary mark type to Shape
  6. Edit the shapes so that all NULL values are the transparent icon, and the remaining seating types are assigned an appropriate icon

Background Images

To add the underlying map, go to Map>Background Images and select your data source. Click “Add Image” and select the file from your computer. You will need to know the size of your final image – you can check the exact size in pixels in a program like Microsoft Paint – and add the total value of the width (X) with 0 for Left and the width of the image for Right, and the height (Y) with the bottom at 0 and the height of the image for Top. Hit OK.

You can modify the transparency of your image under the Color menu to see the underlying map.

You can also choose whether you want the map to be colored by the number of students in each area (a Choropleth map) or to use categorical color by location. If you choose to color by location, it will be easier to identify each location in the corresponding charts, but harder to see high and low traffic patterns in the building. The reverse is true for the Choropleth map, as in the example below:


You may want to modify the look of your polygons by adding or removing the border or halo around each polygon. You can find these options under “Effects” in the Color menu.

Depending on how you shape your data, you may need to take the AVG instead of SUM for each vertex, or disaggregate measures.


4. Visualizing Capacity  

Because the questions asked in space assessment projects can be so contextual, I am not going over how to create specific views in Tableau. I assume most of the people interested in custom mapping are already pretty familiar with the basics and can create the supporting visualizations they need. However, because we used a blended data source, I do want to go over how data blending affects working with capacity.

When we blend data sources, duplication of fixed values becomes a slight problem. Tableau automatically uses SUM to aggregate, but a capacity of 25 will be duplicated for every count. After 4 counts, it would show a SUM of 100 (4*25). You can use “Average” to quickly compute the correct capacity for each location, as shown below:


You could also use a FIXED LOD calculation: {FIXED [Location]: AVG(Capacity)}. Note that with LOD calculations, any filters must be Added to Context to work as intended. I have never run into a problem with the standard Average calc, however, so I tend to stick with that.

5. Dashboard Actions in Tableau

Once you’ve created the desired visualizations to correspond with  your map, it’s time to make it interactive! Drag your map and your visualizations onto a new dashboard and arrange the windows as you see fit.

In Tableau, adding interactivity is done through Dashboard Actions. This is what tells Tableau that an action taken in one workbook should effect other workbooks on the same dashboard. Tableau has three kinds of Dashboard Actions:

  • Highlight: A highlight action makes the selected field pop out across all views in your dashboard. Tableau draws your attention by changing the field name to yellow and dimming all other information in the worksheet.
  • Filter: A filter action excludes all values that do not match your selection. It can be used to look at a particular section of data in more detail by limiting the available information to only the values that match your selection.
  • URL: A URL action directs you to an external link when selected. You can use this to direct users to a more detailed explanation of your observation methods, for example, or to tweet about the results they find – but these actions are not particularly relevant to this tutorial.
  • Tableau also allows interactivity with dropdown filters, checkboxes, and radial menus that can apply across all worksheets or selected worksheets on your dashboard. Like URL actions, these can certainly be used in your space assessment dashboard, but are not covered in this tutorial.

In general, remember that highlighting will preserve context while filtering will reduce the amount of information available.

There are two ways to apply dashboard actions in Tableau.

Generated Dashboard Actions

Generated dashboard actions are applied from the dashboard itself, not from the Dashboard Actions menu. These can be generated by adding a color legend or selecting “Use as Filter” on a worksheet.

Highlight Actions are automatically applied from color legends and,  by default, highlight all values on your dashboard with the same color palette.

Filter actions can also be applied easily; when you select a workbook on your dashboard, there’s a small icon on the upper right that you can toggle on and off to use as a filter:

Generated dashboard actions work well on many dashboards, however, they work less well in this context. Having a large custom map effectively replaces a small color legend as the obvious trigger for a highlight action, and the filter toggle automatically filters all charts by all fields. This combination means you could end up with situations like below:

You can see that a selection on the map excludes all bars that show the count of students in other areas and resizes the axis to the maximum space available. Because there is no matching field to highlight in the line chart, the values are greyed out and hard to see.

The solution to this is to use the Dashboard Actions menu.

Dashboard Actions Menu 

To access this menu, go to your dashboard and select Dashboard>Actions. This will pull up the list of current actions on your workbook, where you can see the menu-created and Tableau (generated) actions all in one place. Selecting Add Action will allow you to select the kind of action you prefer.


The Source Sheets section allows you to select the worksheet(s) in which your user must make a selection. Highlight actions can have multiple sources; filter actions can only have one source – but you can add multiple filters that will allow every worksheet to affect every other sheet. The Target Sheets allow you to specify which workbooks the action affects.

The two actions above would lead to a result like this:

With a filter applied to the line chart, you can see how the number of users change over time in the selected area only; using a highlight action on the bar chart preserves the context of the rest of the building, but helps the selected value pop out.


In general, your steps to creating a dashboard action are below:

  1. Navigate to Dashboard>Actions and select “Add action”
  2. Select either the filter or highlight action to reduce (filter) or feature (highlight) information
  3. In the Source Sheets menu, select the sheet(s) where the action must be taken by the user
  4. In the Target Sheets menu, select the sheet(s) where the effect of the action will be shown.
  5. Decide whether the action affects all fields in your workbook or selected fields and modify your action accordingly.


If your actions aren’t working as expected, these questions may help you find the problem:

  • Is everything suddenly dim? Is your highlight having no effect at all? Check if the desired field (e.g. Location) is on all sheets. If not, add the field to the view and see if your action works now.
  • Did your data disappear? Check if your filter affects All Fields. If so, there may be fields (like time of day) that aren’t showing on some views (like the map). Use Selected Fields to set the fields that should be affected and ignore those that shouldn’t.
  • Did you filter when you meant to highlight? You’ll have to create a whole new action – there’s no easy way to switch one the action is created.


A list of all tools, links, and downloads mentioned in this tutorial can be found below:

A note on versioning:

In Tableau 10, you can use data blending across all locations. You will be able to drag separate files (data, polygons, capacity) and blend on location.

For Tableau 9 and earlier, adding the data as different tabs in an Excel workbook will still enable you to blend as above. Avoid using relationships to merge data across data sources in this case, as will give you some difficulty as you try to compute % occupancy across two data sources (capacity and data)

Additional Resources

There are quite a few other resources and tutorials to work with custom polygon data. When I was learning, I consulted the Creating Custom Polygons on a Background Image instructions at Tableau and Behold. The Tableau blog also came out with a recent post about custom polygons and US Congressional Districts and they points to several other projects and tutorials at the end of the post.