REGISTER NOW: DdS Autumn School! 🇨🇭 Grosshöchstetten (Switzerland) 🗓️ 6.-11. October 2024

bw2analyzer.econ#

Module Contents#

Functions#

concentration_ratio(x[, number])

Return computed concentration ratio.

gini_coefficient(x)

Return computed Gini coefficient.

herfindahl_index(x[, normalize])

Return computed Herfindahl index.

theil_index(x)

Return Theil entropy index.

bw2analyzer.econ.concentration_ratio(x, number=4)[source]#

Return computed concentration ratio.

See https://en.wikipedia.org/wiki/Concentration_ratio

The concentration ratio measures the share of the market controlled by the top number firms. Returned ratio values vary from 0 to 1.

Args:

x (list or array): Data number (int, default=4): Number of values to consider. 4 and 8 are commonly used.

Returns:

Concentration ratio (float)

bw2analyzer.econ.gini_coefficient(x)[source]#

Return computed Gini coefficient.

See https://en.wikipedia.org/wiki/Gini_coefficient

Adapted from econpy library. copyright: 2005-2009 Alan G. Isaac license: MIT license contact: aisaac AT american.edu

Args:

x (list or array): Data

Returns:

Gini coefficient (float)

bw2analyzer.econ.herfindahl_index(x, normalize=True)[source]#

Return computed Herfindahl index.

See https://en.wikipedia.org/wiki/Herfindahl_index

Normalized scores are bounded [0, 1]; non-normalized scores are [1/len(x), 1]. Normalization only counts non-zero values.

Args:

x (list or array): Data normalize (bool, default=True): Flag to normalize scores.

Returns:

Herfindahl index (float)

bw2analyzer.econ.theil_index(x)[source]#

Return Theil entropy index.

See https://en.wikipedia.org/wiki/Theil_Index

The Theil index is a measure of economic inequality based on information theory. It is the difference between a dataset’s maximum possible entropy and observed entropy.

Args:

x (list or array): Data

Returns:

Theil index (float)