Mapping Mayhem with your own WMS!

I love my mapping in Tableau.  Click, click, boom! bp1-standard-map

But what if I wanted a background map with a bit more kick?  And so began my adventure on how to get a map that looked the way I wanted it to.   A map to match my viz!  One of the most interesting and fun customized map sites I found was from Stamen.


After customizing my location, zoom level, and styling preferences, I could easily save and export my map image for use in Tableau as a background map image.  The viz was done...


But wait?  I can’t drill into the map and zoom?  How could I get a map that looked this good, but allowed me all the functionality of the maps that came with Tableau?  Since the goal of the viz was to raise money for the American Lung Association,  my budget was pretty much zero.  I explored few options:

Your New MapQuest Developer Network Account

Open Street Map 

Google Maps Gallery

Mapbox and TileMill

... and finally contacted Allan Walker for any suggestions.  He led me to his excellent document on getting started with my own WMS which I promptly implemented on my local Mac.

Once I had my Geoserver and PostgreSQL DB with PostGIS up and running, I realized that I didn’t really want my computer on all day and night, nor was it a robust,  externally facing server, and so I was back to my search, and my non-existent budget.

Amazon Web Services offers a free tier solution for 12 months... why not give that a try?   For a minimal charge, you can get something with a bit more umph as well.  And just incase you out there in TV land want one too…

Once the Geoserver and database were up and running on Amazon, I needed things to put in them, and again thanks to Allan, found the bits and bobs that make up San Francisco geography:

  • “SFArterial”.shp – Downloaded California from as California_roads.shp, filtered for Motorway, Motorway Link, Primary and Primary Link*
  • • “SFRoads”.shp – As above, unfiltered*
  • • “SFWaterareas” – As above, unfiltered*
  • • “SFOcean” – Downloaded from*
  • • “SFParks” – #Opendata

All of these files need to be converted to database tables using a PostGIS tool called shp2pgsql, and then executed to load it into the database.   After adding them to the database, they had to be added to the the Geoserver as a layer as well.  But you aren’t just limited to layers in your database.  You can add layers from other sources as well, such as OpenStreetMap.


You can choose to use just one layer, or you can created a Layer Group that allows you to stack multiple layers and style each one the way you want to.  For example, in the Stairs of San Francisco viz, the layers in the group are show below.  You can control the order of the layers as well.


Of course, my favorite part is adding the styles to each of the layers.  You can create default and custom styles to make each element of the map look exactly as you want it to.


Once you have all your layer and layer groups styled and ready, you just need to add the link to you map server in the Tableau workbook.

You could select an OpenStreet Map view.


Or a US Naval satellite image of San Francisco...


... and the same view, zoomed in on Coit Tower.


You can even create your own Layer Groups in Tableau.  This view is the Naval satellite image mashed up with the roads,  and ocean layers from my comic look.  Having your own map server lets you not only get amazingly creative with the styles of your maps, but allows you to add data from map layers as data from Tableau.


And of course the Layer Group SFStairsCartoon SF (the final viz version) :


Once you've built your own map stack, you can never go back!  Have fun mapping!

Design Your Data Viz Like a Product Designer


After presenting on “Using Design and Emotion to create a Viz with Impact” at TCC13, one of the most common feedback comments was, “I never realized how many iterations and how much time you put into your viz’s.”  Having studied Industrial Design, it seemed only natural to follow a “Product Design” process when creating data visualizations.  Isn’t a data viz a product that you hope people will “consume” because they find it of use and of value? People are bombarded all day long with emails, tweets, Facebook posts, etc.  Why should they spend the time to look at your data visualization?   Just like a product, your viz should be designed with a specific goal and context in mind, and should capture the consumer’s attention immediately and provide a value to them. Product designers go through a process to develop new products which generally consists of analysis, concept development and product creation steps (followed by feedback and further development and creation).  When working on a data viz project, similar steps can be followed.

  1. Analysis – what are the product goals and context
  2. Image study – research other products/images for inspiration
  3. Assess constraints and resources
  4. Rapid prototyping / visualization mockups
  5. Development of a working prototype
  6. User feedback
  7. Refinements / redevelopment based on feedback
  8. Final product version
  9. Launch

Using a visualization created for the 4th of July on Fireworks as an example, I will walk through product design process used to create it.

1.    Analysis – Goals and Context As a huge fan of fireworks (and naughty backyard pyromaniac), I wondered if there was data about fireworks, and happened across the Consumer Product Safety Commission site.  I noticed that there was a huge spike in the number of estimated injuries associated with the 4th of July and wanted to create a humorous, but informative data viz that would act as a friendly reminder to be “safe and sane” with fireworks (goal) over the holiday (context).

2.    Image study – research other products/images for inspiration I really liked the concept of using humor to create a product safety warning like the cartoon, “Dumb Ways to Die” .  As the data involved the 4th of July holiday, I also looked to inspiration from old “Schoolhouse Rock” videos about the founding of America. Mostly, I knew the visualization would have to be as explosive as fireworks!

3.    Assess constraints and resources When designing a product - your ability to create a product is limited by many constraints such as:

  • Who is the consumer?  What is their knowledge on the topic? In what format will they consume the data in (i.e. print, blog, variable screen resolutions, etc.)?  Is there a timeline or deadline for consumption?
  • Is the data needed for the project available, reliable, and in a format that is usable?    I always say that data has a wicked sense of humor!
  • What are your skills as a data viz designer?  What tools are available and what is your level of skill at using them?

In the case of the Fireworks viz, my consumer could be anyone who gets a web link to the data viz via Tableau Public.  The project needed to be done at least a couple days before the 4th of July holiday so that the topic would be current.  I knew I wanted to use cartoon characters, and although I have experience with Photoshop and Illustrator, my skillset was not perfect for this, so I enlisted the help of a friend Ray Yuen for illustrations.  The data was easily available, but needed a bit of formatting, joining to reference tables, and research as to how the estimated injury figures were calculated and how they could be used in comparisons and calculations.

4.    Rapid prototyping / visualization mockups This is the real brainstorming part of the process.  The first step was to play with the data and generate many different views to try and see what the story was that the data was telling (rapid viz).  Just try out every combination of data and chart styles that is possibly of value and see what pops out.   It was obvious that the injury timeline was the most important view to show as it dramatically highlighted the disproportionate amount of firework injuries that occurred on the 4th of July.   I also wanted to compare that holiday to the total injuries for the rest of the year, as well as to the one other holiday that I associate with fireworks, New Years.  Other areas of interested were who was getting injured, and how they were getting injured.  The basic viz with limited formatting is below.  All the charts act as filters for all the other charts in the view making the analysis really simple and easy to use with limited instructions or previous knowledge of interacting with this data.



Then the real fun began.  Initially, I wanted to go with a concept of cartoon British and American soldiers getting blown up by fireworks.


2 There were a couple of different ideas for how best to show the injury location, either individual characters with specific body parts injured, or one character with an overlay of injuries all over their body sized proportionally to the number of estimated injuries for that year and demographic.


Ray and I had been collaborating over the phone and email, so we decided to meet in person to brainstorm together.  We happened to meet at Yeti Zen, a collaborative work space for game designers.  The office space became the new inspiration to go for a comic book look and feel.  I remembered the old Batman and Robin show where the cartoon “Pow!” “Bang!”, etc. would flash on the screen when they had a fight.



Ray was kind enough to indulge my change of plan and came up with some really fantastic comedic gore. 5 In addition to the cartoon injuries, I wanted the rest of the look and feel of the visualization to be reminiscent of an old comic book as well.  Using bold colors and cartoon “frames” to layout the data views, the viz was really starting to come together as a data product.


5.    Development of a working prototype Now it was time to add in the wonderful illustrations that showed off the bloody body parts and maimed characters.  I played with many different ways to incorporate the injury data.  I wanted to do so in a way that added value to the data viz, but didn’t detract from the already powerful story that the data was telling on its own.

7 6.    User Feedback This is the hardest part of the process.  After working so long and so hard on the project, it’s time to swallow your ego and pride and let some friends rip it to shreds.  Buy these folks some beer or bake them cookies, because it is hard to find someone willing to be brutally honest with you.

7.    Refinements / redevelopment based on feedback The main feedback that I got was that the cartoons were making the viz busy, or obstructed the ability to view the data accurately.  They were taking center stage as opposed to letting the data tell the story.

Another bit of feedback was that people wanted to read about the actual injuries.  Incredibly enough, people would tell their doctors about all kinds of stupid things that they did with fireworks, particularly involving bottle rockets and bottoms.  This was a great piece of feedback as it led to the annotation layer mentioning “naughty bits” which added to the humor and accessibility of the viz product.  I also added the ability to drill through to the detailed medical report data so the consumer could explore this information further.


8.    Final product version In the end however it seemed that the cartoons, overpowered the data and didn’t add value to the story.  After all that, they got removed!   The final step was to add the title and header’s with custom fonts.  As Tableau does not support embedded fonts (yet – hint, hint….), I had to create these in Photoshop and add them as floating images in Tableau.  This is where the pixel alignment feature comes in very handy.  It not only helped to align the headers, but also ensure that the grid formatting and “white space” between the frames was lined up correctly.


9.    Launch One of the great things about Tableau Public is how easily the data viz can be emailed, embedded in a website or blog, tweeted and posted to Facebook.  As the viz was finished with only two days until the 4th of July, I also shamelessly emailed the Tableau Public team asking to be posted as Viz of the Day, and they very kindly posted the viz the next day!

One of my favorite things about Tableau Public is that it allows you as a designer to create amazing things with data and then share it easily with the world.

SNAP back to reality


This viz was inspired by Ron Shaich, founder and CEO of Panera Bread, who participated in a seven-day SNAP Challenge - living on a food and beverage budget of $4.50 a day, the average benefits available to a beneficiary of the Supplemental Nutrition Assistance Program (food stamps). "I had no clue. My SNAP Challenge last week taught me that merely observing someone else's plight does not hold a candle to consciously altering your habits to better understand what it might be like to live someone else's life." The CNN article on his experience can be seen here . This viz invites to you take the "SNAP challenge" as well as provide some information on the SNAP program from 1986 - 2012.

Using Design and Emotion to Create a Data Visualization with Impact


This is the slideshow from my session at the Tableau 2013 Customer Conference.  This session will walk through the process of creating a data visualization based on product design principles and ideas, focusing on overall product goals and user context. A step by step walk through of the design process for two data products, "Twitter TV Set" and "Firework Injuries" will be used as examples to highlight the impact that design and emotion can add to a visualization.  

Twitter TV Set


This was a fun visualization to analyze twitter data on current "hot topics". A nod to Shel Silverstein's "Jimmy Jet and His TV Set", this Viz focuses on the obsession of Twitter and how the tweet has become more the news than the news itself. Click on the remote to view the top tweets and authors by topic. Please pardon the long load time. Grab a beer, watch you twitter feed, and check back in a bit....

Firework Injuries


Using data from the Consumer Product Safety Commission, this visualization highlights all the injuries due to fireworks that happen, highlighting the 4th of July holiday period.  Click on any category to filter on it, and explore what injuries occur across dates, genders, and age groups.  Males seem to be more likely to get injured overall, and their injuries are to their hands and fingers.  Females, are more prone to head and neck injuries.  Sadly, wee ones are almost 10% of injuries, mostly over the 4th of July week.  Hover over any category and you can drill through to the gory details of the injuries (even the naughty bits). Please be safe this 4th of July and enjoy fireworks responsibly.

Special thanks to Ray Yuen (of Pokemon fame!) for the comic book graphics inspiration.

Tableau 2012 Iron Viz Championship - Tornado Alley


This viz was created for the Tableau 2012 Iron Viz competition in San Diego at their customer conference.  It was created in 20 minutes, while onstage, using a provided data set.  The viz shows the region called "Tornado Alley" and compares the number of tornadoes and fatalities to other regions. It was the winning viz!

Heatmap Checkout Abandonment Flow


This viz displays a visual walkthrough of the checkout process for a fictitious retailer. Rather then display a table or funnel of the data, this layout uses images of the checkout flow as background maps, shows visually where the abandonments occur. This allows the added insight of examining the UI along with the data adding richer insight into the flow.

Dynamic Report Templates


This presentation was created for the Tableau 2012 user conference Tips and Tricks session. It walks through how to create a dashboard "application" for users that may want to have a simplified way to create basic reports, dashboards or charts, such as for PowerPoint presentations. The output is highly formatted and presentation ready, shielding the user from having to do any formatting or branding. The concept uses the sample data from a fictitious coffee merchant. The user has the ability to select the report attribute being reported on, the metric uses to monitor performance, filter criteria and the output chart or dashboard display. Use the tabs to walk through the presentation as well as a step by step "how to". The concept is called the "Chart-o-Matic".

The way to the 'ship


This viz was created to celebrate the Giants winning the 2010 World Series. It shows key stats for the players by pre and post season so the user can compare stats easily across players and the two teams and how the players performed as the season progressed. Obviously the post season games are not enough of a sample size for a true comparison.

Take me out with Tableau


This was a very early attempt to design a viz for mobile devices using 2009 baseball data. Based on the design of an antique pinball game the user could quickly get stats on the current pitcher and batter at a game. The stats were color coded (red to blue) to provide a quick visual cue as to if the player was performing above or below average compared to other players. In addition the field below showed the number of hits for the season that had been single, doubles, homeruns,etc, plotted out on the vintage diamond. This was my first use of a custom background image and mapping the data based on coordinates.

School Lottery Probability


In San Francisco there is a school lottery system instead of pure neighborhood schools. Families apply to 7 schools and hope to get one of their choices. Based on previous year's enrollment and capacity statistics, this viz allows users to select 7 schools either by selection criteria and filters, or by geography and calculates a probability that they will get one of their choices.