Code Monkey home page Code Monkey logo

selforg-colesc-pigeons's Introduction

Self-Organized Collective Escape of Pigeons

This repository contains code and data used in the project on a distance-dependent pattern of collective escape in flocks of pigeons:

Papadopoulou M, Hildenbrandt H, Sankey DWE, Portugal SJ, Hemelrijk CK (2022) Selforganization of collective escape in pigeon flocks. PLoS Comput Biol 18(1): e1009772. https://doi.org/10.1371/journal.pcbi.1009772

The code provided is open source, but we ask you to cite the above paper if you make use of it.

Code

The computational model (in C++) used to produce the simulated data can be found here: https://github.com/marinapapa/HoPE-model . The analysis on empirical and simulated data is performed in R, version 3.6 or later. See DESCRIPTION for details on depedencies.

  • Files that reproduce the respective figures of the manuscript: figX.R
  • Files with helper functions for analysis and ploting: count_switch_esc_dir.R, load_data.R, neighb_rel_pos.R, prepare_sim_data_for_turn_dir.R, subplots_functions.R
  • Files for statistical analysis: analyze_empirical.R, analyze_turn_direction_trend.R

Data

You can download all data from this Zenodo repository: https://zenodo.org/record/4993109

To smoothly run the code files, the subdirectories of the downloaded data should be copied locally in this Data folder. The dataset includes:

Empirical data: collected and preprocessed by Daniel W. E. Sankey, first published in:
Sankey DWE, Storms RF, Musters RJ, Russell WT, Hemelrijk CK, Portugal SJ. (2021) Absence of “selfish herd” dynamics in bird flocks under threat. Current Biology. https://doi.org/10.1016/j.cub.2021.05.009. They comprise analysed GPS tragectories of flocks of homing pigeons.

Simulated data: extracted by the computational model HoPE (Homing Pigeons Escape), an agent-based model adjusted to the collective escape of homing pigeons.

The files/folders necessary for the code to run are:

  1. turning_direction folder in the empirical folder: contains the empirical data from the analysis on turning direction frequency
  2. transformed folder in the empirical folder: contains the empirical data of Sankey et al. (2021) restructured according to the output of the computational model
  3. HoPE_track_eg folder in the simulated_raw folder: an example output folder that is also used in Figure 6. The repository contains also all the raw output of all our experiments.
  4. turning_direction in the simulated folder: the results of the turning direction frequency analysis on the simulated data
  5. & 6. sim_datas_chase.RData and sim_datas_noavoid.RData in the simulated folder: the imported data from our main simulations.

Results

Folder in which figX.R scripts export the figures.

Contact

  • For any issue or more information on this repository, email Marina Papadopoulou at: [email protected]

selforg-colesc-pigeons's People

Contributors

marinapapa avatar

Stargazers

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