R

Understanding Transit Ridership Trends

Before talking about national transit trends, it’s important to grasp the relative size of the NYC market. The chart below shows the top 10 transit agencies by monthly ridership (June 2019 unlinked trips). NYC dwarfs the other transit markets, and for this post, is set aside as an outlier. {"x":{"visdat":{"86b01bb97616":["function () ","plotlyVisDat"]},"cur_data":"86b01bb97616","attrs":{"86b01bb97616":{"y":{},"x":{},"orientation":"h","text":{},"textposition":"auto","hoverinfo":"x","alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"bar"}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"title":"Top 10 Transit Agencies (June 2019 trips)","yaxis":{"domain":[0,1],"automargin":true,"categoryorder":"array","categoryarray":["San Francisco Bay Area","MTA Bus Company"

Introducing the ipfr package

I’m happy to announce that the ipfr package is available on CRAN! The goal of this package is to make survey expansion, matrix balancing, and population synthesis easier. A basic use case is the task of balancing a matrix to row and column targets: library(ipfr) library(dplyr) mtx <- matrix(data = runif(9), nrow = 3, ncol = 3) row_targets <- c(3, 4, 5) column_targets <- c(5, 4, 3) result <- ipu_matrix(mtx, row_targets, column_targets) rowSums(result) #> [1] 3.

ipfr

An R library for survey expansion and population synthesis.