RSSAmplifier

Blog

Redwall Analytics

redwallanalytics.comRSS feed ↗20 posts

Latest posts

A Data-Driven Survey of MLB Franchise Management

Note This article brings the MLB franchise analysis onto the main Redwall Analytics site using the published narrative and chart assets from the standalone MLB franchise analysis microsite . The full reproducible pipeline still lives in the companion GitHub repository , where the charts are generated from {lahmanTools} , DuckDB, and supporting baseball data. Using {lahmanTools} and the MotherDuck…

Amateur Urbanist Critique of Work-Live-Ride using 360k Fairfield County Parcels

MetroNorth New Haven Line Stations Introduction Connecticut has long had some of the highest income and home prices in the US. Although home prices have trailed national rate of appreciation in recent decades, from a high starting point, housing has gotten a lot more expensive in absolute terms and is still out of reach for too many. High housing costs have constrained population growth in many…

NYED Data Explorer Shows 15 Years of Charter School Success

NYED Data Explorer filtered for “All Students” ELA Aggregated Annual Test Scores Introduction Three years ago, in the course of building personal projects in R using public data from Connecticut, I wrote How Does Stamford Charter School for Excellence do it? . “Stamford Excellence” was achieving remarkable results in a district with proficiency below 50%. Then and now, the school receives little…

Handling larger than memory data with {arrow} and {duckdb}

Setup library(data.table) library(glue) library(arrow) ## ## Attaching package: 'arrow' ## The following object is masked from 'package:utils': ## ## timestamp library(duckdb) ## Loading required package: DBI library(tictoc) ## ## Attaching package: 'tictoc' ## The following object is masked from 'package:data.table': ## ## shift library(ggplot2) library(scales) library(dplyr) ## ## Attaching…

Loading a large, messy csv using data.table fread with cli tools

Setup library(data.table) library(here) ## here() starts at /Users/davidlucey/Desktop/David/Projects/redwall-analytics library(glue) ## Warning: package 'glue' was built under R version 4.1.2 library(tictoc) setDTthreads(percent = 90) path_to_data <- "~/Desktop/David/Projects/uscompanies/data" path_to_original <- here::here(path_to_data, "uscompanieslist.csv") Introduction On a recent side…

Exploring Stock Market Listing Mortality since 1986

Click to see R set-up code # Libraries if(!require("pacman")) { install.packages("pacman") } pacman::p_load( data.table, re2, scales, ggplot2, plotly, DT, patchwork, survival, ggfortify, scales) # Set knitr params knitr::opts_chunk$set( comment = NA, fig.width = 12, fig.height = 8, out.width = '100%' ) NOTE: The read time for this post is overstated because of the formatting of the Plotly code.…

When Yahoo Finance doesn’t have de-listed tickers needed

Click to see R set-up code # Libraries if(!require("pacman")) { install.packages("pacman") } pacman::p_load( data.table ) # Set knitr params knitr::opts_chunk$set( comment = NA, fig.width = 12, fig.height = 8, out.width = '100%' ) Introduction As we discussed in our last post Introducing the Redwall ‘Red Flag’ Explorer with New Constructs Data , we were able to test the response of 125,000…

Introducing the Redwall ‘Red Flag’ Explorer with New Constructs Data

NOTE: The read time for this post is overstated because of the formatting of the code. There are about 4,400 words, so read time should be closer to 15 minutes. Click to see R set-up code # Libraries if(!require("pacman")) { install.packages("pacman") } pacman::p_load( data.table, scales, ggplot2, plotly, DT) # Set knitr params knitr::opts_chunk$set( comment = NA, fig.width = 12, fig.height = 8,…

A Blueprint of “Red Flag” alerts Using Adjusted Earnings Data

Photo by Valenciana Nicolau Primitiu via Unsplash Introduction In A Walk Though of Accessing Financial Statements with XBRL in R - Part 1 and Learning SQL and Exploring XBRL with secdatabase.com - Part 1 , we set out with the hope of building a model to mine for “red flags” in financial statements following a roadmap set out in by Bruce Gulliver in the 2003 AIMR Conference Proceedings Revelations…

Using Census of Govts to Show that if You Know R, You Know SQL

The Government Finance Database Viewed in RStudio Connections Pane Introduction We have been exploring Willamette University Government Finance Database , a cleaned up and aggregated version of 50 years of annual Census of Governments. For those interested in learning more, please see Willamette’s paper The Government Finance Database: A Common Resource for Quantitative Research in Public…

Introducing the Redwall IRS SOI Tax Dashboard

Introduction The IRS SOI Tax Statistics is a fabulous seemingly undiscovered data set, which should be frequently referenced in any discussion about income and taxes. We often see median income represented by Census data, but have always been skeptical that most people know their exact income in any given year or would report it according to a uniform definition if asked by a census taker. This…

In Search of a Better Home Price Prediction in Greenwich, CT - Part 1

Figure 1: Average Single Family Homes in Towns of Connecticut 1999-2018 Introduction Though losing ground in recent years, Connecticut has long had some of the highest average incomes and home prices in the country. Within the State, some towns have had significantly higher selling prices than others (shown in chart above). In this series, we will attempt to build a model to predict selling prices…

2020-12-10-searching-for-features-to-build-a-property-prediction-in-greenwich-ct-part-2

(Content unavailable)

Tapping Yelp data with Apache Drill from Mac using {sergeant}

Click to see package details # Libraries packages <- c("tidyverse", "sergeant", "tictoc" ) if (length(setdiff(packages,rownames(installed.packages()))) > 0) { install.packages(setdiff(packages, rownames(installed.packages()))) } invisible(lapply(packages, library, character.only = TRUE)) knitr::opts_chunk$set( comment = NA, fig.width = 12, fig.height = 8, out.width = '100%' ) Introduction At…

Finding the Dimensions of secdatabase.com from 2010-2020 - Part 2

Source: xbrl.org Introduction This is part 2 of a 3-part series on extracting XBRL data from secdatabase.com . In Learning SQL and Exploring XBRL with secdatabase.com - Part 1 , we showed how to set up the database connection from RStudio. In this post, we will discuss the basics of XBRL and secdatabase.com ’s SQL representation of it. We will try to understand the dimensions of the database over…

Building a career changer resume with R {vitae} package

# Libraries packages <- c("vitae", "tibble", "spelling" ) if (length(setdiff(packages, rownames(installed.packages()))) > 0) { install.packages(setdiff(packages, rownames(installed.packages()))) } invisible(lapply(packages, library, character.only = TRUE)) knitr::opts_chunk$set( comment = NA, fig.width = 12, fig.height = 8, out.width = '100%' ) Introduction This will be a post about building a…

Exploring 30 years of local CT weather history with R

# Libraries packages <- c("data.table", "ggplot2", "stringr", "skimr", "janitor", "glue" ) if (length(setdiff(packages,rownames(installed.packages()))) > 0) { install.packages(setdiff(packages, rownames(installed.packages()))) } invisible(lapply(packages, library, character.only = TRUE)) knitr::opts_chunk$set( comment = NA, fig.width = 12, fig.height = 8, out.width = '100%', cache = TRUE ) EPA…

Learning SQL and Exploring XBRL with secdatabase.com - Part 1

# Libraries packages <- c("data.table", "DBI", "reticulate", "keyring", "RAthena" ) if (length(setdiff(packages,rownames(installed.packages()))) > 0) { install.packages(setdiff(packages, rownames(installed.packages()))) } invisible(lapply(packages, library, character.only = TRUE)) knitr::opts_chunk$set( comment = NA, fig.width = 12, fig.height = 8, out.width = '100%', cache = TRUE ) Introduction…

Using drake for ETL and building Shiny app for 900k CT real estate sales

# R Libraries for this blogdown post # See Github for libraries used in drake project library(data.table) library(DT) knitr::opts_chunk$set( fig.width = 15, fig.height = 8, out.width = '100%') Introduction The State of Connecticut requires each of its 169 municipalities to report real estate sales used in the assessment process. All reported transactions by towns are published on the Office of…

Evaluating American Funds Portfolio Over Three Market Cycles

Introduction Active funds have done poorly over the last ten years, and in most cases, struggled to justify their fees. A growing list of commentators appropriately advocate for index funds, although sometimes go a little beyond what we believe to be fairly representing the facts. The inspiration for this article is this post by Asset Builder blog site American Funds Says, “We Can Beat Index…