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:
- WB_CLIENT_ID
- WB_API_KEY
Need access?
Email data@windbornesystems.comget_super_observations
Fetches super observations within a time range and saves them to specified file(s).
It accepts the following parameters:
Name | Type | Description |
---|---|---|
start_time | string | A 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_time | string | Optional. 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_hours | integer | Optional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period. |
output_file | string | Optional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc' |
output_format | string | Optional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'. |
output_dir | string | Optional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory. |
callback | callable | Optional. 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_save | callable | Optional. 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_end | boolean | Optional. 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. |
get_observations
Fetches observations within a time range and saves them to specified file(s).
It accepts the following parameters:
Name | Type | Description |
---|---|---|
start_time | string | A 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_time | string | Optional. 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_ids | boolean | Optional. Include observation IDs in response. |
include_updated_at | boolean | Optional. Include update timestamps in response. |
mission_id | string | Optional. Filter observations by mission ID. |
min_latitude | float | Optional.Minimum latitude boundary. |
max_latitude | float | Optional. Maximum latitude boundary. |
min_longitude | float | Optional. Minimum longitude boundary. |
max_longitude | float | Optional. Maximum longitude boundary. |
bucket_hours | integer | Optional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period. |
output_file | string | Optional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc' |
output_format | string | Optional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'. |
output_dir | string | Optional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory. |
callback | callable | Optional. 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_save | callable | Optional. 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_end | boolean | Optional. 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. |
poll_super_observations
Run super observation fetching in an infinite loop, continuously saving this outputs.
It accepts the following parameters:
Name | Type | Description |
---|---|---|
start_time | string | A 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_time | string | Optional. 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_hours | integer | Optional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period. |
output_file | string | Optional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc' |
output_format | string | Optional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'. |
output_dir | string | Optional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory. |
callback | callable | Optional. 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_save | callable | Optional. 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. |
poll_observations
Polls observations continuously and saves them to specified file(s).
It accepts the following parameters:
Name | Type | Description |
---|---|---|
start_time | string | A 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_time | string | Optional. 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_ids | boolean | Optional. Include observation IDs in response. |
include_updated_at | boolean | Optional. Include update timestamps in response. |
mission_id | string | Optional. Filter observations by mission ID. |
min_latitude | float | Optional.Minimum latitude boundary. |
max_latitude | float | Optional. Maximum latitude boundary. |
min_longitude | float | Optional. Minimum longitude boundary. |
max_longitude | float | Optional. Maximum longitude boundary. |
bucket_hours | integer | Optional. Size of time buckets in hours. Defaults to 6 hours. By default, data is split by both mission and time period. |
output_file | string | Optional. Saves all data to a single file instead of bucketing. Supported formats are '.csv', '.json', '.little_r' and '.nc' |
output_format | string | Optional. Format to save data in separate files. Supported formats are 'json, 'csv', 'little_r' and 'netcdf'. |
output_dir | string | Optional. Directory path where the separate files should be saved. If not provided, files will be saved in current directory. |
callback | callable | Optional. 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_save | callable | Optional. 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. |
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:
Name | Type | Description |
---|---|---|
since | string | Optional. Start time of fetching observations data. |
min_time | string | Optional. Filter observations data taken after this time. |
max_time | string | Optional. Filter observations data take prior to this time. |
include_ids | boolean | Optional. Include observation IDs in response. |
include_mission_name | boolean | Optional. Include mission names in response. |
include_updated_at | boolean | Optional. Include update timestamps in response. |
mission_id | string | Optional. Filter observations by mission ID. |
min_latitude | float | Optional.Minimum latitude boundary. |
max_latitude | float | Optional. Maximum latitude boundary. |
min_longitude | float | Optional. Minimum longitude boundary. |
max_longitude | float | Optional. Maximum longitude boundary. |
output_file | string | Optional. Save the response data in .csv / .json format. |
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:
Name | Type | Description |
---|---|---|
since | string | Start time of fetching observations data. |
min_time | string | Optional. Filter observations data taken after this time. |
max_time | string | Optional. Filter observations data take prior to this time. |
include_ids | boolean | Include observation IDs in response. |
include_mission_name | boolean | Include mission names in response. |
include_updated_at | boolean | Include update timestamps in response. |
mission_id | string | Filter observations by mission ID. |
output_file | string | Optional. Path to save the response data in .csv/.json format. |
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:
Name | Type | Description |
---|---|---|
output_file | string | Optional. Path to save the response data. If provided, saves the data in CSV or JSON format. |
print_results | boolean | Optional. If True, prints the response data. |
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:
Name | Type | Description |
---|---|---|
mission_id | string | The mission for which to obtain launch site. |
output_file | string | Optional. Path to save the response data. If provided, saves the data in CSV or JSON format. |
print_result | boolean | Optional. If True, prints the response data. |
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:
Name | Type | Description |
---|---|---|
mission_id | string | The mission for which to obtain predicted flight path. |
output_file | string | Optional. Path to save the response data. If provided, saves the data in CSV or JSON format. |