Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hadley/joy-of-fp

Supplemental materials for "The joy of functional programming"
https://github.com/hadley/joy-of-fp

Last synced: 6 days ago
JSON representation

Supplemental materials for "The joy of functional programming"

Awesome Lists containing this project

README

        

# The joy of functional programming (for data science)

Functional programming (FP) provides a rich set of tools for reducing duplication in your code. The goal of FP is make it easy to express repeated actions using high-level verbs. I think that learning a little about FP is really important for data scientists, because it's a really good fit for many problems that you'll encounter in practice.

In this talk, I'll introduce you to the basics of functional programming in R, using the purrr package. I'll begin by briefly dissecting the for loop that you're already familiar with, then continue to show why functional programming provides elegant alternatives. I'll next dive into two examples showing where FP is particularly useful in data science: when ingesting unruly datasets spread across multiple files, and producing multiple reports for different stakeholders.

You'll get the most out of this talk if you're familiar with R, or you've done data science in other languages like python.

## License

* Code is [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/)

* Images are [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/)