Skip to content

Instantly share code, notes, and snippets.

// Requires egenmore package, which can be installed with:
// ssc install egenmore
import delimited https://covidtracking.com/api/v1/us/daily.csv, clear
gen newdate = date(strofreal(date,"%8.0f"),"YMD")
format newdate %tdCCYY-NN-DD
drop date
rename newdate date
label var date "Date"

  BIP: 1XX
  Title: Increase maximum block size to 8MB
  Author: Eli Dourado <elidourado@gmail.com>
  Status: Draft
  Type: Standards Track
  Created: 2015-08-20

Abstract

@elidourado
elidourado / igm.csv
Created April 8, 2015 15:16
Data from scraping the IGM Economic Experts Panel website on 4/8/2015
We can't make this file beautiful and searchable because it's too large.
"Date","Question","Name","Institution","Answer","Confidence","Comment"
"Tuesday, April 07, 2015 1:42pm","The Fed should wait until its preferred measure of inflation (Core PCE) is clearly rising — and not just forecast to rise — before it begins hiking interest rates.","Daron Acemoglu","MIT","Disagree","5","I am worried about misallocation of capital & the wrong type of risk-taking resulting from extended periods of very very low interest rates."
"Tuesday, April 07, 2015 1:42pm","The Fed should wait until its preferred measure of inflation (Core PCE) is clearly rising — and not just forecast to rise — before it begins hiking interest rates.","Alberto Alesina","Harvard","Did Not Answer","",""
"Tuesday, April 07, 2015 1:42pm","The Fed should wait until its preferred measure of inflation (Core PCE) is clearly rising — and not just forecast to rise — before it begins hiking interest rates.","Joseph Altonji","Yale","Did Not Answer","",""
"Tuesday, April 07, 2015 1:42pm","The Fed should wait until its preferred mea
@elidourado
elidourado / igm.R
Created April 8, 2015 15:12
This is R code to scrape the IGM Economic Experts Panel website
#the XML package must be installed
require(XML)
require(utils)
trim <- function (x) gsub("^\\s+|\\s+$", "", x)
isempty <- function (x) length(x)==0
doc <- htmlTreeParse("http://www.igmchicago.org/igm-economic-experts-panel")
linknodes <- xpathApply(xmlRoot(doc), "//h3[@class='surveyQuestion']/a[@href][1]")
@elidourado
elidourado / nodes-per-capita.csv
Last active January 4, 2016 09:19
Country populations and Bitcoin nodes. Populations are from Wikipedia and nodes are from http://getaddr.bitnodes.io/ as collected on 1/24/2014.
Population Country Node rank Nodes Pop/Node Nodes per Capita Rank
84497 Isle of Man (UK) 95 24 3520.71 1
30001 Gibraltar (UK) 128 7 4285.86 2
325620 Iceland 70 72 4522.50 3
16834800 Netherlands 7 3699 4551.18 4
1311870 Estonia 50 273 4805.38 5
97857 Jersey (UK) 99 20 4892.85 6
537000 Luxembourg 63 103 5213.59 7
9639741 Sweden 15 1603 6013.56 8
36942 Liechtenstein 131 6 6157.00 9