Introduction to Networks

table, caption, tbody, tfoot, thead, tr, th, td { padding: 3px; border: 0; outline: 0; font-size: 6px; background: transparent; color: black; margin-left: auto; margin-right: auto; width: 100%; } .node circle { stroke: black; stroke-width: 2px; color: black; } .node text { font-family: sans-serif; text-anchor: middle; pointer-events: none; user-select: none; -webkit-user-select: none; } .link { stroke-width: 4px; } text { font: 18px sans-serif; pointer-events: none; } #end-arrow { fill: #88A; } #scrolly { position: relative; display: -webkit-box; display: -ms-flexbox; display: flex; padding: 1rem; } #scrolly* { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; } figure { position: -webkit-sticky; position: sticky; width: 100%; margin: 0; -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); z-index: 0; } figure p { text-align: center; padding: 1rem; position: absolute; top: 50%; left: 50%; -moz-transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); font-size: 8rem; font-weight: 900; } .

Custom Shiny Input

With a little bit of JQuery, the JavaScript function Shiny.setInputValue lets you take any HTML element and make it a Shiny input which I’ll display here using a div called all_circles which contains three circles. Think of all_circles as a widget like selectInput, the circles themselves would then be the same as setting choices. selectInput("inputID", "Name to Display", choices = c("Red Circle", "Yellow Circle", "Blue Circle")) Because we can envision use cases to be beyond clicking on simple shapes, I wanted to use SVGs, which was my first learning curve.

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.