Skip to content

dannyjameswilliams/randomchoices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

randomchoices

An exploration of how random humans truly are.

You can find the Google forms survey here, and the reddit post where most of the survey responses came from here.

The blog post detailing the analysis and interpretation of the results can be found here, and there is a shorter infographic available here.

Code

The code is written in Python 3, and plotly was used for the interactive html based plots. Other modules used were NumPy, SciPy, and pandas.

To reproduce the results, you need to clone this repository, and edit the follwing lines in main.py:

os.chdir("/home/fs19144/Documents/Personal_Projects/randomchoices/")
sys.path.append('/home/fs19144/Documents/Personal_Projects/randomchoices/')
sys.path.append('/home/fs19144/Documents/Personal_Projects/randomchoices/code')

These must change to your own working directory, because as you can probably tell, these are my own working directories! After you have done that, you can run main.py from the terminal with

python3 main.py

if you are using bash. Otherwise if you are on Windows, you will need to run main.py through a Python launcher. This should print out diagnostics, information and open interactive HTML plots in your browser.

The directory is organised as follows:

  • The survey data is in data/survey.csv.
  • Plots are saved to plots/* and plots/svgs/*.
  • Images, which are edited plots or other images used in the infographic, are saved in images/*.
  • Functions used for analysis and visualisation are labelled as `code/_funs.py.
  • code/main.py collects the data, and runs all required functions.

About

An exploration of how random humans truly are, using survey data taken online with >2000 participants.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages