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!
- really good workout
- helped make spritz cookies
- wrapped gifts
- fixed oauth flow of my shiny armorer app for Destiny 2
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.
👍 Christmas Eve, so far:
I dusted off the last.fm 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 last.fm user, you can try it, too! TuneR is a small Shiny app that you can provide your last.fm 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.
Got nginx running on my MacBook today, as part of building some working-with-APIs-infrastructure for a small tutorial I want to write on working with oauth in Shiny. Good step!
I used the RStudio tool profvis this weekend to find speed improvement opportunities in Armorer. I suspected that I could rewrite a big operation that calculates the maximum of many columns across several thousand rows. Holy smokes: Using matrixStats::rowMaxs
cuts processing time by an amazing amount!
I finished a big update to Armorer this week, to enable inclusion of subclass fragments in stat calculations. I learned a ton with this release and laid good groundwork for additional mod management. I’m pretty pleased!
Super-pleased to see that a couple of small Shiny app improvements I made this weekend correctly picked up on some source data changes today and automatically handled them. Pretty cool!
I successfully made some small changes in a Shiny app to use the {pins} package to separate out a support file and data definitions from the app bundle itself. This lets me revise supporting information without needing to republish the app. It’s pretty cool! I’m excited to use the package lots more.
Sharing a quick tip that I’ve found useful while building with Shiny, recently: It’s handy to be able to save off the current state of a data set for bringing over to a scratch file. I made the download link appear only when running in my local environment. This way I can easily snapshot my in process data set for experimenting with visualization in my scratch file.
In ui.R
:
if(interactive()) {
downloadLink("downloadData", "💾️ Download data set")
}
And in server.R
:
output$downloadData <- downloadHandler(
filename = function() {
paste("shiny-export_", Sys.Date(), ".csv", sep="")
},
content = function(file) {
write.csv(globaldata$armor, file)
}
)