Introduction

WindBorne provides a pip installable library built to interact with Data and Forecasts APIs.

WindBorne uses API keys to authenticate API requests. If an API request is not properly authenticated, it will fail. To get an API key, email data@windbornesystems.com.

In order to authenticate with the api, you must set the following environment variables:

  1. WB_CLIENT_ID
  2. WB_API_KEY
On unix systems (mac and linux), you can add these to your shell configuration file (e.g. ~/.bashrc, ~/.bash_profile, ~/.zshrc). On windows, you can set these as user environment variables. See the instructions on the right for examples of how to do this.

Need access?

Email data@windbornesystems.com
Installation
Bash
Set Credentials on mac and linux
Bash
Set Credentials on windows

get_super_observations

Fetches super observations within a time range and saves them to specified file(s).

It accepts the following parameters:

NameTypeDescription
start_timestringA date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the starting time of fetching data.
end_timestringOptional. A date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the end time of fetching data. If not provided, current time is used as end time.
bucket_hoursintegerOptional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period.
output_filestringOptional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc'
output_formatstringOptional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'.
output_dirstringOptional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory.
callbackcallableOptional. If provided, this will be called every time a page of super observations is fetched. This can be used to stream data to a database or to perform custom processing. It will be called with one arg, a super observations page.
custom_savecallableOptional. If provided, this will be called each time It will be called with two args: a list of super observations and a recommended file name. This can be used to save data in a custom format.
exit_at_endbooleanOptional. If True, the script will exit after running out of data to fetch. Setting this to False will make this act like poll_super_observations. Defaults to True.

Example
Python
callback for custom processing
Python

get_observations

Fetches observations within a time range and saves them to specified file(s).

It accepts the following parameters:

NameTypeDescription
start_timestringA date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the starting time of fetching data.
end_timestringOptional. A date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the end time of fetching data. If not provided, current time is used as end time.
include_idsbooleanOptional. Include observation IDs in response.
include_updated_atbooleanOptional. Include update timestamps in response.
mission_idstringOptional. Filter observations by mission ID.
min_latitudefloatOptional.Minimum latitude boundary.
max_latitudefloatOptional. Maximum latitude boundary.
min_longitudefloatOptional. Minimum longitude boundary.
max_longitudefloatOptional. Maximum longitude boundary.
bucket_hoursintegerOptional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period.
output_filestringOptional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc'
output_formatstringOptional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'.
output_dirstringOptional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory.
callbackcallableOptional. If provided, this will be called every time a page of observations is fetched. This can be used to stream data to a database or to perform custom processing. It will be called with one arg, a observations page.
custom_savecallableOptional. If provided, this will be called each time It will be called with two args: a list of super observations and a recommended file name. This can be used to save data in a custom format.
exit_at_endbooleanOptional. If True, the script will exit after running out of data to fetch. Setting this to False will make this act like poll_observations. Defaults to True.

Example
Python
callback for custom processing
Python

poll_super_observations

Run super observation fetching in an infinite loop, continuously saving this outputs.

It accepts the following parameters:

NameTypeDescription
start_timestringA date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the starting time of fetching data.
end_timestringOptional. A date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the end time of fetching data. If not provided, current time is used as end time.
bucket_hoursintegerOptional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period.
output_filestringOptional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc'
output_formatstringOptional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'.
output_dirstringOptional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory.
callbackcallableOptional. If provided, this will be called every time a page of super observations is fetched. This can be used to stream data to a database or to perform custom processing. It will be called with one arg, a super observations page.
custom_savecallableOptional. If provided, this will be called each time It will be called with two args: a list of super observations and a recommended file name. This can be used to save data in a custom format.

Example
Python
callback for custom processing
Python

poll_observations

Polls observations continuously and saves them to specified file(s).

It accepts the following parameters:

NameTypeDescription
start_timestringA date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the starting time of fetching data.
end_timestringOptional. A date string, supporting formats YYYY-MM-DD HH:MM:SS, YYYY-MM-DD_HH:MM and ISO strings, representing the end time of fetching data. If not provided, current time is used as end time.
include_idsbooleanOptional. Include observation IDs in response.
include_updated_atbooleanOptional. Include update timestamps in response.
mission_idstringOptional. Filter observations by mission ID.
min_latitudefloatOptional.Minimum latitude boundary.
max_latitudefloatOptional. Maximum latitude boundary.
min_longitudefloatOptional. Minimum longitude boundary.
max_longitudefloatOptional. Maximum longitude boundary.
bucket_hoursintegerOptional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period.
output_filestringOptional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc'
output_formatstringOptional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'.
output_dirstringOptional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory.
callbackcallableOptional. If provided, this will be called every time a page of observations is fetched. This can be used to stream data to a database or to perform custom processing. It will be called with one arg, a observations page.
custom_savecallableOptional. If provided, this will be called each time It will be called with two args: a list of super observations and a recommended file name. This can be used to save data in a custom format.

Example
Python
callback for custom processing
Python

get_observations_page

Fetches a page of observations, optionally saving it to a file. This is an extremely thin wrapper around the observations endpoint, with an identical return type.

It accepts the following parameters:

NameTypeDescription
sincestringOptional. Start time of fetching observations data.
min_timestringOptional. Filter observations data taken after this time.
max_timestringOptional. Filter observations data take prior to this time.
include_idsbooleanOptional. Include observation IDs in response.
include_mission_namebooleanOptional. Include mission names in response.
include_updated_atbooleanOptional. Include update timestamps in response.
mission_idstringOptional. Filter observations by mission ID.
min_latitudefloatOptional.Minimum latitude boundary.
max_latitudefloatOptional. Maximum latitude boundary.
min_longitudefloatOptional. Minimum longitude boundary.
max_longitudefloatOptional. Maximum longitude boundary.
output_filestringOptional. Save the response data in .csv / .json format.

Example
Python

get_super_observations_page

Fetches a page of super observations, optionally saving it to a file. This is an extremely thin wrapper around the super observations endpoint, with an identical return type.

It accepts the following parameters:

NameTypeDescription
sincestringStart time of fetching observations data.
min_timestringOptional. Filter observations data taken after this time.
max_timestringOptional. Filter observations data take prior to this time.
include_idsbooleanInclude observation IDs in response.
include_mission_namebooleanInclude mission names in response.
include_updated_atbooleanInclude update timestamps in response.
mission_idstringFilter observations by mission ID.
output_filestringOptional. Path to save the response data in .csv/.json format.

Example
Python

get_flying_missions

Retrieves flying missions and optionally saves to a file. Returns a list of missions, including their id, name, and launch time.

It accepts the following parameters:

NameTypeDescription
output_filestringOptional. Path to save the response data. If provided, saves the data in CSV or JSON format.
print_resultsbooleanOptional. If True, prints the response data.

Example
Python

get_mission_launch_site

Retrieves launch site information for a specified mission, optionally saving it to a file. Returns a dictionary containing the launch site information.

It accepts the following parameters:

NameTypeDescription
mission_idstringThe mission for which to obtain launch site.
output_filestringOptional. Path to save the response data. If provided, saves the data in CSV or JSON format.
print_resultbooleanOptional. If True, prints the response data.

Example
Python

get_predicted_path

Fetches the predicted flight path for a given mission, assuming it is currently flying. Returns a list of coordinates.

It accepts the following parameters:

NameTypeDescription
mission_idstringThe mission for which to obtain predicted flight path.
output_filestringOptional. Path to save the response data. If provided, saves the data in CSV or JSON format.

Example
Python