# Annual Statistics

![](https://2572426507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma9X8PomX22wWVDNCoj%2Fuploads%2Fgit-blob-ce4c2e532f77f74454b541174ce0117135ad2b41%2FAnnual_Statistics.png?alt=media)

![](https://2572426507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Ma9X8PomX22wWVDNCoj%2Fuploads%2Fgit-blob-9f01a8c1a8c3e4c9c8ef340f16c1cb8031119852%2FAnnual_Statistics.png?alt=media) - [\[source code\]](https://github.com/ladybug-tools/honeybee-grasshopper-radiance/blob/master/honeybee_grasshopper_radiance/src/HB%20Annual%20Statistics.py)

Calculate typical statistics (Average, median, minimum, maximum, sum) for an annual daylight or irradiance simulation. Statistics can either be computed per sensor or per timestep.

### Inputs

* **results \[Required]**

An list of annual Radiance result files from the "HB Annual Daylight" component (containing the .ill files and the sun-up-hours.txt). This can also be just the path to the folder containing these result files.

* **dyn\_sch**

Optional dynamic Aperture Group Schedules from the "HB Aperture Group Schedule" component, which will be used to customize the behavior of any dyanmic aperture geometry in the output metrics. If unsupplied, all dynamic aperture groups will be in their default state in for the output metrics.

* **hoys**

An optional numbers or list of numbers to select the hours of the year (HOYs) for which results will be computed. These HOYs can be obtained from the "LB Calculate HOY" or the "LB Analysis Period" components. If None, all hours of the results will be used.

* **grid\_filter**

The name of a grid or a pattern to filter the grids. For instance, first\_floor\_\* will simulate only the sensor grids that have an identifier that starts with first\_floor\_. By default all the grids will be processed.

* **per\_timestep**

Set to True to calculate statistics per-timestep instead of per-sensor.

### Outputs

* **report**

Reports, errors, warnings, etc.

* **average**

Average illuminance or irradiance values for each sensor or timestep in lux or W/m2. This is either a list of values or a list of data collections if per\_timestep\_ is True.

* **median**

Median illuminance or irradiance values for each sensor or timestep in lux or W/m2. This is either a list of values or a list of data collections if per\_timestep\_ is True.

* **minimum**

Minimum illuminance or irradiance values for each sensor or timestep in lux or W/m2. This is either a list of values or a list of data collections if per\_timestep\_ is True.

* **maximum**

Maximum illuminance or irradiance values for each sensor or timestep in lux or W/m2. This is either a list of values or a list of data collections if per\_timestep\_ is True.

* **cumulative**

Cumulative illuminance or irradiance values for each sensor or timestep in lux or W/m2. This is either a list of values or a list of data collections if per\_timestep\_ is True.
