Code and Data
This page has links to configuration files, templates, and a few other things that might be of use to people who want to write well-formatted social science papers in plain text, with data, figures, and references.
Available either as working
paper or as a possibly more current website at
http://plain-text.co. As a
beginning graduate student in the social sciences, what sort of
software should you use to do your work? More importantly, what
principles should guide your choices? This article offers some
answers. The short version is: you should use tools that give you
more control over the process of data analysis and writing. I
recommend you write prose and code using a good text editor; analyze
quantitative data with R or Stata; minimize error by storing your
work in a simple format (plain text is best), and make a habit of
documenting what you've done. For data analysis, consider using a
format like Rmarkdown and tools like Knitr to make your work more
easily reproducible for your future self. Use Pandoc to turn your
plain-text documents into PDF, HTML, or Word files to share with
others. Keep your projects in a version control system. Back
everything up regularly. Make your computer work for you by
automating as many of these steps as you can. To help you get
started, I briefly discuss a drop-in set of useful defaults to get
started with Emacs (a powerful, free text-editor). I share some
templates and style files that can get you quickly from plain text
to various output formats. And I point to several alternatives,
because no humane person should recommend Emacs without presenting
some other options as well.
This is a fork of Eric Schulte's Emacs Starter Kit (itself an offshoot of Phil Hagelberg's original) with additional tools included for social scientists, mostly related to writing books or papers in LaTeX and analyzing quantitative data using ESS and R. The goal is to provide a drop-in configuration for Emacs that makes it easier to use right from the get-go. If you know about Git, you can clone the repository.
This began life as a set of course notes and has become a book in progress, which I expect to be published next year. Data Visualization for Social Science is a practical introduction to data visualization using R and ggplot2. The main goal of this book is to introduce you to both the ideas and the methods of data visualization in a clear, sensible, and reproducible way.
A collection of LaTeX style files, templates, and org-mode documents providing some nice layouts for typesetting articles using pdfLaTeX or XeLaTeX. They make a pipeline that lets you begin with an
.org file in Emacs (as set up in the Starter Kit), and go from there to a nice, fully-processed PDF in one step. Or the pieces can be used separately
to set up a
.tex file with a nice Article layout.
Some Pandoc templates meant to go in
~/.pandoc/templates. Point to them directly with the
--css switches as appropriate, and use them with what's provided in
latex-custom-kjh. Includes a shell script for setting pandoc up to work with the Marked app, a handy HTML live
Every few months I get an email asking to see the LaTeX markup that I use to generate my Curriculum Vitae. So, here it is. Feel free to adapt it yourself. If you make stylistic modifications, I encourage you to fork the project on GitHub and make them available to others in the same way.
This site is produced using Hugo, a very fast static site generator, which you can read more about here. I've written about my own experience setting it up, too. The design is borrowed mostly from Greg Restall. If you want to look under the bonnet, the entire site is on GitHub. Feel free to adapt it yourself. If you make stylistic modifications, I encourage you to fork the project on GitHub and make them available to others in the same way. You should also change the Google Analytics information in the footer partial, or I will receive analytics information about your site.
Here is a full list of the various public code and data repositories that I have put on GitHub. They range from the configuration and templating tools listed above to data visualization exercises and other bits of data analysis, mostly written in R.