Blog archive
2021
-
September 7
Use R to explore the three rules of do-calculus in plain language and derive the backdoor adjustment formula by hand
-
August 27
How to automatically convert TikZ images to SVG (with fonts!) from knitr
Make knitr and R Markdown convert TikZ graphics to font-embedded SVG files when knitting to HTML
-
August 25
Exploring Pamela Jakiela's simple TWFE diagnostics with R
Use R to explore possible biases that come from differential treatment timing in two-way fixed effects (TWFE) regression models
-
August 21
Exploring R² and regression variance with Euler/Venn diagrams
Use R to correctly close backdoor confounding in panel data with marginal structural models and inverse probability weights with both GEE and multilevel models
-
July 20
AFC Richmond / Ted Lasso cross stitch pattern
Make your own Ted Lasso AFC Richmond crest cross stitch with a free pattern and an Illustrator template
-
July 10
Hex sticker/logo cross stitch pattern
Make your own data science hex logo cross stitch with a free pattern and an Illustrator template
-
January 26
Bayesian (cross stitch) sampler
Make your own Bayesian cross stitch sampler with a free pattern of Bayes Theorem and the accompanying Illustrator template
-
January 15
Marginal structural models for panel data with GEE and multilevel models
Use R to correctly close backdoor confounding in panel data with marginal structural models and inverse probability weights with both GEE and multilevel models
2020
-
December 3
Use R to close backdoor confounding in panel data with marginal structural models and inverse probability weights for both binary and continuous treatments
-
December 1
Generating inverse probability weights for both binary and continuous treatments
Use R to close backdoor confounding by generating and using inverse probability weights for both binary and continuous treatments
-
March 12
Emergency online teaching resources
List of resources to help teach online as universities rapidly shut down during the COVID-19 pandemic
-
February 25
Ways to close backdoors in DAGs
Use regression, inverse probability weighting, and matching to close confounding backdoors and find causation in observational data
-
January 10
Automatically zip up subdirectories with Make
Use a Makefile to automatically zip up all subdirectories in a given folder while also accounting for dependencies
-
January 1
Create a dynamic dashboard with R, flexdashboard, and Shiny
Use R Markdown, flexdashboard, and Shiny to create a dashboard that automatically loads data from a Google Sheet
2019
-
October 9
Convert Markdown to rich text (with syntax highlighting!) in any macOS app
Create a macOS Automator service to convert Markdown to rich text from any app in macOS
-
February 16
Chidi's budget and utility: doing algebra and calculus with R and yacas
Use algebra and calculus with R and yacas to find Chidi’s optimal level of pizza and frozen yogurt consumption given his budget and utility function.
-
January 29
Half a dozen frequentist and Bayesian ways to measure the difference in means in two groups
Learn how to run standard t-tests, simulations, and Bayesian difference in means tests with R and Stan
2018
-
December 28
Tidy text, parts of speech, and unique words in the Qur'an
Use R and parts-of-speech tagging to explore the Qur’an in Arabic
-
December 26
Tidy text, parts of speech, and unique words in the Bible
Use R and parts-of-speech tagging to explore the distinctive features of John
-
December 17
The academic job search finally comes to an end
Explore 2.5 years of applying for academic jobs with fancy data visualization
-
December 5
How to test any hypothesis with the infer package
Use the infer package in R to test any statistical hypothesis through simulation.
-
July 30
Create a cheap, disposable supercomputer with R, DigitalOcean, and future
Use the future R package to run computationally intensive R commands on a cluster of remote computers
-
March 8
Show multiply imputed results in a side-by-side regression table with broom and huxtable
Extend broom’s tidy() and glance() to work with lists of multiply imputed regression models
-
March 7
Meld regression output from multiple imputations with tidyverse
Use tidyverse functions to correctly meld and pool multiply imputed model output.
-
February 15
Fun with empirical and function-based derivatives in R
Use R to do things with derivatives, both with actual functions and with existing empirical data.
2017
-
September 27
Working with R, Cairo graphics, custom fonts, and ggplot
The Cairo graphics library makes it easy to embed custom fonts in PDFs and create high resolution PNGs.
-
September 15
Create supply and demand economics curves with ggplot2
Use ggplot to create economics-style, non-data-based conceptual graphs.
-
August 26
Quickly play with Polity IV and OECD data (and see the danger of US democracy)
Use ggplot to reproducibly see how much trouble the Polity Project thinks the US is in.
-
August 10
Exploring Minard's 1812 plot with ggplot2
Use ggplot to do fun and fancy things with Minard’s famous plot of Napoleon’s 1812 retreat from Russia.
-
April 27
Super basic practical guide to Docker and RStudio
Use RStudio inside Docker containers for portable and reproducible development environments.
2016
-
December 8
Save base graphics as pseudo-objects in R
Use pryr to save a series of R commands as a kind of macro you can call repeatedly.
-
April 25
Convert logistic regression standard errors to odds ratios with R
Correctly transform logistic regression standard errors to odds ratios using R
-
April 3
Drone sightings in the US, visualized
See where the FAA has reported hobbyist drone sightings from 2014–2016
-
February 11
Fauxcasts: Use a podcast app to listen to audiobooks
Create a temporary podcast feed of a CD-based audiobook and use a modern podcast app to listen to the book faster and better.
-
February 10
Use LibreOffice Base as a GUI for an SQLite database in OS X
Connect LibreOffice to an SQLite database to take advantage of SQLite’s ubiquitousness and LibreOffice’s form-based GUI.
2013
-
May 28
Toggle the Bluetooth menu item with AppleScript
The OS X Bluetooth menu item re-enables itself every time a device battery gets low. This simple application turns it back off.
-
March 15
True side-by-side page numbers in InDesign
Automatically create side-by-side page numbers for parallel texts or spread numbers in InDesign.
2012
-
July 2
Stop using boring, boilerplate Lorem ipsum filler text and build your own random, semi-coherent text from Project Gutenberg books.
-
April 17
Install R, RStudio, and R Commander in Windows and OS X
R, RStudio, and R Commander are all powerful open source statistical tools, but they can be a little tricky to install. These instructions make it easy to get everything working right.
2011
-
June 25
World-Ready Composer not Perfect
Even though InDesign’s new World-Ready Composer is awesome, it is still buggy and struggles with a few Arabic fonts.
-
June 24
Using Arabic in InDesign CS5 without InDesign ME
Use InDesign CS5‘s hidden World Ready Composer to typeset text in Arabic and other complex scripts.
-
June 19
Fake CloudApp with Dropbox and Quicksilver
Move files to your Dropbox public folder and generate a shareable URL instantly, à la CloudApp, with a combination of a few services and Quicksilver triggers.
-
February 3
A poem in honor of the #Jan25 Tahrir protestors
-
January 27
Mona Prince on #jan25 Egyptian Protests
Mona Prince’s personal account of the #jan25 Egyptian protests
2010
-
September 24
iOS 4, Multitasking, and Battery Life
The multitasking capabilities of iOS 4 seem to be draining my battery. Help me figure out how to stop it!
-
February 28
On February 28, 2010 at the American University in Cairo, Jordan’s Queen Rania gave a speech on the importance of civic engagement in the Arab world. While her idea that regular citizens need to be more involved in government, the hardhanded policies of Arab governments make it almost impossible for that to happen.
2009
-
September 23
flashbakectl is a handy little script that starts and stops Flashbake by loading and unloading plist files.
-
August 18
Flashbake-iTunes is a plugin for Flashbake that allows you to include information for the current track in the periodic git commit message.
-
August 1
Using Google Voice and Gizmo Project Together
Description of how to make Google Voice and the Gizmo Project work together with an ATA so that you get a free phone number and almost free phone calls.
-
July 30
Pictures and details of a minor train wreck in Alexandria, Egypt on July 30, 2009.
-
July 29
A detailed, updated tutorial on how to install, use, and customize pdftk-php.php, which combines the power of pdftk and PHP, allowing you to serve dynamic PDF forms from the web.
-
July 28
On narrowing and redefining research
After a year of deliberation, I may have finally decided what to write about for my thesis.
-
July 19
Import a Blogger Blog to InDesign with Perl
This Perl script lets you take a backed-up Blogger XML file and convert it to an InDesign Tagged Text file for book layout.
-
June 19
After almost two years, I’ve officially developed and released pdftk-php–a script that lets you inject form data into a PDF with PHP.
-
May 14
Traffic in Cairo is horrible, especially when all the taxi drivers, the ubiquitous life-blood of the Egyptian streets, have a deathwish for you.
-
May 1
I got 25 Google Profile business cards for free. Woot!
-
April 26
Typing transliterated Arabic quickly
Use text-replacement software to automate Arabic transliteration.
-
March 18
Libya, obsolete paradigms, and Rip Van Winkle
Lisa Anderson’s research of political systems in Libya reveals that standard Middle East Studies paradigms don’t fully apply.
-
March 15
Do not succumb to economic stupidity
Listening to NPR’s Planet Money economics podcast really does help to understand the current economic crisis.
-
March 8
I finally converted my ancient, inefficient PHP-ish website to a mean, lean, WordPresss running CMS.
2007
-
October 6
Populating a LiveCycle PDF with PHP and MySQL
Tutorial explaining how to populate a LiveCycle PDF form using PHP and MySQL.
-
September 17
Using Arabic in InDesign without InDesign ME
How to use the Glyphs panel in InDesign CS3 to insert Arabic text, despite the lack of support for Arabic.