metobs_toolkit.analysis.Analysis#

class Analysis(Dataholder: Dataset | Station)[source]#

Analysis class for handling and analyzing meteorological data from a Dataset or Station.

Parameters:

Dataholder (Union[Dataset, Station]) – The data source to initialize the analysis object. It can either be a Dataset or a Station object.

fulldf#

A wide-format DataFrame containing the main data and time derivatives.

Type:

pandas.DataFrame

metadf#

Metadata associated with the data.

Type:

pandas.DataFrame

__init__(Dataholder: Dataset | Station)[source]#

Methods

__init__(Dataholder)

aggregate_df([obstype, agg, method])

Aggregate all 'values' to specific groups and return the resulting DataFrame.

apply_filter_on_metadata(filter_string)

Apply a filter expression to the metadata and update the records accordingly.

apply_filter_on_records(filter_string)

Apply a filter expression to the records.

get_info([printout])

Provides information about the Analysis instance, including the number of records, observation types, metadata columns, station names, and known time derivatives.

get_tz()

Retrieve the timezone information of the 'datetime' index.

plot_diurnal_cycle([obstype, colorby, ...])

Plot the diurnal cycle of a specified observation type, grouped by a given category.

plot_diurnal_cycle_with_reference_station(...)

Plot the diurnal cycle of differences between observations and a reference station.

subset_period(startdt, enddt)

Subset the DataFrame to a specific time period.

Attributes

df

Analysis DataFrame constructor.