Skip to main content

A basic package for downloading and processing GSOD data

Project description

gsodpy

Python module to download and work with GSOD data from NOAA

Usage Guide:

Dowload All Data

import gsodpy.gsodDownloader as gdown

gdown.get_data(directory="noaa_gsod")

Process Desired Time Series

import gsodpy.gsodProcess as gsod 
import pandas as pd
import datetime

num_years = 10
num_extremes = 30
target_day = datetime.datetime(2020,3,20)

years, files = gsod.get_years_files(num_years)

df, df_day = gsod.process_all_years(files, target_day)

Save Processed DataFrame

df.to_pickle("df_monthly.pkl")
df_day.to_pickle("df_daily.pkl")

df = pd.read_pickle("df_monthly_fin.pkl")
df_day = pd.read_pickle("df_daily_fin.pkl")

Create Extremes DataFrame

If we want to find the coldest and warmest stations on a given day we can use the create_extremes() function

extremes = gsod.create_extremes(df_day, df_day['DATE'][0], 40)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gsodpy-0.0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

gsodpy-0.0.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page