Garrett Catlin

Your friendly neighborhood data scientist.
Pinned post from November 9, 2022

Portfolio

rs.ui: rs.ui is a package that I created that edits the RStudio IDE theme to be completely customized which is not something that can typically be achieved. Here is an example of a theme generated by my package: It can either generate a theme given one color value (if you have a favorite color, for example) or given a csv file specifyi...
Read more
March 15, 2023

Apple Watch Data in R

A while ago I discovered that you can export all of your data in Apple Health. This includes things like sleep metrics, heart rates, exercise routes, steps per day, etc. - pretty much anything that is logged by an Apple Watch (or input by another app). I was curious to see how I could play around with it in R! Export your Health Data: ...
Read more
March 6, 2023

Introducing rs.ui

A while ago I made a post on how you can change the look of RStudio to be custom. File paths have changed since then and so that method is no longer completely valid (though the idea has stayed the same). However, I've just built a package that does all the work for you! rs.ui takes either a color and generates a theme using color theo...
Read more
February 27, 2023

Browser Icons in R Shiny

One nice-to-have feature in a webpage is a little browser icon. And we can certainly achieve this with an R Shiny application. You'll just need the PNG file you want to use as your icon! I'll be using my Generic Navbar Page app as a reference here, and its icon can be found in the Github if you need a quick example. You'll need to plac...
Read more
February 23, 2023

Import Custom Fonts in R Shiny

It's of my opinion that, generally speaking, Shiny apps tend to be utilitarian in design, as opposed to visually-attractive. There's nothing inherently wrong with this as it seems as though many Shiny developers didn't get their degree in UI - I certainly didn't. As such, my entire journey into the CSS and UI parts of Shiny has been so...
Read more
November 9, 2022

Spatial Clustering: Love Letters (Part 5/5: Shiny and Conclusion)

Project Recap: It's finally here, the love letters finale! In case you've forgotten (or are starting here first, tsk-tsk), we're hypothesizing on a new service: Handwritten Greeting Cards (Now!) based on the movie Her. We want our customers to request a card and have it be composed and delivered in the shortest amount of time possible....
Read more
September 29, 2022

Spatial Clustering: Love Letters (Part 4: Discrete Event Simulation)

Project Recap: Over the last 3 posts on the topic, we've been taking a look at different spatial clustering methods to determine the placement of vans. What kind of vans? Vans called to a higher purpose: delivering handwritten greeting cards (see post 1 if you'd like to know why that's a total misnomer). Our goal is righteous: to minim...
Read more
September 26, 2022

Spatial Clustering: Love Letters (Part 3: Equalify)

Project Recap: In Part 1, I motivated this spatial clustering scenario as an optimization problem based on the movie Her. As the executives of Handwritten Greeting Cards (the company the protagonist works for), we are proposing a new delivery method wherein cards are sent electronically to vans in which they are printed and delivered t...
Read more
September 22, 2022

Spatial Clustering: Love Letters (Part 2: OSRM & Weighted Clustering)

Part 1 Summary Last time, I motivated this spatial clustering scenario as an optimization problem based on the movie Her. As the executives of Handwritten Greeting Cards (the company the protagonist works for), we are proposing a new delivery method wherein cards are sent electronically to vans in which they are printed and delivered t...
Read more
August 24, 2022

Spatial Clustering: Love Letters (Part 1: Data Cleaning & Setup)

Handwritten Greeting Cards In my introductory blog post, I mentioned that Her is one of my favorite movies. I was once told that it "makes sense" why it's up there for me. Years later, I still have no idea if that's a good thing or not - I guess I'll leave that one up to you. Regardless, let's ruin the movie by overthinking a toy examp...
Read more
August 24, 2022

Tracking Progress During mclapply()

In the last couple of months, I've been utilizing parallel computing more often with mclapply() and mcmapply() in library(parallel). For those unfamiliar, here's a great introduction to what parallelization is and how to use it in R. As someone who likes to see progress while my code is running, for example printing the iteration in a ...
Read more
August 18, 2022

Running R Shiny Applications from Zip Files

I've been tooling around with R Shiny for a little over a year now and while it hasn't always been a love story, I've sure learned a lot. If built with a focus on the user, I believe R Shiny applications can be incredible communication tools conveying the results of complex statistical modeling in a way that the uninitiated can underst...
Read more
August 17, 2022

More Meaningful RStudio Theming

The Problem: If you've gone spelunking in RStudio's Global Options, you've probably found the appearance tab which lets you customize your editor theme among other things. When I initially discovered this, I was maddened that none of my profs had ever brought it to my attention and were gleefully letting me burn my retinas out with RSt...
Read more
August 11, 2022

BrowseURL() is Objectively Superior to beepr::beep() in R

In R, a fun and short way to bring yourself a little joy is to use BrowseURL() in interesting ways. Mainly, I like to use it in place of beepr::beep() by browsing a YouTube URL. Ultimately, the goal is to have a notification when an expensive task is done processing: # Run as block for (i in 1:100) { message(i) } browseURL("https://www...
Read more
August 10, 2022

Hello, World!

Hello world, my name is Garrett Catlin! I graduated with my Masters' degree in Applied Statistics in December 2021 and, at the time of this writing, I'm currently employed by the Wyoming Department of Health. If you'd like to view me as a more of a person, and less of a whatever-stereotype-statisticians-are-associated-with, you may enj...
Read more