Skip to content

Commit

Permalink
Adding LAMDA filtering toolkit (#115)
Browse files Browse the repository at this point in the history
* updates to plot_features.py

* add LAMDA filtering tools

* changed to functions

* pycodestyle issues
  • Loading branch information
kevindougherty-noaa authored Jan 28, 2022
1 parent 9e6c487 commit 01fa2ed
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions LAMDA/LAMDA_tools.py
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

0 comments on commit 01fa2ed

Please sign in to comment.