brightwind.load.load.load_windographer_txt

brightwind.load.load.load_windographer_txt(filepath, delimiter='tab', flag_text=9999, **kwargs)

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

  • If flagged data was filtered out during the export from Windographer these can be replaced to work with Pandas.

  • If delimiter other than ‘tab’ is used during export you can specify ‘comma’, ‘space’ or user specific.

  • Once the file has been loaded into the DataFrame if the last column name contains ‘Unnamed’ it is removed. This is due to Windographer inserting an extra delimiter at the end of the column headings.

  • The function finds the line number of ‘Date/Time’ to know when the data starts. It ignores the header.

Parameters
  • filepath (str) – Location of the file containing the Windographer timeseries data.

  • delimiter (str, default 'tab') – Column delimiter or separator used to export the data from Windographer. These can be ‘tab’, ‘comma’, ‘space’ or user specified.

  • flag_text (str, float) – This is the ‘missing data point’ text used during export if flagged data was filtered.

  • kwargs – All the kwargs from pandas.read_csv can be passed to this function.

Returns

A DataFrame with timestamps as it’s index.

Return type

pandas.DataFrame

Example usage

import brightwind as bw
filepath = r'C:\some\folder\brightwind\datasets\demo\windographer_demo_site_data.txt'
df = bw.load_windographer_txt(filepath)
print(df)

To load a file with delimiter and flagged text other than defaults:

folder = r'C:\some\folder\some_windographer.txt'
df = bw.load_windographer_txt(filepath, delimiter=';', flag_text='***')