I have graphics working in Vanilla JS WebR, now, and I’ll cover the path to that in two parts. The intent was to jump straight into ggplot2-land, but, as you saw in my previous post, WASM’d ggplot2 is a bear. And, I really didn’t grok what the WebR site docs were saying about how to… Continue reading
Post Category → ggplot
Starting 2022 Off With A Fairly Complex {ggplot2} Recreation Plot
The New York Times had a [tragic] story on Covid deaths today and one of their plots really stuck with me for how well it told that part of the story. NOTE: The red panel highlights are off a bit as I manually typed the data in (I only did the recreation to keep {ggplot2}… Continue reading
Short Attention Span Theatre: Reproducing Axios’ “1 Big Thing” Google Trends 2019 News In Review with {ggplot2}
I woke up to Axios’ “1 Big Thing” ridgeline chart showing the crazy that was the 2019 news cycle: and, I decided to reproduce it in {ggplot2}. Getting The Data First, I had to find the data. The Axios chart is interactive, so I assumed the visualization was built on-load. It was, but the data… Continue reading
September 2019 Democratic Debates Added to {ggchicklet}
The latest round of the 2020 Democratic debates is over and the data from all the 2019 editions of the debates have been added to {ggchicklet}. The structure of the debates2019 built-in dataset has changed a bit: library(ggchicklet) library(hrbrthemes) library(tidyverse) debates2019 ## # A tibble: 641 x 7 ## elapsed timestamp speaker topic debate_date debate_group… Continue reading
Make Refreshing Segmented Column Charts with {ggchicklet}
The first U.S. Democratic debates of the 2020 election season were held over two nights this past week due to the daft number of candidates running for POTUS. The spiffy @NYTgraphics folks took the tallies of time spent blathering by each speaker/topic and made rounded rectangle segmented bar charts ordered by the time the blathering… Continue reading
Quick hit: Some ggplot2 Stat 💙 for {logspline}
I’ve become a big fan of the {logspline} package over the past ~6 months and decided to wrap up a manual ggplot2 plotting process (well, it was at least in an RStudio snippet) into a small {ggplot2} Stat to make it easier to visualize various components of the fitted model. If you’re new to logspline… Continue reading
Make Multi-point “dumbbell” Plots in ggplot2
A user of the {ggalt} package recently posted a question about how to add points to a geom_dumbbell() plot. For now, this is not something you can do with geom_dumbbell() but with a bit of data wrangling you can do this in a pretty straightforward manner with just your data and ggplot2. The example below… Continue reading
Mapping Tornado Alley with R
I caught a re-tweet of this tweet by @harry_stevens: THREAD: I wrote a post on @observablehq about a map I made today. It shows a typical day in the life of a graphics journalist: You never know what problems you'll have to solve on deadline! https://t.co/yRhW1wbLxN #d3js #dataviz 1/7 pic.twitter.com/7N6mmK0nz3 — Harry Stevens (@Harry_Stevens) May… Continue reading