Skip to main content
SearchLogin or Signup

Why to Embed Interactive Graphics

Information on why to embed interactive graphics, such as charts and maps, into your "Pubs" on CrimRxiv

Published onAug 13, 2020
Why to Embed Interactive Graphics

I have previously written about why I post preprints. CrimRxiv is a website for sharing them and other “Pubs,” including postprints, grey literature, reviews, commentaries, and supplementary materials. CrimRxiv is not just another repository. Nor is it only distinguished by its focus on criminology (including criminal justice). It is technologically different from other repository websites, such as SSRN and SocArXiv.

CrimRxiv renders your “Pub” in HTML, not as a PDF. This may require a little more work on your part, but the benefits outweigh the costs. (Tutorials on how to use CrimRxiv are on the Help page.) For example, if someone tweets out a paper, you may want to read it on your phone. That is easy on CrimRxiv, but difficult on alternative sites (mostly due to rendering articles in PDF form). Issues like that may seem small, but it filters out your potential audience. Also, by being in HTML, your preprint is properly indexed by search engines, such as Google Scholar; that will not happen by just posting a PDF on your personal webpage.

More impressively, CrimRxiv provides extended functionality over the alternatives. On it, you can embed interactive graphics into your Pub. Since Pubs are in HTML, authors can embed interactive graphics into them for viewers to engage with. This improves authors’ ability to share information and interpretations, as well as viewers’ ability to evaluate and learn from those. Consider two examples: interactive charts and maps.

Interactive Examples


There are some circumstances in which interactive chart functionality is very helpful. One is shown below: You can include tool-tips associated with particular data points. They provide extra information that would overly clutter a non-interactive graph or map. If you click on the following funnel chart, hovering your mouse above a point in the scatterplot will reveal the jurisdiction’s name.

Funnel Chart for Use of Force in New Jersey Police Departments

Another option is to share interactive charts with dropdown menus. I do not have a great example from my own work. Instead, to see what kind of visual could be brought into CrimRxiv, I suggest checking out Jacob Kaplan’s UCR data tool.


Another example of CrimRxiv’s extended functionality is what you can do with interactive maps, like this example hot spot map, below. In it are tool-tips. When you click on a hotspot (in blue), you can learn more about the number of incidents and cost of crime. Additionally, interactive maps help “readers” zoom in and out to gain wider or more specific context.

Cost of Crime Hot Spots in Dallas

How To Do It

To share interactive graphics on CrimRxiv, they must be hosted elsewhere. In your Pub, you make a link to that place by copying and pasting in a URL. It is easy. This page shows you how.

There are different websites for hosting graphics. Like me, you could create a free GitHub page, a guide to which is here. To create interactive tools, there are a ton of tools. It is a very active area of development. At the time of writing, I enjoy using plotly, which has code libraries in R and python. Both have libraries to make leaflet maps; ArcGIS and ArcPro must too. Jacob Kaplan has a good example of making a leaflet map in his book on R for criminologists. A simpler solution is to make simple maps in Google Maps (e.g., like this one). On my to-do list is figuring out Tableau, as well.

And there you go. Now lets see folks share their interactive work on CrimRxiv.


No comments here