Spencer Schien's Avatar

Spencer Schien

@mrpecners.bsky.social

136 Followers  |  13 Following  |  20 Posts  |  Joined: 10.02.2024  |  1.7192

Latest posts by mrpecners.bsky.social on Bluesky

Preview
Diverging Barplot with R and ggplot2 How to build a diverging barplot by recreating the chart from NY Times using R.

Happy to have my tutorial recreating a NYTimes graph in R posted on the R Graph Gallery!

r-graph-gallery.com/web-divergin...

15.09.2025 14:40 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Copy the Pros: Recreate a Viral NYTimes Chart in R
YouTube video by Spencer Schien Copy the Pros: Recreate a Viral NYTimes Chart in R

New video! Recreate this viral chart by @christinezhang.bsky.social in the @nytimes.com with #rstats. youtu.be/Gjsi9yzBni0

03.08.2025 19:03 β€” πŸ‘ 12    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Copy the Pros: Recreate a NYTimes Chart in R
YouTube video by Spencer Schien Copy the Pros: Recreate a NYTimes Chart in R

New #rsats video! This is another Copy the Pros where I recreate a NYTimes chart in R. Copy the Pros: Recreate a NYTimes Chart in R
youtu.be/XihJUrDXq6s

31.07.2025 13:08 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

What’s the opposite of Edward R Murrow’s β€œGood night, and good luck”, you ask? I give you me signing off of a chart tutorial. #RStats

31.07.2025 03:50 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

I have a #rstats #Positron question: anyone run into issues with auto-indentation, and did you fix it? Here’s a video example of the issue, I want it to work in Positron like it does in RStudio! I’m sure I’m missing something.

25.07.2025 14:37 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 4    πŸ“Œ 0
Recreating a New York Times Chart in R  | Line-by-line Coding Tutorial
YouTube video by Spencer Schien Recreating a New York Times Chart in R | Line-by-line Coding Tutorial

New #rstats video!

Recreating a New York Times Chart in R | Line-by-line Coding Tutorial
youtu.be/HDCJIkY2ihI

24.07.2025 14:04 β€” πŸ‘ 8    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

I would love an #rstats function that copies a dataframe to a clipboard in a table format that I can drop in an email or chat. Anyone have tips here? I found how to copy in a delimited format, but it wasn’t coming through in a table.

21.11.2024 19:35 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 6    πŸ“Œ 0

To me, when I write it I’m thinking: okay, starting with df1, and I’m augmenting with df2.

Starting with the data and layering operations is more intuitive to me.

20.11.2024 19:48 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

So far it looks like people prefer the first approach but suspect it’s not best practice. I definitely prefer the first but asked because I thought it would be in the minority! #rstats

20.11.2024 19:48 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 6    πŸ“Œ 0

Stirring the pot this morning: #rstats crowd, which do you prefer?

df3 <- df1 |>
left_join(df2)

OR

df3 <- left_join(df1, df2)

20.11.2024 14:32 β€” πŸ‘ 6    πŸ” 0    πŸ’¬ 12    πŸ“Œ 1
Preview
GitHub - Pecners/rayshader_portraits Contribute to Pecners/rayshader_portraits development by creating an account on GitHub.

Thanks! Yeah you can find a lot of code in this repo: github.com/Pecners/rays...

18.11.2024 00:24 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Population density map of Arizona, rendered in 3d with R using the Rayshader package.

Population density map of Arizona, rendered in 3d with R using the Rayshader package.

Arizona Population Density

Is #rstats a thing on here? This was made with R.

15.11.2024 00:01 β€” πŸ‘ 14    πŸ” 2    πŸ’¬ 2    πŸ“Œ 2
Post image

My inspiration for this map was a combination of ice and stars. Ice because, Alaska is way north, but also the reflective quality highlights the sparse population.

Stars because the sparse population centers look a bit like stars in the sky, and as a reference to Alaska's flag.

25.09.2024 01:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

How does that 14% compare to the rest of the US? Alaska has more National Park land than the rest of the US, combined.

25.09.2024 01:49 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Among that surfeit of unpopulated land is a large amount of National Park land. About 14% of land in Alaska is managed by the National Park Service.

25.09.2024 01:49 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image

While there isn't much population, there's a lot of land. In fact, Alaska's land area is about equal to that of these 12 states.

25.09.2024 01:48 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

There are just a handful of identifiable population centers. Top 3 most populous cities are visible: Anchorage, Fairbanks, and Juneau.

25.09.2024 01:48 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
Population density map of Alaska.

Population density map of Alaska.

Chapter 2: Alaska Population Density

Or, what population density?

25.09.2024 01:47 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Population density map of Alabama

Population density map of Alabama

Just started a new project to compile state population density maps in a book format. Check out my first chapter on Alabama: pecners.github.io/state_popula...

03.09.2024 02:33 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Population density map of Illinois, rendered in 3D with R using the rayshader package.

Population density map of Illinois, rendered in 3D with R using the rayshader package.

Population density of Illinois

10.02.2024 00:59 β€” πŸ‘ 8    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

@mrpecners is following 13 prominent accounts