Posts

Setup RStudio Server on Windows with a Virtual machine

Image
Introduction You may be asking yourself: why would I want to setup RStudio Server on Windows? I already have RStudio, what would be the benefit of running RStudio Server in a Linux Virtual Machine (VM) on my Windows machine be? Here are a few reasons: Multiple RStudio sessions running simultaneously Development for deployment on a Shiny Server Test package development independently of OS For the purposes of this tutorial, we're going to use VirtualBox , however any virtualization product will work, and we'll be installing Ubuntu Server 18.04 LTS , although your preferred Linux distro is also acceptable.  Steps Figure 1. Fresh VirtualBox Manager GUI. The red arrow indicates where to click to setup a new VM. Go ahead and start downloading your distro as it may take a few minutes. Download and install VirtualBox. Hopefully your Linux distro has finished downloading, as installation of VirtualBox may interrupt network connectivity. Go ahead and start Virtu

Tufte and Few and the Human Connection

Edward Tufte and Stephen Few are frequently mentioned together. Several blog posts have talked about their similarities and even compared Tufte to God and Few to Moses, as Jorge Camoes did  here . Tufte would have preferred a simplistic bar plot, and may have enjoyed the first graph aesthetically. Few would have thought the colors and the lines were too distracting, and that the data would be better presented in a table. Both these ideologies leave out the full human condition, although Tufte breaches it by appealing aesthetically, not just the merger of functionality and minimalism, but by creating it a thing of beauty it can be more appreciated. However, if you add to the data the ability to interact with it, you can begin to connect more on a personal level with the data and you form a type of bond with it. Enter  Shiny R . Shiny R is a terrific way to embed interaction with your data. If you followed my previous post, you'll notice I promised a link to my shiny app, and

Connect R to your Plex Server

Image
Hello all, been awhile since I've posted. Here I'm going to show how you can use R to connect to your Plex Server, using my Home Setup as an Example. I'll also link to a shiny application hosted on shinyapps.io at the end of this blog. Setup Find your Plex Media Server database file, mine was /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/ . Ugh, so many spaces. You may need to escape them if pasting this directory into your shell for a cd command. Also you'll need read and write permissions. I've added both my account and the plex account to a group called shield and gave group read/write controls on the directory. You'll need a few packages for this to work, and if you're familiar with R, you should be able to do this easily. I'm running RStudio Server on the same server that Plex is running on, but connecting remotely should not be a problem (I probably should be jailing each of these). To se

Trends in Film Genres Over 76 Years

Image
So for my next analysis, I wanted to look at the number of films released in each genre over several years. I chose the years 1940 to 2016. I obtained the film genre data from The MovieLens project at GroupLens  Since there were a number of films released in the current period, I chose to log transform the data. Below is the resulting graph.  Currently, the most popular film genres to release are dramas and comedies. Eerily, it seems like we like to be as serious as we are silly. The code used to generate this graph will be published shortly.
Image
Mitch Hedberg Mitch Hedberg would be the king of twitter if he was alive today. To honor him, I've decided to analyze some of his top jokes. This will be done using R's text mining package, tm , as well as SnowballC , wordcloud , and viridis . To start, I scraped this BuzzFeed article to compile a .csv of the jokes. Mitch Hedberg's six shortest jokes consisted of 8, 9, 10, and 11 words, and are written below. Dogs are forever in the pushup position. A severed foot is the ultimate stocking stuffer. I remixed the remix… it was back to normal. A burrito is a sleeping bag for ground beef! I tried to walk into Target… but I missed. I drank some boiling water… because I wanted to whistle. In contrast, Mitch's six longest jokes surprisingly consisted of 141, 131, 109, 103, 96, and 92 words. You know when you go to a restaurant on the weekends, it’s busy, so they start a waiting list? They start calling out names, they say Dufrane, party of two. Table ready fo

Jason Voorhees Kills Per Movie

Image
On Screen Deaths of Unfortunate Characters in Friday the 13<sup>th</sup> Films As an 80s horror film junkie, I wanted to know how Jason Voorhees's slasher tendency has changed over time. So I went through IMDB and found the reported deaths done by both Jason and secondary characters. I then compiled the data into a single .csv file, shown below: dat ## name part kills jasonkills ## 1 Friday the 13th (1980) 1 10 0 ## 2 Friday the 13th Part II 2 8 8 ## 3 Friday the 13th Part III 3 10 10 ## 4 Friday the 13th: The Final Chapter 4 13 13 ## 5 Friday the 13th: A New Beginning 5 19 0 ## 6 Jason Lives: Friday the 13th Part VI 6 17 17 ## 7 Friday the 13th Part VII: The New Blood 7 15 15 ##