For intermediate d3.js developers
Developing a d3.js Edge is a welcome addition to the growing series of books for learning d3.js. It’s also, to my knowledge, the first book that assumes some prior knowledge of d3.js.
Developing a d3.js Edge attempts to show you how to make more structured data visuals with less ‘spaghetti’ code. I’ve been using d3.js for over a year now and if I was to make a bar chart, when I came to make it again I would end up duplicating a lot of the code. Developing a d3.js Edge aims to change this by introducing us to reusable APIs that you can make yourself.
The book illustrates this with one main example, the creation of a map for 3 cities with accompanying radial histograms. This tutorial will also cover the topics of brushing and using crossfilter.js (also written by Mike Bostock)
One small complaint is that the source code has line numbers. This made things slightly harder to read on a kindle.
I’ll add much more to this review with an example of what it has taught me once I’ve re-read the book.
The example in the book is available online via GitHub.
Can the way Google Analytics visualises Goal Flow be improved?
Funnels have often been a great source of bad data visualisations. People take the term funnel very literally and often produce things such as below:
Data 2 > Data 1
I don’t have the time needed to tell you everything that’s wrong with this chart. In general though, people like to stick to a funnel shape and to hell with displaying data accurately. Google Analytics funnels can be accessed in GA under Conversions>Goals>Funnel Visualisation. They help show data relating to paths that you wish people to use on your site when achieving a goal (such as downloading a brochure). Google’s standard way for showing funnel data isn’t too bad. It’s fairly clean and you can get a sense for how people are using your site and where they might be dropping off in your conversion paths.
GA Goal Funnel
The above shows you how people start requesting a test drive for a car and how they drop off along the way. There’s useful information here, but what could be improved?
To start with, the left side of the funnel shows entrances. These should add up to 2,546. Google Analytics only shows the top 5 entrances though. A default “Other” could be added to show that total entrances total 2,546. The data is shown here in a table too. Could this not be visualised in the same way that the rest of the funnel is?
The next problem is that the horizontal green bar is the same width in each stage. Surely it should get shorter as people exit the process? The green section shows the portion of people who progress to the next stage. This varies in width depending on the total number of people in [...]
Below is a polygon filled map of London, United Kingdom.
Learn About Tableau
Polygon maps are easy to make in Tableau provided you’re wanting to map US regions or very top level regions in Europe (country level for example). But if you want to make a post code level map in Tableau or map postal areas in Tableau then you’ll become a bit stuck.
Thankfully there is a “hack” that allows you to make your own custom maps that was highlighted by Craig Bloodworth at The Information Lab. The method works by plotting the longitude and latitude of every edge that makes up a polygon. Give Tableau the order that these should be connected (path id) and you’ll be able to draw a custom shaped polygon on a Tableau map. You can even add functionality like parameters to show different metrics on your area fill map.
One sticking point is the longitude and latitude of every UK borough isn’t readily available. Thankfully, the link above contains several Tableau data extracts that are free to download. Each one allows you to map UK data at different levels.
The example I shared at the start of the post shows how you can also map a second data series on top of the polygons. Using a dummy data set, I’ve shown how you might map incidents on top of London boroughs (just an example, obviously you could just shade each London borough according to incidents). The trick to achieving this result is to use a dual axis when dragging the longitude and latitude on to columns and rows for the second series.
Learn how to make the most out of Tableau 8 with this book from Larry Keller.
As more and more analysts/students start visualising their data using Tableau there is an increasing need for new documentation. Tableau 8 came out to the public in early 2013 and the Tableau 8 Training Manual : From Clutter to Clarity aims to guide you in your quest to make sense of the increasing amounts of data we have available to us these days.
One of the good things about Tableau Public is that you can download the work of others and see how things were made. Larry Keller builds on this approach by referencing several workbooks in his examples that you can download at no extra cost.
The examples are easy to skim so you’ll quickly find a section you’re after regardless of if you’re a beginner or an advanced user. Sections covered include connecting to your data and planning your data’s structure in Excel. Later chapters deal with selecting the right chart type for the data you want to show.
Connecting to Data – includes creating joins using SQL Visualisation Basics – Covers the options in Show Me Intermediate – Mapping, handling dates, Combining Fields Advanced Features – How and why to use parameters, how to forecast
plus more – calculations, actions etc.
The book helps highlight which sections of menus you need to work with and is rich with screenshots. What’s pleasing to see is that the author also advises the user on what colours to use when making dashboards. Red and green seem the obvious choice but not so when 10% of your audience are colour blind (a fact I actually still find hard to believe having never met a colour blind person in the last 28 years).
Save time when opening Excel files by adding a folder to your favourites in Windows 7
In Windows 7 you have a default folder named “Favourites”. It probably contains a link to some commonly used folders such as “Downloads”, “Libraries” and “Recent Places”. Whilst these are useful, it will save time if you add your own folder to the Favorites section of My Computer in Windows 7.
Say you are always opening Excel files that are buried deep in your C drive. Rather than navigating down everytime you want access to a file in your favorite folder you can, almost “bookmark”, this folder to appear as a favorites folder when you get the “Open” dialogue box, as seen below:
The Favorites folder
To add your own folder here, simply navigate to the folder in question, then right click on the star (next to favorites). Choose the option “Add current location to Favorites”.
You’ll also be able to rename the link that’s created and you’ll save lots of time when opening files in future.
Favorites folder Added
Recreate your Excel dashboards in Tableau
You’ll have often used Excel as a data source for a Tableau dashboard. You may have an existing Excel dashboard that you want to recreate in Tableau. If you’re more familiar with Excel functions than you are Tableau, then this helpful video from Tableau is worth a watch.
The video shows you how to recreate a vlookup, conditional formatting and concatenation in Tableau.
Click to view the video on Tableau’s site
The following visuals show bus traffic in London over the period of a week. The data is taken from tfl’s countdown API. More details about this at the end.
Each ‘dot’ on the map shows “a bus arriving at a bus stop within the next 5 minutes”. The tfl api gives the longitude and latitude of each bus stop as well as the expected time of arrival of buses. Each dot is then plotted onto a map using Tableau, and given an opacity of less than 1 to help highlight areas of dense bus traffic.
When this data is plotted we can see the areas of London that have most bus traffic throughout the week. Poorly serviced areas (relative to the good areas) are identified and the trend throughout the day is shown.
So how could this data be used? Obviously there are less buses at night and more buses in central London, you don’t need a visualisation to tell you that. This data could be useful for identifying areas where a cab/taxi is more likely to be needed. Overlay crime/weather data with this data and you’ll see the areas where you should be asking Dad to pick you up after a night out…
Screenshot from the TFL Bus Visualisation
For more info on what interesting data is available from tfl check their developer section out.
Hourly Grid of London Bus Traffic
– Dan @danjharrington
Apps let you add new features to Excel
Office 2013 has the ability to download and install apps, helping you keep up to date with the latest developments in the world of data visualisation and analysis.
Excel has allowed you to use addins in the past to help extend Excel’s fucntionality. Apps work in a similar manner and can be downloaded from the Office store. Many of these apps are added to the market place by other people, not just Microsoft, so the quality will vary. Many are also available for free. Before reading on, note that you need Office 2013 and a Microsoft account in order to download and use Apps for office.
Apps can be downloaded for Excel, Word, Sharepoint, Outlook and Project.
The Office App Store
Some examples of apps include Pro Word Cloud which allows you to make word clouds that are said to be helpful at analysing word frequency (in our opinion word clouds are less useful than a simple bar chart or table for this task but we’ll let you decide for yourself).
The Apps will make more charting options available for you. Infogram for Office will let you make infographics in Excel that you can then share on Twitter or Pinterest.
The Office store has allowed for several bespoke apps to be released. Some of the more interesting ones include:
Audible Charts – this app lets you visualise your data by hearing it. Highber pitches result in higher numbers. Bing Maps – this will let you visualise your data on a map within Excel. StructureViewer – this app is for any chemists who want to visualise chemical structures! Streamgraph – made popular again by being seen in d3.js examples, streamgraph is a stacked area chart. It shows how several series of [...]