Weak Convergence and The Portmanteau Theorem
The Portmanteau Theorem provides a set of equivalences of weak convergence that still remains relevant for establishing asymptotic results in probability and statistics. While the theory around weak convergence is well developed, I was inspired to put together a writeup proving all the equivalences in a self contained manner, by first presenting the relevant theorems…
RObservations #51: Download Kaggle Datasets into the R Console with {RKaggle}
I recently found some R code in the TidyTuesday repository which pulled data from Kaggle directly into the R console and I thought the idea was incredible! After looking around and seeing that there was no packages that already did this, I was inspired to create the {RKaggle} package which allows users to download datasets…
RObservations #50: a journey across the United States with {mapBliss}
{mapBliss} is a package initially developed in my attempt to copy the offerings made available by a site (since defunct) called Atlas.co. Recently I was talking about the package in a group chat and someone reached out to me sharing that he traveled to 43 states in the United States and shared with me a…
RObservations #49: Smith-Pittman Algorithm: Enhancing Community Detection in Networks
Introduction Social network analysis examines individual entities and their relationships among them. The data is represented as a “graph” where individual entities are referred to as “nodes” and their relationships between them as “edges. A primary area of study in SNA is the analysis of interconnectivity of nodes, called ”communities” and identification of clusters through…
RObservations #48: Exploring All Possible Hands in 5 card Poker
Introduction Recently, I have been reading “Mathematical Statistics” by Professor Keith Knight and I noticed a interesting passage he mentions when discussing finite sample spaces: *In some cases, it may be possible to enumerate all possible outcomes, but in general such enumeration is physically impossible; for example, enumerating all possible 5 card poker hands dealt…
RObservations #47 : Knitting .Rmd Files to Google Docs with knit2docs
Introduction RMarkdown is a powerful framework for writing a documents that contain a mixture of text, code, and the output of the code. Popular output formats for RMarkdown Documents (.Rmd) include HTML, PDF and Word Documents. It is also possible to output RMarkdown documents as part of a static website using blogdown package and is…
RObservations #46: Starmaps and Shiny- I Replicated an E-Commerce Store Using My Custom Package, starBliss
Introduction Recently, I released a R package called starBliss that aimed to replicate the output of a e-commerce site called MapsForMoments – a site which lets users order custom prints of the night sky on the date of their choosing (usually a special occasion such as a birthday, first date, wedding etc.) and allows them…
RObservations #45: Making Beautiful Star Maps With The `starBliss` Package
Introduction Continuing my explorations in developing custom map art, I decided to take a detour from developing the mapBliss package to explore another type of map which is very popular in the map-art space- star and constellation maps! This initially started out as an issue opened on the mapBliss Github. However, I quickly realized the…
RObservations #44: Adding Frame and Custom Title Support To mapBliss
Introduction The mapBliss package is a R package which I developed which allows for users to make custom souvenir quality maps of their flights, road trips and favorite cities by utilizing the power of the leaflet and other R packages (for a full list, see the Github README here). The goal of the package is…
RObservations #42: Using the jinjar and tidyRSS packages to make a simple newsletter template
Introduction Jinja is a powerful templating engine that is useful in a variety of contexts. Recently, I discovered how its possible to use the power of Jinja syntax in R with the jinjar package written by David C Hall. With jinjar and the tidyRSS package by Robert Myles it is possible to make an email…
RObservations #41: Making a “Matlab Pumkin” in R
Introduction A while back I saw the Mathworks LinkedIn page make a post on how it is possible to make a Pumkin and other autumn gourds with Matlab code (for a more complete list of how to make other autumn Gourds in Matlab, check out Eric Ludlam’s Github repository). Seeing this inspired me to give…
RObservations #40 : Packaging My Route Map Code! Introducing mapBliss.
Introduction Around last year I started blogging about Atlas.co and how its possible to imitate their product in R with a some readily available packages and the MapBox API. Recently I managed to take some time and refine and organize the code I had to make the package I call mapBliss. I’m really happy with…
RObservations #39: Uncovering A Stranger Side Of The Collatz Conjecture
Introduction The Collatz Conjecture is one of the most famous unsolved problems in mathematics which only requires the knowledge of 4th grade math to understand. This blog was initially intended to show how to code the Collatz conjecture as function and visualize stopping times as well as the hailstone sequences for some positive integers. However…
VBATime #1: Writing A Custom VLOOKUP Function With VBA
VBA is a language which I dabble with from time to time and often when making Excel-based solutions, having to use VBA becomes inevitable. Recently, I needed to create a function that worked slightly different from VLOOKUP and required me to look deeper into how VLOOKUP works. This inspired me to explore the functionality of…
RObservations #38: Visualizing Average Delay Times On TTC Subway Stations
Introduction Any Torontonian who has commuted regularly on the TTC has probably experienced their fair share of delays on the subway. Having experienced a few recently I was inspired to visualize the average delay times across all stops on the subway. What are the stations with the longest delays on average this past year? Could…
RObservations #37: Demistifying the tapply() function and comparing it to the “tidy” approach.
Introduction Many seasoned base R users use the tapply() function to help them in many contexts and talk about how powerful it is. However, many new R users have either have never seen tapply() or they have and are unsure how it works. The documentation is not very helpful in explaining it either: [tapply() applies]…
RObservations # 36: Opinions on RStudio’s name change. A Bayesian approach with Stan
Introduction Recently, RStudio announced its name change to Posit. For many this name change was accepted with open arms, but for some-not so. Being the statistician that I am I decided to post a poll on LinkedIn to see the sentiment of my network. After running the poll for a week the results were in:…
RObservations #35 : Predicting Rubik’s Cube Rotations with CNNs
filename xRot <chr> <dbl> 000000.jpg 336.8389 000001.jpg 148.4844 000002.jpg 244.8217 000003.jpg 222.7006 000004.jpg 172.3581 000005.jpg 205.6921 Due to the magnitude in size of the data, the data cannot be preprocessed and trained in a single step. In leiu of this, the data is grouped and trained in groups of 100 images with batch sizes being…
RObservations #34: Using NLP with keras to understand market sentiment with LSTM networks
Introduction Natural Language Processing (NLP) is a powerful tool in the Machine Learning landscape that can (among other things) allow users to classify sentiment and predict text. Many of recent my blogs have been about data manipulation and data engineering, so I decided change things up to look into showing some applications of machine learning.…
RObservations #33: Merging Excel Spreadsheets with Base R and openxlsx
Introduction I was recently asked as part of a larger task to combine multiple sheets from an excel workbook into a into a single sheet. When approached about the problem I immediately was asked if I was going to use VBA to do it. While I know my way around VBA, since VBA does not…
Something went wrong. Please refresh the page and/or try again.