Map and Anonymous Functions
In this mission, you’ll learn about map and anonymous functions, two techniques you can use to turbo-charge your data cleaning in R.
jsonlite library in R. This library has built-in functions that make it easy to work with JSON data using Python code.
As you work with this JSON data, you will also learn about mapper functions and how it can be used to clean up your code and make it easier to read. Map functions can be used to do things like iterate over values in a list, perform a transformation on those values, and assign the result to a new list all on one line of code! After you learn about vectorization, you will learn about anonymous functions: temporary functions that can also be declared in a single line of code to save time.
In this mission, you will continue working with data from Hacker News as you practice using regular expressions and apply your new skills with map and anonymous functions. By the end of this mission, you’ll be comfortable working with JSON data, and using mapper and anonymous functions to speed up your data cleaning.
- Read and work with JSON files.
- Learn to use mapper functions to easily create and transform lists.
- Learn to create and use anonymous functions.
- The JSON Format
- Reading a JSON file
- Deleting Variables From a Dataframe
- Map Functions
- Using Map Functions to Handle Our Dataframe
- Anonymous Functions
- Using Anonymous Functions to Handle Our Dataframe
- Challenge: Cleaning Our Dataframe
- Next Steps