Tutorial

My First Live Coding Interview

Yesterday I interviewed for a position maintaining and creating ShinyApps. To call that a JOB is crazy to me. I love developing reactive web applications, the fact that you can get paid to do that is still mind blowing. I’m realizing that having fun at work is actually a possibility! That said, the data scientist position usually includes a live coding portion. I went into it trying to treat my first one as practice, but every second I didn’t spend typing spanned an eternity.

JavaScript Statements

Computers are awesome for their ability to execute instructions. I mean, do you want to perform repetitive, error prone, menial tasks? Personally, I don’t want to spend time processing data, I just want to analyze it and eventually make pretty graphs. To do this though, the computer needs instructions, and these instructions come in the form of a list of statements. In this post I want to go over the grammar of JavaScript statements.

WTF is a Prototype

From Functions to Object Constructors Let’s start with a function called Person. This function is a class, also called an object constructor because it provides a blueprint to create new objects. It is the conveyor belt on which are objects are made. function Person(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; } function Person(firstName, lastName) { this.firstName = firstName; this.lastName = lastName; } Every object of class Person will accept two arguments, a string for first name and string for last name.

CSS Tips - Notes from CSS Grids

Rather than work through a specific question, this post is a collection of cool CSS tips and tricks I’ve learned through Wes Bos’s free CSS Grids course COLORS I spend a lot of time thoughtfully choosing color pallets, then spend an embarrassing amount of time figuring out what those HEX codes I picked out actually are. The first tip that blew my mind was that we can assign HEX codes to default color names that we want to use repeatedly in our main.

Dirichlet-multinomial distribution

Inspired By Justin Silverman’s Blog Post My shakey understanding of the very useful Dirichlet Multinomial prior brought me to Dr. Brendon Brewer’s lecture explaining how it can be used with an example from the Wheel of Fortune. The contests rotate who spins first by round, but there are 4 rounds. Does this give contestant 1 an unfair advantage? Dr. Brewer tabulated the wins from 30 games to find out.

Why Would I setTimeout(0)?

Along with the hands-on skills I’ve been learning during my internship with RStudio, I’ve also been bolstering my theoretical understandings of programming concepts. This brought me to a common trick setTimeout(0), which defers the execution of a function, giving something else a chance to run. This concept was described using a concrete example in a StackOverflow post that I wanted to explore in more detail (both visually and without using JQuery):

.sql in R

I had an idea for a personal project using the data from a friend’s website and asked if I could get the data to run some stats on it. “Sure, let me send you a .sql datadump real quick”. Oh boy. “Thanks!” WTF is a datadump? I have about a month’s worth of knowledge of SQL, but even that is limited to using SQL on my university’s computer inside a GUI.

Exploring Networks Through Concerts

My favorite music is improvisational; seeing my favorite musicians push themselves into new territory in a one of a kind unique experience is one of the most exciting creative processes to bear witness to. The art of improvisation also tends to bring people together, which was the inspiration behind creating this network. I chose to teach myself network science using a topic I’m extremely familiar with; the jam band live music scene.

Intro to Networks

There’s a lot we can glean from looking at an individual node’s location within a network and a lot of jargon surrounding node attributes. Here I explore some core concepts of node attributes. PIVOTAL NODE Create a simple, cyclic graph g1 <- graph( c("E", "A", "A", "B", "B", "D", "D", "C", "C", "F", "F", "E", "B", "C"), directed = FALSE) When the edge list has vertex names, the number of nodes is not needed