Skip to content

Instantly share code, notes, and snippets.

# install.packages(c("httr", "jsonlite","glue", "knitr", "base64enc"))
# install.packages("tidyverse")
library(tidyverse)
library(base64enc)
library(glue)
library(jsonlite)
library(httr)
library(plyr)
{
"data": [
{
"sets": [
"HHE Report"
],
"size": 3057
},
{
"sets": [
{
"data": [
{
"sets": [
"HHE Report"
],
"size": 3057
},
{
"sets": [
Benzoic acid, Ethyl paraben, ETHYL PARASEPT,Ethyl p-hydroxybenzoate => Ethylparaben
eau, H2O, aqua => Water
@mwfrost
mwfrost / DutchTenCommandments.md
Created March 10, 2016 05:00
Dutch Ten Commandments to Foil the Nazis
  1. Thou shalt resist the evil one with all power; thou shalt be courageous, intelligent, and stubborn.
  2. Thou shalt not spread false rumour, nor accept empty phrases, but shalt speak the truth.
  3. Thou shalt not extinguish thine anger, but shall master it, that thy conscience may not be blunted by adjustment to wrong causes.
  4. Thou shalt renew the life of thy soul, that civilisation may find thee ready after the fires of war.
  5. Thou shalt aid in building a community that offers all of good-will a fair chance, justice, peace, and truth.
  6. Thou shalt not withhold thyself from common suffering, but shalt live here with a warm heart and judge thine enemy in justice.
  7. Thou shalt not be passive only, but shalt turn thy soul to the permanent risk of life.
  8. Thou shalt not safeguard the purity of thy soul in pernickety ways, but shalt follow thy destiny in the great order of the world, and not withhold alliance in the fulfilment thereof.
  9. Thou shalt pursue light even in the darkness, for light remain
@mwfrost
mwfrost / TrumpTheory.md
Created February 25, 2016 18:37
A theory of Donald Trump's motivation and likely intention to quit the race

Here's my theory of Donald Trump's presidential campaign, in one place so readers don't have to root though my tweets.

Back in October and November, I started joking that Trump and Bill Clinton had a running bet, or a dare of sorts going. Trump's candidacy was an ego-stroking stunt intended to amuse the bored billionaire and leave the Clintons beholden to him.

Then GOP support began to drift Trumpward, and I hinted that party insiders might have realized that the fix is in. Maybe they were hoping for Trump to burn out the much-unloved Ted Cruz.

By January I had doubled down on my prediction. I remained convinced that he would devise a face-saving exit. This conviction got harder and harder to sustain as Trump rolled over the other GOP candidates in New Hampshire,

@mwfrost
mwfrost / chiclet_plot.r
Last active August 29, 2015 14:01
ggplot2 code for generating grid plots for proportional comparison
# Generate test data
chicdat <- diamonds
# calculate percentages by the categorical variable
chicdat$pct.full <- 1/nrow(chicdat)
catpct <- ddply(chicdat, .(cut), summarize, pct=sum(pct.full))
catpct$rollpct <- cumsum(catpct$pct)

Keybase proof

I hereby claim:

  • I am mwfrost on github.
  • I am mattfrost (https://keybase.io/mattfrost) on keybase.
  • I have a public key whose fingerprint is A490 859F A301 86D8 B7AB 4329 D574 53AA F3FD C426

To claim this, I am signing this object:

@mwfrost
mwfrost / gist:8116812
Created December 24, 2013 18:59
RMarkdown project for Bill McBride's Questions for 2014
git filter-branch -f --tree-filter 'rm -rf data/wv_accidents.csv' HEAD