Coding for research

Author

Hugo Tavares, Alexia Cardona, Martin van Rongen

Published

November 22, 2024

These sessions provide an introduction to coding in R and Python. The aim is to get you comfortable with coding techniques commonly used in scientific research.

Learning objectives
  • Get familiar with the R or Python programming language
  • Learn to visualise data
  • Be able to manipulate and transform data

Target audience

This course is aimed at people without any prior programming experience. It does however, allow people with some experience to further enhance their knowledge through different level exercises.

Prerequisites

No prerequisites.

Exercises

Exercises in these materials are labelled according to their level of difficulty:

Level Description
Exercises in level 1 are simpler and designed to get you familiar with the concepts and syntax covered in the course.
Exercises in level 2 combine different concepts together and apply it to a given task.
Exercises in level 3 require going beyond the concepts and syntax introduced to solve new problems.

Citation & authors

Please cite these materials if:

  • You adapted or used any of them in your own teaching.
  • These materials were useful for your research work. For example, you can cite us in the methods section of your paper: “We carried our analyses based on the recommendations in YourReferenceHere”.

You can cite these materials as:

Tavares, H., Cardona, A., van Rongen, M. (2024). Coding for research. https://cambiotraining.github.io/coding-for-research/

Or in BibTeX format:

@misc{YourReferenceHere,
  author = {Tavares, Hugo and Cardona, Alexia and van Rongen, Martin},
  month = {10},
  title = {Coding for research},
  url = {https://cambiotraining.github.io/coding-for-research/},
  year = {2024}
}

About the authors:

  • Hugo Tavares
    Affiliation: Cambridge Centre for Research Informatics Training
    Roles: writing - original draft; conceptualisation; software
  • Alexia Cardona
    Affiliation: Cambridge Centre for Research Informatics Training
    Roles: writing - original draft; conceptualisation
  • Martin van Rongen
    Affiliation: Cambridge Centre for Research Informatics Training
    Roles: writing - original draft; conceptualisation; software

Acknowledgements

These materials are based on the original course contents of the “Data Carpentry lesson in Ecology”.

Michonneau F, Teal T, Fournier A, Seok B, Obeng A, Pawlik AN, Conrado AC, Woo K, Lijnzaad P, Hart T, White EP, Marwick B, Bolker B, Jordan KL, Ashander J, Dashnow H, Hertweck K, Cuesta SM, Becker EA, Guillou S, Shiklomanov A, Klinges D, Odom GJ, Jean M, Mislan KAS, Johnson K, Jahn N, Mannheimer S, Pederson S, Pletzer A, Fouilloux A, Switzer C, Bahlai C, Li D, Kerchner D, Rodriguez-Sanchez F, Rajeg GPW, Ye H, Tavares H, Leinweber K, Peck K, Lepore ML, Hancock S, Sandmann T, Hodges T, Tirok K, Jean M, Bailey A, von Hardenberg A, Theobold A, Wright A, Basu A, Johnson C, Voter C, Hulshof C, Bouquin D, Quinn D, Vanichkina D, Wilson E, Strauss E, Bledsoe E, Gan E, Fishman D, Boehm F, Daskalova G, Tavares H, Kaupp J, Dunic J, Keane J, Stachelek J, Herr JR, Millar J, Lotterhos K, Cranston K, Direk K, Tylén K, Chatzidimitriou K, Deer L, Tarkowski L, Chiapello M, Burle M, Ankenbrand M, Czapanskiy M, Moreno M, Culshaw-Maurer M, Koontz M, Weisner M, Johnston M, Carchedi N, Burge OR, Harrison P, Humburg P, Pauloo R, Peek R, Elahi R, Cortijo S, sfn_brt, Umashankar S, Goswami S, Sumedh, Yanco S, Webster T, Reiter T, Pearse W, Li Y (2019). “datacarpentry/R-ecology-lesson: Data Carpentry: Data Analysis and Visualization in R for Ecologists, June 2019.” doi: 10.5281/zenodo.3264888, “http://datacarpentry.org/R-ecology-lesson/”.