The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
module Jekyll | |
class MathJaxBlockTag < Liquid::Tag | |
def render(context) | |
'<script type="math/tex; mode=display">' | |
end | |
end | |
class MathJaxInlineTag < Liquid::Tag | |
def render(context) | |
'<script type="math/tex">' | |
end |
RMDFILE=demo-rmd-pandoc | |
PANDOC=~/.cabal/bin/pandoc | |
all: | |
Rscript -e "require(knitr); require(markdown); knit('$(RMDFILE).rmd', '$(RMDFILE).md'); purl('$(RMDFILE).rmd')" | |
${PANDOC} --mathjax --toc -B header.html -A footer.html --bibliography refs.bib --css markdown.css -s $(RMDFILE).md -o $(RMDFILE).html | |
#!/bin/sh | |
## Information | |
## http://carlo-hamalainen.net/blog/2007/12/11/installing-minion-pro-fonts/ | |
## http://www.ctan.org/tex-archive/fonts/mnsymbol/ | |
## 0.1: Install LCDF Typetools | |
## http://www.lcdf.org/type/ | |
## If you use Homebrew (http://mxcl.github.com/homebrew/), then uncomment: | |
# brew install lcdf-typetools |
PREFIX=$HOME | |
VERSION=1.2.3 | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 | |
./configure --prefix=$PREFIX | |
make | |
make install |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("sna", "ggplot2", "Hmisc", "reshape2") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Empty ggplot2 theme | |
new_theme_empty <- theme_bw() | |
new_theme_empty$line <- element_blank() | |
new_theme_empty$rect <- element_blank() | |
new_theme_empty$strip.text <- element_blank() |
doInstall <- TRUE | |
toInstall <- c("ggplot2", "poLCA", "reshape2") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv") | |
ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents, | |
head(ANES) # remove some non-helpful variables | |
# Adjust so that 1 is the minimum value for each variable: | |
ANES <- data.frame(apply(ANES, 2, function(cc){ cc - min(cc, na.rm = T) + 1 })) |
id,authors,date,event,title,type,abstract | |
709815,"Emmanuel Saez, University of California-Berkeley","Fri, August 15, 7:00 to 9:00pm, TBA",Opening Plenary Session. Hard Times: The Concentrations of Income and Wealth,Inequality and Opportunity in the United States,Plenary, | |
709816,"Thomas M. Shapiro, Brandeis University; Melvin L. Oliver, University of California-Santa Barbara","Fri, August 15, 7:00 to 9:00pm, TBA",Opening Plenary Session. Hard Times: The Concentrations of Income and Wealth,Black Wealth/White Wealth Revisited,Plenary, | |
709817,"Leslie McCall, Northwestern University","Fri, August 15, 7:00 to 9:00pm, TBA",Opening Plenary Session. Hard Times: The Concentrations of Income and Wealth,How Americans Think about Economic Inequality,Plenary, | |
710353,"Jay MacLeod, Parish of All Saints and Author","Sat, August 16, 12:30 to 2:10pm, TBA",Plenary Session. Social Class in Daily Life,Outclassed,Plenary, | |
710354,"Linda Marie Burton, Duke University","Sat, August 16, 12:30 to 2:10pm, TBA",Plenary Session. Social Cla |
# sources: | |
# http://www.jgoodwin.net/?p=1223 | |
# http://orgtheory.wordpress.com/2012/05/16/the-fragile-network-of-econ-soc-readings/ | |
# http://nealcaren.web.unc.edu/a-sociology-citation-network/ | |
# http://kieranhealy.org/blog/archives/2014/11/15/top-ten-by-decade/ | |
# http://www.jgoodwin.net/lit-cites.png | |
########################################################################### | |
# This first section scrapes content from the Web of Science webpage. It takes |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
library(XML) | |
library(ggplot2) | |
df <- readHTMLTable("http://projects.dailycal.org/paychecker/departments/")[[1]] | |
DeMoney <- function(x) as.numeric(gsub(",", "", gsub("\\$", "", as.character(x)))) | |
money.columns <- c("All", "Professor", "Associate professor", "Assistant professor", | |
"Lecturer") |