A package for calculating land use mix indices
Project description
Land Use Mix Python Package
Overview
The landusemix
package provides tools for calculating land use mix indices. These indices can be used to measure the diversity and concentration of land use areas, which is valuable for GIS researchers and urban planners.
Features
- Entropy Index: Measures the diversity of land use. Values range from 0 (no diversity) to 1 (maximum diversity).
- Herfindahl-Hirschman Index (HHI): Measures the concentration of land use. Values range from 0 (many small equally-sized areas) to 10,000 (one single area).
Installation
You can install the package using pip:
pip install landusemix
Usage
Here's how you can use the landusemix
package to calculate the entropy and HHI indices.
from landusemix import LandUseMixIndices
# Example land use areas (in square meters)
land_use_areas = {
'residential': 5000,
'commercial': 3000,
'industrial': 2000,
}
# Create an instance of the LandUseMixIndices class
mix_indices = LandUseMixIndices(land_use_areas)
# Calculate the entropy index
entropy = mix_indices.entropy_index()
print(f"Entropy Index: {entropy}")
# Calculate the Herfindahl-Hirschman Index (HHI)
hhi = mix_indices.herfindahl_hirschman_index()
print(f"Herfindahl-Hirschman Index: {hhi}")
Indices Description
-
Entropy Index: This index measures the diversity of land use types within a given area. It is calculated as follows: [ H = - \sum \left( rac{A_i}{A} \log rac{A_i}{A} ight) / \log K ] Where ( A_i ) is the area of land use type ( i ), ( A ) is the total area, and ( K ) is the number of land use types.
-
Herfindahl-Hirschman Index (HHI): This index measures the concentration of land use types within a given area. It is calculated as follows: [ HHI = \sum \left( rac{A_i}{A} imes 100 ight)^2 ] Where ( A_i ) is the area of land use type ( i ), and ( A ) is the total area.
For more detailed documentation, please visit our ReadTheDocs page.
License
This project is licensed under the MIT License. See the LICENSE
file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for landusemix-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5950e6d18383bfc798717a2891caa545eba9fa815702a957953001b2cfccf801 |
|
MD5 | 5c1c2036f7e116eab91c1ce2749cb939 |
|
BLAKE2b-256 | 1d57c98a25d74a2bed444a2f19e457c554aee30fcba52286a292140ca4c6c14d |