Giter Club home page Giter Club logo

cat-icecream's Introduction

cat-icecream

Build Status

Release History

Version DOI
0.1.0 DOI

Introduction

This repository contains the analysis code used to produce the analysis for our forthcoming paper, studying the ice cream preferences of cats as a function of age and coat coloration. The key results from this paper are summarized in the following figure:

cat-icecream

As the figure illustrates, cats prefer chocolate and vanilla ice cream at roughly constant rates throughout their lives, but among fruit-flavored ice creams, evidence exists to suggest preferences shift from strawberry to lemon as cats age. No compelling evidence for a correlation between coat and flavor preference is found.

Other Resources

In addition to the code in this repo, this cat-icecream analysis relies on several other resources:

Running cat-icecream

In order to reproduce this analysis, please follow the following steps; if anything doesn't work, please open an issue, and we will help clarify.

Software Prerequisites

  • git (for cloning this repository), or alternatively, download the zipped code by following the DOI links above.
  • Docker, for managing dependencies. Alternatively, see Dockerfile in this repo for a description of the dependencies found in our Docker image; use of the project's Docker image is highly recommended rather than attempting to install dependencies natively.

Setup & Execution

Once git and Docker are installed and functioning, follow these steps to reproduce the analysis:

  • Clone this repository to your computer: git clone https://github.com/BillMills/cat-icecream.git. Or, unzip the zipped code archive you can download by following the DOI links above.
  • Pull the Docker image from dockerhub: docker pull billmills/cat-icecream. Note you may have to start your Docker environment to do this; Docker provides tutorials on basic Docker usage for new users.
  • Download the data and save it as data/cat-data.csv.
  • Launch your Docker container from within the cat-icecream directory, and mount that directory within your container:
cd cat-icecream
docker run -v $PWD:/cat-icecream -i -t billmills/cat-icecream /bin/bash 
  • You're now inside the Docker container and ready to run; to run the script:
cd /cat-icecream
python cat-icecream.py

and img/cat-icecream.png will be re-generated. Or, to run the tests, also from the /cat-icecream directory:

nosetests tests/*.py

Programmatic Logic

cat-icecream follows a simple programmatic flow:

flow

Data in data/cat-data.csv is ingested by pandas into a dataframe, and the helper function getAges extracts lists of ages matching a specified color and flavor preference. matplotlib then generates the final histograms of these lists of ages.

Contributing

Contributions to this analysis are very welcome! To begin with, please go through the steps in the Running cat-icecream section above, so you're comfortable using all the bits and pieces. Then, if you would like to suggest a change or update to the project, please follow these steps:

  • Open an issue to discuss your ideas with us.
  • Please limit each pull request to less than 500 lines.
  • Please encapsulate all new work in short functions (less than 50 lines each), and write at least one unit test for each of those functions.
  • Please ensure all tests (new and old) pass before signing off on your contribution.
  • Do something nice for yourself! You just contributed to this research, and we really appreciate you taking the time to check it out and get involved.

The most important step is the first one: open that issue to start a conversation, and we can offer help on any of the other points if you get stuck.

cat-icecream's People

Contributors

bkatiemills avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  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.