-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding LAMDA filtering toolkit (#115)
* updates to plot_features.py * add LAMDA filtering tools * changed to functions * pycodestyle issues
- Loading branch information
1 parent
9e6c487
commit 01fa2ed
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import numpy as np | ||
import pandas as pd | ||
|
||
|
||
def land_fraction(self, df): | ||
""" | ||
Returns dataframe for only land data. | ||
""" | ||
df = df[df['land_fraction'] > 0] | ||
|
||
return df | ||
|
||
|
||
def water_fraction(self, df): | ||
""" | ||
Returns dataframe for only water data. | ||
""" | ||
df = df[df['water_fraction'] > 0] | ||
|
||
return df | ||
|
||
|
||
def cloud_fraction(self, df): | ||
""" | ||
Returns dataframe for only cloud data. | ||
""" | ||
df = df[df['cloud_fraction'] > 0] | ||
|
||
return df | ||
|
||
|
||
def vegetation_fraction(self, df): | ||
""" | ||
Returns dataframe for only vegetation data. | ||
""" | ||
df = df[df['vegetation_fraction'] > 0] | ||
|
||
return df | ||
|
||
|
||
def ice_fraction(self, df): | ||
""" | ||
Returns dataframe for only ice data. | ||
""" | ||
df = df[df['ice_fraction'] > 0] | ||
|
||
return df | ||
|
||
|
||
def snow_fraction(self, df): | ||
""" | ||
Returns dataframe for only snow data. | ||
""" | ||
df = df[df['snow_fraction'] > 0] | ||
|
||
return df |