Skip to content

jacobs269/zipfianPaper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zipfian Paper

Find the paper in the file paper.pdf.

Running Code and Simlulations From Paper

This repository contains the code to run and then visualize the simulations.

The simulations are labeled sim1, sim2, and sim3, corresponding to the left, middle, and right panels of figure 2 in the paper.

sim1,sim2 and sim3 are implemented in simulationFunctions.py. simulationFunctions.py depends only on the numpy package.

To run each simulation, in the directory of simulationFunctions.py, run

python3 simX.py

in the terminal. This will create a csv file of the data output from the simulation and store it in the data/simX.py file

analysis.R creates the visualizations for the 3 simulations. After creating the 3 simulation data files, the simulation visuals are created by opening R (or RStudio) and running analysis.R after doing the following:

  1. Use the setwd command to set the working directory to the location where the data files are stored
  2. Install the depending libraries (tidyverse,ggplot2,latex2exp,broom,xtable,gridExtra,grid,gtable,magick)

The simulations for the paper were created on an Apple M1 Macbook Pro with OS Ventura using Python 3.9.6 and R 4.2.2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published