Coder Social home page Coder Social logo

hanoi-paper-release's Introduction

Hanoi paper code

This directory has the code needed to replicate the results in the Hanoi network tie survey paper.

  • code/ - has the code used in the analysis
  • data/ - [will be created by a script] has the survey data used in the analysis (NOTE: because of its size, the data are not included in the git repo; they will be downloaded by the script 00-run-all.r)
  • out/ - [will be created by a script] where the results of the scripts get saved (this is also not included in the git repo; it gets created by the scripts)

DATA

The script, 00-run-all.r will download the data you need for you. (And you can look at that script if you want to donwload the data yourself.)

CODE

These scripts were run on a 2020 Macbook Pro with 8 cores and 64 GB of memory. Because of the large number of bootstrap resamples, some of the files take time to run. We try to give a rough sense for expected runtime below by providing estimated runtimes for files that take longer than 5 minutes.

  • 00-run-all.R - this file downloads the data and runs all of the scripts
  • 11_fb100_prep.Rmd - this file prepares the fb100 data

DOCKER

It is likely that you have different versions of R and specific R packages than we did when we wrote our code. Thus, we recommend using Docker to replicate our results. Using Docker will ensure that you have exactly the same computing environment that we did when we conducted our analyses.

To use Docker

  1. Install Docker Desktop (if you don't already have it)
  2. Clone this repository
  3. Be sure that your current working directory is the one that you downloaded the repository into. It's probably called hanoi-paper-release/
  4. Build the docker image. docker build --rm -t hanoi-replication . This step will likely take a little time, as Docker builds your image (including installing various R packages)
  5. Run the docker image docker run -d --rm -p 8888:8787 -e PASSWORD=pass --name hanoi hanoi-replication
  6. Open a web browser and point it to localhost:8888
  7. Log onto Rstudio with username 'rstudio' and password 'pass'
  8. Open the file hanoi-paper-release/code/00-run-all.r
  9. Running the file should replicate everything.

hanoi-paper-release's People

Contributors

dfeehan avatar

Stargazers

 avatar

Watchers

 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.