Coder Social home page Coder Social logo

vasilisfloudas / example-reproducible-research Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aeturrell/example-reproducible-research

0.0 0.0 0.0 58 KB

This has been prepared as an example of reproducible research for the online book Coding For Economists.

Home Page: https://aeturrell.github.io/coding-for-economists

License: MIT License

Python 35.10% TeX 12.19% Makefile 13.07% Dockerfile 39.63%

example-reproducible-research's Introduction

example-reproducible-research

An example repo to demonstrate some principles of reproducible research, including that operations should form a directed acyclic graph, that packages should be pinned (and their dependencies specified), and that the computational environment should be reproducible too.

The project acquires some data, runs a regression, makes a plot, and puts both regression and plot in an automatically generated PDF report.

Make is used to execute the reproducible analytical pipeline, and is part of the Dockerfile. The DAG is

DAG for this example repo

The DAG was generated using make -Bnd | make2graph | dot -Tpng -o assets/out.png (NB make2graph is not contained in the Dockerfile).

To execute the DAG, install Docker, git clone this repo, and then

  1. docker build -t repro . to build an image from the Dockerfile
  2. docker run -t -d --name repro_run repro to run the image
  3. docker exec -i -t repro_run /bin/bash to jump into the image on the command line, or use Visual Studio Code's remote: attach to container option.
  4. To (re-run) the analysis within the container, open the app/ directory (you will need to go up one directory level) and then run poetry run make clean followed by poetry run make.

The final output of the project, report.pdf, is saved in the outputs folder.

To export the final report out of the docker container and to your current directory, use the following command on your computer (not in the container)

docker cp repro_run:app/output/report.pdf .

To exit a running Docker command line terminal, use ctrl + c, ctrl + d. To remove the image and stop it running, use docker rm repro_run --force

example-reproducible-research's People

Contributors

aeturrell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.