R

Tipping Point State COVID Cases

What does COVID look like in the state that will determine the Electoral College winner of the 2020 presidential election? To find out, I first downloaded the historical case data from Covid Act Now. This first figure shows the absolute number of cases for all 50 states plus the District of Columbia, Puerto Rico, and the Commonwealth of the Northern Mariana Islands. The next figure depicts the cases per 100,000 population of the average state.

Precedent for Blocking Merrick Garland Nomination?

Recently, Dan McLaughlin argued that historical precedent supports the Republican Senate filling the September 2020 Supreme Court vacancy—and blocking the nominee, Merrick Garland, from filling the February 2016 vacancy. My concern is the 2016 vacancy (and I’ll let you draw your own conclusions about 2020)—was it in fact supported by historical precedent? Providing a very helpful spreadsheet, McLaughlin identifies 19 vacancies occurring in an election year when the president and Senate were not from the same party.

New York State Regional COVID Metrics

If you’re interested in the historical COVID data for New York State regions, it’s right here. Alternatively, you can view it in even larger size. Features: Historical data on 7 metrics (and their submetrics) since May 13 3 complementary Early Warning metrics Interactive maps with tooltips

Password or Passphrase

library(magrittr) Should you use a password or a passphrase? The time it will take your adversary to crack your safe using a brute force method is: \[ Years_{Expected} = \frac{\frac{S^L}{2}}{Guesses/Year} \] \(S\) is the set from which you draw random elements, e.g., letters or words and \(L\) is the length of elements in your passphrase. Using only three randomly chosen terms from the EFF’s New Wordlists for Random Passphrases, it would take an expected 7.

Make America Safe Again

Recently, Laffer and Hartley proposed a negative payroll tax as a more desirable means of moving money into individual pockets than the current multi-pronged response to the health and economic impact of coronavirus. These responses include the Economic Impact Payments, Pandemic Emergency Unemployment Compensation and Pandemic Unemployment Assistance, the Paycheck Protection Program, among others. Laffer and Hartley’s recommendation is to, instead, take some of the approximately 9.40% employees and employers both pay in payroll taxes,1 and turn it into a negative tax received by employees and employers.

Play TicTacToe with an AI

In a recent post, I shared my machine learning skills with a TicTacToe program based on Monte Carlo Tree Search. This post lets you play against the program. Remember, it’s still learning. Nonetheless, it’s actually already a very sophisticated player and so far I’ve only found one weakness. If you find it, go ahead and pummel the program with as many losses as you want until it eventually racks up enough simulated games to change its behavior.

Forecasting Coronavirus Case Counts in NYC

COVID-19 cases are sweeping the globe. One potential hotspot seems to be New York City. Here I show the historical case count and present a simple forecast. I’m not a professional epidemiologist nor forecaster, I merely present a simple forecast for the coming week based on past observations. Here we have the actual data gathered from the historical timemap of New York City’s Department of Health and Mental Health’s Coronavirus Disease 2019 (COVID-19) page as seen at archive.

ZoTFIDF: Adding custom tf-idf tags to your Zotero database

I wanted to add my own custom tags to my Zotero citation management database based on the term frequency—inverse document frequency (tf-idf) formula. While not perfect, this is a nice way to pick out what is distinct and important about individual texts. “external access to the SQLite database (including direct access via the mozStorage API) should be done only in a read-only manner. Modifying the database while Zotero is running can easily result in a corrupted database, as mozStorage caching breaks the normal file-locking in SQLite that allows for safe concurrent file access.

Exploration and Exploitation: Machine Learning for Games

I recently saw the AlphaGo documentary film and it blew my mind. Essentially, a computer was able to beat a world champion in a best of five match of Go, a game with an overwhelmingly large search space—a 19 x 19 board. One of the principal techniques of its success was Monte Carlo Tree Search (MCTS). While it has received adequate exposition elsewhere,1 I thought that a video could be a nice addition to what’s already out there.

Asymmetric Marriage Algorithms: NYC School Placement

Each year, hundreds of thousands of kids apply1 to New York City’s public school system with a ranking of up to twelve schools. The Department of Education then matches all of these students up with a single offer from one of NYC’s 1,800 public schools,2 ensuring maximum satisfaction for the applicants. How does it work? At first glance, my intuition was that this was a really complex problem. After watching this fantastic video, I then sketched out the algorithm in a notebook and came to believe that it was pretty simple.