Skip to content

andrewheiss/corrupt-caterpillar

Repository files navigation

Causal inference in nonprofit management and public administration

👿🐛: Note on “corrupt caterpillar” project name

Because project titles change all the time with revisions, rewriting, and peer review, we used codename to generate an Ubuntu-style internal-to-us project name that won’t change. The seed 1022 was generated with random atmospheric noise at random.org.

library(codename)
codename_message()
#> code name generated by {codename} v.0.5.0. R version 4.3.1 (2023-06-16).

codename(type = "ubuntu", seed = 1022)
#> [1] "corrupt caterpillar"

How to replicate

You can either download the compendium as a ZIP file or use GitHub to clone or fork the compendium repository (see the green “Code” button at the top of the GitHub page).

We use the renv package to create a stable version-specific library of packages, and we use the targets package to manage all file dependencies and run the analysis. To reproduce the findings and re-run the analysis, do the following:

  1. Download and install these fonts (if you’re using Windows, make sure you right click on the font files and choose “Install for all users” when installing these fonts):
  2. Install R (and preferably RStudio).
    • If you’re using macOS, install XQuartz too so that you have access to the Cairo graphics library
    • If you’re using Windows, install RTools too and add it to your PATH so that you can install packages from source if needed
  3. Open corrupt-caterpillar.Rproj to open an RStudio Project.
  4. Make sure you have a working installation of LaTeX:
    • Easy-and-recommended way: Install the tinytex package by running install.packages("tinytex") in the R console, then running tinytex::install_tinytex(). The first time you compile a PDF might require an extra minute or so while tinytex installs some missing LaTeX packages like csquotes, mathools, and others, but after that, it’ll go fast from then on.
    • Easy-but-requires-huge-4+-GB-download way: Download TeX Live (macOS; Windows)
  5. If it’s not installed already, R should try to install the renv package when you open the RStudio Project for the first time. If you don’t see a message about package installation, install it yourself by running install.packages("renv") in the R console.
  6. Run renv::restore() in the R console to install all the required packages for this project.
  7. Run targets::tar_make() in the R console to automatically download all data files, process the data, run the analysis, and compile the paper and appendix.

Running targets::tar_make() will create several helpful outputs:

  1. All project data in data/
  2. An analysis notebook website in analysis/_site/index.html
  3. PDF, HTML, and Word versions of the manuscript in manuscript/output/

Licenses

Text and figures: All prose and images are licensed under Creative Commons (CC-BY-4.0).

Code: All code is licensed under the MIT License.

Contributions and Code of Conduct

We welcome contributions from everyone. Before you get started, please see our contributor guidelines. Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages