OpenSDP Dataviz Tutorial (R)
Plotly + R Shiny
This example tutorial will teach you how to use Plotly and Shiny in R to create interactive data visualizations. The first part of the tutorial is interactive and uses the learnr R package to teach you plotly in your web browser or RStudio viewer. In the second part of the tutorial, switch to opening the numbered .R files in RStudio. You can still follow along in the tutorial for the second half.
Download and install R.
Download and install RStudio. Make sure you have the latest versions!
Inside RStudio go to Tools -> Install Packages and install
shinythemes, and all dependencies. If the install of any of the packages fails because of dependencies, be sure to search for and install the dependency, then try to install the package again. If you have any of these packages already, be sure to update them.
If you are getting this tutorial from the Github, download (zip file) or clone this repository. If you have downloaded it from the OpenSDP website, unzip and extract the files.
Open the plotly_shiny_tutorial_v2.md file in RStudio and hit the green arrow where it says "Run Document."
After finishing the first part of the tutorial, open a new RStudio instance and open the .R files to work on the second part of the tutorial on Shiny. You can still follow along in the tutorial.
This tutorial was originally authored by the Strategic Data Project.
OpenSDP is an online, public repository of analytic code, tools, and training intended to foster collaboration among education analysts and researchers in order to accelerate the improvement of our school systems. The community is hosted by the Strategic Data Project, an initiative of the Center for Education Policy Research at Harvard University. We welcome contributions and feedback.