The Mind-Blowing Possibilities of plot.ly
Data visualization for scientists, journalists and the public.
sharing data for the purpose of data literacy
Disclaimer: This is NOT a tutorial. I’m still learning plotly myself. I’m just writing down thoughts stemming from a recent talk as part of our Title III curriculum re-design grant. For an intro/how-to to get you started, check out Rhett Allain’s December 2013 post here.
I’ve never used the words “mind-blowing” in anything I’ve written before, but it is appropriate for a handful of reasons. There’s so much that was presented and even more that I need to learn . . . So this post is premature as I’m far from an expert. I’m going to try to keep this post focussed, but plotly’s utility and function sprawls like a concept map, so bear with me.
First, the basics
- Create a graph from data. (Duh, right?!) Using data from excel or manual input, a graph is created. Plotly does its best to auto-recognize x- and y- variables. If it gets it wrong, it’s a simple fix, but it’s likely going to get it right, right out of the box.
- Next, fit a function to the data. This is not much more exciting, you can do this in Excel or LoggerPro pretty easily.
- You can edit any feature of the graph and add comments easily through plotly’s GUI. The departures from standalone graphing software begins here. How do you move, modify and embed legends/comment boxes in Excel without skewing the graph, anyway?
- Get creative with how your data are represented. Switching among graph types is a snap and adding a fourth dimension to your data can be done in different ways (datapoint color or size, for example).
- Share your graph and data with someone else privately. Or, share it publicly. The setup is similar to Dropbox, and just as easy. Those you’ve shared your file with will see the graph and the data. You’re essentially sharing the graph’s DNA, not just the final output.
- Graphs can be posted directly to social media outlets as fully interactive objects for others to explore.
So far that’s not really super-wonderful, it’s just a graphing utility that’s gone ‘googledocs-like.’ But wait, there’s more. A whole lot more.
- Others can save your graph with its embedded data for their own work. They can’t change your original file in your account (unless you give them permission to), but they can tweak the settings and output and then save as a file of their own. Then their interpretation can be re-shared. If you are looking for a collaboration, this is great!
- With the notebook feature, changes can be logged. A digital record of each collaborator’s modifications, comments and code all populate a journal for review.
- So next, take your graph and embed it in a blog as an object. Not as a .png or a .jpg, but as a fully interactive object just as it functions in plotly. This enables further sharing among your blog visitors. My attempt at this is below. It’s my first plotly of HS physics teachers in OK per county as a function of county number:
https://plot.ly/~SteveMaier_/3/ok-hs-physics-teachers/ (Unfortunately, embedding plotly graphs is not yet possible in WordPress, but is in github--for for now you'll need to click the link).
But it needs help! Can you save and then edit a version of your own to better represent the data???
“And now it gets crazy . . .” (This is pretty much a quote of Matt’s)
- Plotly will soon have a live feed for users to publish and share their graphs. It has the potential to be the data guru’s version of Twitter. In the future, you may hear someone ask you at a conference “That’s a great representation of the data, have you posted it to your _________ feed yet? I have some ideas of analyses I’d like to explore with you.” My candidates for the blank: plotly, Analytics, graphguru . . .
- If you’ve created graphs in Matlab, R, Julie, Node.js or Python, then you can import them into plotly. Also, use LaTeX for titles, comments or notes on the graph, no worries. Once in plotly, modify any of the features as you like. Then output the entire file in any of the above formats! Plotly is basically the Rosetta Stone of data analysis.
- Plotly now has the capability of converting a static image of a plot into a plotly file. It essentially deconstructs the image of a graph and reverse engineers the image to create a data file. Then the data are used to create a plotly file. This file will have not just the graph, but the data used to create the graph! So take a graph from a periodical or a newspaper, scan it, apply some plotly magic and your students can run analyses on previously published graphs with data comparable to those collected by the authors! Aside from “fact checking,” this could be a great tool for working with data sets that mirror those used by experts in the field.
Some closing thoughts:
To close, I’ll just add some passing thoughts quickly. I really didn’t want this to become a long post, but there are some really neat possibilities here for the classroom:
- Have students import their lab data directly to plotly and share it among their classmates with a class profile within plotly. Lab data could then be crowd-sourced and/or groups’ data could be plotted on top of one another for comparison. This could be informative if each group had a slight variation in apparatus/question.
- If you’re not up to creating a class profile in plotly, just designate a class specific hashtag for quick searches if posts/graphs are in social media.
- Have classes collaborate across institutions! Think about your students sharing data and graphs with high schools a few states away or an ivy league university across the nation.
- What if Vernier or PASCO sensors were used in line with plotly for streaming data off your student’s lab benches?
- A word of caution: my stats committee member would be quick to point out that unless you have formalized your question prior to data collection, then any analyses are purely exploratory. I don’t think plotly minds this. In fact, they want folks exploring, that’s there entire gig. However, broad sweeping conclusions might not be appropriate from data used and analyses completed. This is less of an issue for physical systems.
Take away message: plotly is worth a look!