Skip to main content

Pretty Good Hat

Tag: rstats

A Peloton share card showing Christine D’Ercole smiling, forelight on a dark background. The ride is titled Power Zone Endurance Ride, dated Sept 17, 2023, and was 60 minutes. A heart rate graph at the bottom shows that most of the ride was in HR zone 3.

Really great ride this morning to start my Sunday. It’s a busy week: I’m remotely attending Posit::conf in addition to the pile of regular things going on, and I’m enjoying watching enthusiastic attendees join the conference discord and say hello.

I’m publishing a project I’ve been tinkering with for a while and finally decided to make “good enough” to share! D2Rstats is a set of Quarto notebooks that fetch, store and make fun and useful data out of your Destiny 2 postgame carnage reports, such as this all-time weapon treetop. If you’re comfortable enough with R, it can be a jumping off point to exploring your own game data further. It’s been a lot of fun to refine this, and I’ve learned a ton along the way.

A treemap showing my Destiny 2 total weapon usage. My largest single category is Auto Rifles, and most used single weapon is Bygones.

You can find all my Destiny 2 related projects over at

An infographic summarizing a Peloton high intensity and hills ride. Instructor Ally Love stands at the right side in a pink top, hands on her hips.

Vacation days are great! Today I improved RideShare, my Shiny app that makes shareable ride cards from my Peloton workouts. I had to update to accommodate the new images that the API sends, and I added a clickable history to build cards for any recent ride. I don’t like the styling of these new images quite as much – they’re not as powerful-looking cycling-specific images as the old feed provided – but I’m still really pleased with what I can build with it!

Python + R in Quarto

I’ve been using Quarto for just about everything I can for the past year, advocating for it enthusiastically with anybody who will listen, but today was the first time I started experimenting with combining python and R in a single Quarto document.

Look, I’m somewhat on record as not liking jupyter notebooks. I don’t like how the file format requires an interpreter, which I feel hurts readability and portability. So I’m predisposed to really like something that reduces that friction, and, wow — python in Quarto hits it.

And passing data, interactively, between R and python kernels within a single interface of a Quarto document? That’s mind blown meme territory right there. It might motivate me to learn more python in an environment I like to work, and should also be a great gateway to go the other way: The python to R pipeline! I’m envisioning some learning and tutorial work that takes advantage of both approaches, just deeply excited about what it opens up for doing data work and data people.

See more: Nicola Rennie’s post is a great overview, and I also learned from Danielle Navarro’s writeup of using reticulate.

A scatterplot showing five days of game history. The plots for June 3 and 4 are dense, with lots of varying size dots representing games. About two thirds of the dots on the plot show winning games.

Destiny 2 talk: I had a good time in Iron Banner games this weekend. Most of my matches were fun. I didn’t have any long losing streaks like last season, and really liked the build I settled on. Maybe next time I’ll play my other characters, but it’s all for fun now that I completed the gilded title one more time!

Peloton instructor Cody Rigsby standing in a bicycle and smiling, in the background of text describing a ride. The ride is titled 2000s Ride and shows a graph of time in different heart rate zones.

This morning’s ride was a good start to a busy Sunday. I also got to test out my custom little Shiny app for building nice little shareable images with the Peloton API!

The launch of the new Destiny 2 expansion, Nightfall, adds a new subclass – Strand – and restructures the mod system that affects player stats gained from armor. I’m happy to report that it only took me a couple of hours to revise my Shiny tool to find optimal armor loadouts using the new mods and subclass fragments! I had to hunt a little through some old code, and next time it should be a simple and easy update due to having fixed how I work with the manifest.

A bright yellow background highlights bold text showing my favorite new-to-my artists this year: Big Thief, Low, Japanese Breakfast, Alvvays, and Courtney Marie Andrews. The hashtag at the bottom of the image reads #tuneR.

A heatmap showing calendar days through twelve months, with light yellow showing ‘light’ listening days shading to purple for the heavist days where I listened to the most music. I listened to a lot of music in Januar, July, October and November.

I dusted off the data visualizer that I started working on last year around this time. This year I built a couple of fun Spotify-wrapped-like visualizations; why should Spotify users have all the fun?

If you’re a user, you can try it, too! TuneR is a small Shiny app that you can provide your username and see your year in music, a comparison of this year to your all-time most-listened artists, and a fun heatmap of your listening activity.