ladybug.windrose module

class ladybug.windrose.WindRose(direction_data_collection, analysis_data_collection, direction_count=8)[source]

Bases: object

Module for calculation and visualization of wind data collection by orientation.

Parameters
  • direction_data_collection – A HourlyContinuousCollection or HourlyDiscontinuousCollection of wind directions which will be used to generate the “bin” intervals for the windrose.

  • analysis_data_collection – A HourlyContinuousCollection or HourlyDiscontinuousCollection of wind values, corresponding to the wind directions, which is “binned” by the calculated direction intervals.

  • direction_count – An integer greater than or equal to 3 that determines the number of directions to “bin” the wind data by. (Default: 8).

Properties:
  • direction_data_collection

  • analysis_data_collection

  • direction_values

  • analysis_values

  • analysis_period

  • north

  • histogram_data

  • angles

  • legend

  • legend_parameters

  • base_point

  • compass

  • container

  • prevailing_direction

  • mesh_radius

  • compass_radius

  • colored_mesh

  • color_range

  • orientation_lines

  • frequency_lines

  • windrose_lines

  • frequency_spacing_distance

  • frequency_intervals_compass

  • frequency_intervals_mesh

  • frequency_maximum

  • frequency_hours

static prevailing_direction_from_data(data, directions_count=8)[source]

Get a the prevailing wind direction(s) from a data collection of directions.

Parameters
  • data – A data collection with direction angles in them.

  • directions_count – An integer for the number of directions around the circle to evaluate. (Default: 8).

Returns

A list with at least one value for the prevailing wind direction. This will have multiple values in the event of a tie.

DEFAULT_BASE_POINT = Point2D (0.00, 0.00)
DEFAULT_FREQUENCY_HOURS = 200.0
DEFAULT_FREQUENCY_SPACING = 10.0
DEFAULT_NORTH = 0.0
property analysis_data_collection

Get the analysis data collection assigned to this windrose plot.

property analysis_period

Get the AnalysisPeriod assigned to the hourly plot’s data collection.

property analysis_values

Get the hourly wind analysis values to bin by direction (i.e wind speed).

property angles

Get a list of orientation angles used to bin analysis values.

property base_point

Get or set a Point2D used as the center point of the windrose geometry.

(Default: Point3D(0, 0, 0)).

property bin_vectors

Get vectors for orientation intervals.

property color_range

Get the color range associated with this legend.

property colored_mesh

Get the colored Mesh2D for this graphic.

Returns

A Mesh2D of the wind rose plot.

property compass

Get the compass object for the windrose plot.

Since the setable properties of basepoint, frequency_spacing_distance, and legend_parameters all influence the initiation of this object, this property is to None if any of those properties are edited by the user.

property compass_radius

Get the radius of the windrose compass.

This value is different from the mesh_radius if the frequency_maximum is greater then the maximum frequency in the histogram data.

property container

Get the GraphicContainer for the windrose mesh.

Since the setable properties of basepoint, frequency_spacing_distance, and legend_parameters all influence the initiation of this object, this property is to None if any of those properties are edited by the user.

property direction_data_collection

Get the direction data collection assigned to this windrose plot.

property direction_values

Get the direction data values in this windrose plot.

property frequency_hours

Get or set number of hours to bin analysis values, per direction.

property frequency_intervals_compass

Get or set the number of intervals in the windrose compass.

property frequency_intervals_mesh

Get the number of intervals in the windrose mesh.

property frequency_lines

Get the frequency lines for windrose as Polygon2D lists.

property frequency_maximum

Get maximum frequency to represent in the windrose plot.

Default: number of items in largest windrose histogram bin.

property frequency_spacing_distance

10 model units).

To maintain fixed radius, this can be set to: 1.0 / self._legend_segment_count

Type

Get or set distance for frequency lines (Default

property frequency_spacing_hypot_distance

Length of radius of windrose assuming perpendicular frequency spacing.

The limit of the frequency_spacing_hypot_distance as number of directions approaches infinity equals the frequency_spacing_distance (as is the case with a circle).

property histogram_data

Get a histogram of wind analysis values binned by wind direction.

This histogram will not contain any zero values, so the total amount of hours may not add up to hours in the year. The histogram values per bin will be reduced to equal the frequency_maximum property which may occur if the frequency_intervals_compass property results in maximum hours less then the actual binned data.

property legend

Get the Legend object for this plot

property legend_parameters

Get or set the LegendParameters object for this plot.

Default segment count is 10.

property mesh_radius

Get the radius of the windrose mesh (with zero values).

This number will not necessarily align to the frequency spacing intervals, since fractional values are permitted.

property north

Get or set north orientation for windrose by degrees.

This must be a number between -360 and 360. 0 is North, 90 is West and 270 is East. The rotation is applied counterclockwise.

property orientation_lines

Get the orientation lines for windrose as a LineSegment2D list.

property prevailing_direction

Get a tuple of the predominant directions of the wind values.

property real_freq_max

Get the maximum hours of wind in the largest histogram bin.

property show_freq

Get or set property to control displays of frequency of values per direction.

(Default: True).

property show_zeros

Get or set property to control if windrose displays zero values or not.

(Default: True).

property windrose_lines

Get the windrose lines as Polygon2D lists.

property zero_count

Get the number of wind analysis values equal to zero.

property zeros_per_bin

Get the number of analysis values equal to zero, per orientation bin.