Custom Web-Based Data Visualizations Using Plotly and R Notebooks
Want to build awesome interactive, web-based, collaborative data visualizations for free using R? You can do that with Plot.ly! What Plot.ly does is take your R code, and based on that, produces really nice interactive charts in D3.js. This allows you to build great customized, sharable data visualizations without having to get all caught up in learning how to code in JavaScript and D3.js. Below you can see a little of what is possible with Plot.ly in R.
I built these charts for my private mastery students group, and I will be providing them exclusive instructional videos that explain the process of building them in a concise step-by-step format. I need to reserve those videos for my students, but I’d still love to be part of your learning journey as well. How are you at self-teaching? If you’re already a coder, that might be an option.
If you’d like to learn to build charts like these from here, you can teach yourself by following this process:
- Go to my Plot.ly profile.
- Look through the data visualizations you see posted there. Click the “VIEW” button on one of the charts that is most interesting to you.
- The data viz will open up on its own webpage. The plot is shown because, by default, the “Plot” tab is selected. Choose the “Code” tab instead.
- In the drop down on the upper-right, you can choose to see the code that supports the data visualization. You can choose from many languages, because Plot.ly is able to convert in and out of all the source languages and the D3.js output. Your options include json, Python, R, Julia, node.js, etc. Choose R.
- (optional) In the upper-right of the page, choose “Export” to export the source code in a variety of different languages.
- Study the code, and back into how the data visualizations are constructed. I suggest starting with the simplest plots first.
If you don’t want to look through all the data visualizations, you can also just get the original R Notebooks I created. They’re hosted at my RPubs account as follows:
- http://rpubs.com/bigdatagal/249775
- https://rpubs.com/bigdatagal/249723
- https://rpubs.com/bigdatagal/249725
*Please note, these notebooks will only work if you sign up for Plot.ly and get your own api key and username
And for the data visualizations. The following is a sampling of outputs you can generate using Plot.ly. Notice how they are super interactive? They are also very easy to post on your site or to use for collaborating and sharing with peers (using a link to a chart’s home on the Plot.ly platform). All good stuff!! That’s why I thought it was important to share this with you and with my students.
One last thing… if you’d like to be part of the private students group, it’s possible – just not at this exact moment. I am updating and expanding the course. It will reopen in the next few months. If you want, sign-up on the waitlist and I will personally email you when they’ve been released publicly. The waitlist Google doc is here: https://goo.gl/forms/aJLQBoeHwmOxDS4t2
Basic Chart Types
R Notebook: http://rpubs.com/bigdatagal/249775
Line Charts
Bar Charts
Pie Charts
Statistical Plots
R Notebook: https://rpubs.com/bigdatagal/249723
Histograms
Boxplots
Scatter Charts
Spatial Maps
R Notebook: https://rpubs.com/bigdatagal/249725
Point Maps
Choropleths
Want access to the instructional videos that teach you how to make these for yourself? The course is closed at the moment, but will reopen REAL soon. Sign-up on the waitlist and I will let you know when they’ve been released publicly. The waitlist Google doc is here: https://goo.gl/forms/aJLQBoeHwmOxDS4t2
Got questions on these demos? No problem! Write them in the comments section below and I will get you an answer. Slay on data ninjas.