15. Filtering RDD's, and the Minimum Temperature by Location Example
FILTERING RDD'S
And the weather data examples.
Filter() Removes Data From Your RDD
Just takes a function that returns a boolean
For example, we want to filter out entries that don't have "TMIN" in the first item of a list of data:
Minimum Temperature In A Year
This is the Input data snippet:
Parse (Map) The Input Data
The Output is (stationID, entryType, temperature)
Filter Out All But TMIN Entries
Create (stationID, Temperature) Key /Value Pairs
Find Minimum Temperature By StationID
Collect And Print The Results
Previous14. [Activity] Running the Average Friends by Age ExampleNext16. [Activity] Running the Minimum Temperature Example, and Modifying it for Maximum
Last updated