Seeing the wood for the trees

Visualising “bigger data”

In the blog post Criminal goings-on in a random forest, we used supervised machine learning to see how well we could predict crime in London. We began by rendering and exploring some of the many facets of the recorded crime summary data at London borough-level .

There comes a point though where the many faces of the data require something more than a static visualisation. And there are alternative options. We can make “bigger data” visualisations more consumable and engaging. In this post we’ll go deeper into the original data with a more interactive and flexible approach.

Framing the questions

Suppose we want to explore the lower-level minor crime categories by borough. That would entail 1,024 mini visualisations. That’s a lot of scrolling. Or a dizzying set of Powerpoint slides.

Suppose too that we want to know which of these mini plots exhibits either the steepest increase or decrease over time. We may want to do this selectively by borough. Or by major crime category.

With a “trelliscope” approach, we can create a set of filterable and sortable panels wrapped in an engaging experience. And by anticipating the questions uppermost in the minds of the data’s ultimate consumers, we can create appropriate “cognostics” tailored to the task.

Play with the app

trelliscopejs & rbokeh

Play with the app full-screen, and see the code, here.

R toolkit

R packages and functions used.

purrrmap[1]; set_names[1]
readrread_csv[1]; read_lines[1]
dplyrmutate[6]; filter[4]; group_by[3]; if_else[3]; tibble[3]; summarise[2]; arrange[1]; as_tibble[1]; desc[1]; select[1]
tidyrnest[1]; unnest[1]
stringrstr_c[4]; fixed[1]; str_count[1]; str_detect[1]; str_remove[1]; str_remove_all[1]
lubridatemonth[1]; year[1]; ymd[1]
rebuslookahead[3]; whole_word[2]; lookbehind[1]; one_or_more[1]
baselibrary[8]; c[2]; function[2]; list[2]; sum[2]; conflicts[1]; cumsum[1]; max[1]; min[1]; months[1]; Negate[1]; search[1]
ggplot2element_text[3]; element_rect[2]; labs[2]; facet_wrap[1]; geom_line[1]; ggplot[1]; ggtitle[1]; theme[1]
trelliscopejscog[3]; map_cog[1]; map_plot[1]; trelliscope[1]
rbokehfigure[1]; ly_lines[1]; ly_points[1]; theme_plot[1]
ggthemesscale_colour_economist[1]; theme_economist[1]
kableExtrakable[1]; kable_styling[1]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.