Data Visualization Patterns
How I build interactive articles, essays, & analyses for the web.
Desisions
One of the main reasons I switched from writing through Blogdown or Distill through R was I felt too limited by the existing styles and themes. I'm sure I could have accomplished what I wanted eventually, but it felt like I had to fight against what was already there and wasn't learning as much as if I started from scratch.
There are some tradeoffs between data visualization in R and JS that I had to learn through trial and error:
R advantages:
- Unparalleled data analysis environment
- Simple chart-making through ggplot
- Statistical/ML packages usually have their own functions for visualizing models
- If you are comfortable with default themes and styles, you only need to worry about the data and its analysis
JS advantages:
- Full control over structure & styles with a better development experience for both (no re-knitting docs to see changes on the webpage)
- Libraries for interactive web visualizations (Plot.ly, Mapbox, D3, Deck.gl, etc.)
- Some of these are ported to R but generally give you less control over the API and tend to lag behind the JS version
This is not an exhaustive comparison and I plan to write in more depth about it soon, this is just to give some context on the tools available for the job.