Adam T. Bradley

Friday Readings

  • The Economist: The end of the line
    New technologies are poised to abolish many call-centre jobs and transform others. At best, jobs will be created more slowly in the Philippines and India; at worst they will vanish. And it is likely that nowhere else will be able to talk its way out of poverty as they have done.
  • Foreign Policy: The Big 5 and the Sad State of Foreign Policy in 2016
    You can now see why I find it painful to write about the 2016 campaign. The good news (such as it is) is that no president gets to run foreign policy on their own, and the things they say in a campaign often bear little resemblance to what they end up doing in office.
  • Crooked Timber: Q: When is a dollar pegged to gold not on a gold standard? A: From 1934-1971
  • Evonomics: More Evidence That Learning Economics Makes You Selfish
  • New Republic: Thomas Jefferson Was a Muslim In the smear campaign before the election for the presidency of the United States, one candidate was accused by his opponents of being a closet Muslim. Some Christians viewed all Muslims as agents of religious error and a foreign threat. The United States faced a hostage crisis, as many Americans were taken hostage by Muslim powers and freed only after a ransom was paid. In one country alone, more than one hundred Americans had been captured and imprisoned. Accounts of these captivities, even forced conversions, were often bestselling books. Piracy off the coasts of North Africa was a major problem for American cargo ships. A social Christian, hoping to preserve a purely Protestant Christian America, was worried that aliens might take over the reins of power in the country and opined that the few … Jews, Mahomedans, Atheists or Deists among us must, in the name of prudence and justice, be excluded from our publick offices.
  • Gadgette: Homeopathy: the air guitar of medicine
    This subhead contains as many active ingredients as your sugar pill
  • Tom Weller: Beowulf ond Godsylla
    Ne foe beaten/mie færsom cung-fu.

Friday Readings

Friday Readings

The study of money is the root of all evil

All these findings correspond with a substantial body of research in the economic literature, which, with the help of surveys, laboratory experiments, as well as field experiments showed that those who learn about markets (economists) or act in markets (businessmen) are lacking in … ‘pro-social behavior’ … I also use corruption as a proxy to show whether there are any differences in pro-social behavior between economists and non-economists, but unlike them, I observe behavior outside the artificial situation of a laboratory. By analyzing real world data of the U.S. Congress, I found that politicians holding a degree in economics are significantly more prone to engage in corrupt practices.

René Ruske, Does Economics Make Politicians Corrupt? Empirical Evidence from the United States Congress

Social Network Simulation with PaperJS

What it's doing: Each node has a belief that matches its hue, represented as an angle between 0 and 359 degrees. Every 25 frames (once a second or so), a node is chosen at random and given a choice whether to speak; if it does (this is represented by a fading circle expanding from the node). Every other node has a chance to hear the speaking node based on the distance between the speaker and the listener--the farther you are from the speaker, the less likely you are to hear.

Once a node does hear another node, it will only care about what it's hearing under one of two conditions:

  1. The hearer's beliefs (i.e. color) are similar to the speakers, in which case the hearer's beliefs will move slightly closer to the speaker's; or
  2. The hearer's beliefs are very different from the speakers, and its beliefs will move even further away from the speaker's.

In either case, there is a small chance the hearer will subscribe to the speaker, which adds a line between the two and means the hearer will always hear announcements from that speaker.

**NB:* This isn't designed--at least in this incarnation--to be a realistic simulation of anything. It's another experiment with PaperJS.*

Word Hail

This is a minor experiment with Paper.js, made while I (re-)teach myself to animate color and movement. (Click through to view.)

RMarkdown and Jekyll

While migrating my blog recently from WordPress to Jekyll, I looked for easy ways to post RMarkdown documents to my blog. I ended up developing two options of my own (available on GitHub):

jekyll.R provides two R functions to let you add posts or drafts to your Jekyll blog direct from the RStudio console, by knit()ing an .Rmarkdown document into markdown with the YAML front-matter Jekyll expects. This is probably the best option for blogs.

rmarkdown_converter.rb is a Jekyll plugin that provides an Rmarkdown converter. This lets write your posts in RMarkdown and save them in your site's _drafts or _posts directory with the extension Rmd or Rmarkdown, just like you normally post standard markdown documents.

The downside here is that changes to your R environment (you get a new computer and don't reinstall all of the packages you had before, you upgrade R and one of the packages you used to use is no longer supported, etc.) can make it impossible to build your blog (or at least some posts). It might be more useful for some non-blog sites.

This code borrows heavily from the sample converter on the Jekyll plugins documentation page and this post by Simon Elliston Ball.