How to use the ulmo.ncdc.ghcn_daily function in ulmo

To help you get started, we’ve selected a few ulmo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erdc / quest / quest_provider_plugins / noaa_ncdc.py View on Github external
def data(self):
        data = ghcn_daily.get_data(self.catalog_entry,
                                   elements=self.parameter_code,
                                   as_dataframe=True)  # [parameter_code]
        if not data or data[self.parameter_code].empty:
            raise ValueError('No Data Available')

        data = data[self.parameter_code]

        data = data[self.start_string:self.end_string]
        if data.empty:
            raise ValueError('No Data Available')
        data.rename(columns={'value': self.parameter}, inplace=True)

        return data