API reference

Load

load_csv(filepath_or_folder[, …])

Load timeseries data from a csv file, or group of files in a folder, into a DataFrame.

load_campbell_scientific(filepath_or_folder)

Load timeseries data from Campbell Scientific CR1000 formatted file, or group of files in a folder, into a DataFrame.

load_excel(filepath_or_folder[, …])

Load timeseries data from an Excel file, or group of files in a folder, into a DataFrame.

load_windographer_txt(filepath[, delimiter, …])

Load a Windographer .txt data file exported fom the Windographer software into a DataFrame.

LoadBrightdata

load_cleaning_file(filepath[, …])

Load a cleaning file which contains a list of sensor names with corresponding periods of flagged data.

apply_cleaning(data, cleaning_file_or_df[, …])

Apply cleaning to a DataFrame using predetermined flagged periods for each sensor listed in a cleaning file.

apply_cleaning_windographer(data, …[, …])

Apply cleaning to a DataFrame using the Windographer flagging log file after Windographer was used to clean and filter the data.

Analyse

time_continuity_gaps(data)

Returns the start and end timestamps of missing data periods.

basic_stats(data)

Gives basic statistical measures of the data, the DataFrame returned includes the following columns

coverage(data[, period, aggregation_method])

Get the data coverage over the period specified.

concurrent_coverage(ref, target, averaging_prd)

Accepts ref and target data and returns the coverage of concurrent data.

monthly_means(data[, return_data, …])

Plots means for calendar months in a timeseries plot.

momm(data[, date_from, date_to])

Calculates and returns long term reference speed.

sector_ratio(wspd_1, wspd_2, wdir[, …])

Calculates the wind speed ratio of two wind speed time series and plots this ratio, averaged by direction sector, in a polar plot using a wind direction time series.

dist(var_series[, var_to_bin_against, bins, …])

Calculates the distribution of a variable against itself as per the bins specified.

dist_matrix(var_series, x_series, y_series)

Calculates the distribution of a variable against two other variables, on an X-Y plane, returning a heat map.

dist_of_wind_speed(wspd[, max_speed, …])

Accepts a wind speed time series and computes it’s frequency distribution.

dist_by_dir_sector(var_series, direction_series)

Derive the distribution of a time series variable with respect to wind direction sectors.

dist_12x24(var_series[, aggregation_method, …])

Accepts a variable series and returns a plot of 12x24 (12 months x 24 hours) for the ‘mean’ of the variable with the table of data as an optional return.

freq_distribution(wspd[, max_speed, …])

Same as dist_of_wind_speed().

freq_table(var_series, direction_series[, …])

Accepts a variable series and direction series and computes a frequency table of percentages.

calc_air_density(temperature, pressure[, …])

Calculates air density for a given temperature and pressure and extrapolates that to the site if both reference and site elevations are given.

TI

plot_timeseries(data[, date_from, date_to, …])

Plot a timeseries of data.

plot_scatter(x_series, y_series[, …])

Plots a scatter plot of two variable’s timeseries.

plot_scatter_wspd(x_wspd_series, y_wspd_series)

Plots a scatter plot of two wind speed timeseries and adds a reference line from 0,0 to 40,40.

plot_scatter_wdir(x_wdir_series, y_wdir_series)

Plots a scatter plot of two wind direction timeseries and adds a line from 0,0 to 360,360.

_ColorPalette()

Color palette to be used for plotting graphs and tables.

Shear

TimeSeries(wspds, heights[, min_speed, …])

Calculates alpha, using the power law, or the roughness coefficient, using the log law, for each timestamp

TimeOfDay(wspds, heights[, min_speed, …])

Calculates alpha, using the power law, or the roughness coefficient, using the log law, for a wind series binned by time of the day and (optionally by) month, depending on the user’s inputs.

Average(wspds, heights[, min_speed, …])

Calculates alpha, using the power law, or the roughness coefficient, using the log law, based on the

BySector(wspds, heights, wdir[, min_speed, …])

Calculates alpha, using the power law, or the roughness coefficient, using the log law, for a wind series binned by direction.

Correlation

OrdinaryLeastSquares(ref_spd, target_spd[, …])

Accepts two DataFrames with timestamps as indexes and averaging period.

OrthogonalLeastSquares(ref_spd, target_spd, …)

Accepts two series with timestamps as indexes and averaging period.

MultipleLinearRegression(ref_spd, target_spd)

SimpleSpeedRatio(ref_spd, target_spd[, …])

SpeedSort(ref_spd, ref_dir, target_spd, …)

SVR(ref_spd, target_spd, averaging_prd, …)

Transform

average_data_by_period(data, period[, …])

Averages the data by the time period specified by period.

adjust_slope_offset(wspd, current_slope, …)

Adjust a wind speed that already has a slope and offset applied with a new slope and offset.

scale_wind_speed(spd, scale_factor)

Scales wind speed by the scale_factor

offset_wind_direction(wdir, offset)

Add/ subtract offset from wind direction.

offset_timestamps(data, offset[, date_from, …])

Offset timestamps by a certain time period

Export

export_csv(data[, file_name, folder_path])

Export a DataFrame, Series or Array to a .csv file or a .tab.

export_tab_file(freq_tab, height, lat, long)

Export a WaSP tab file using the output from the freq_table() function.

Datasets

datasets_available()

Example datasets that can be used with the library.