landusemix package¶
Submodules¶
landusemix.indices module¶
This module contains a class that calculates land use mix indices.
- class landusemix.indices.LandUseMixIndices(land_use_areas)[source]¶
Bases:
objectA class that calculates land use mix indices.
- land_use_areas¶
A dictionary containing land use areas.
- Type:
dict
landusemix.utils module¶
Utility functions for reading and loading data files.
- landusemix.utils.convert_dataframe_to_dict(dataframe)[source]¶
Convert a DataFrame to a Python dictionary.
Parameters: dataframe (pandas.DataFrame): The DataFrame to be converted.
Returns: dict: The DataFrame converted to a Python dictionary.
- landusemix.utils.load_csv(filepath)[source]¶
Load a CSV file into a DataFrame.
Parameters: filepath (str): The path to the CSV file.
Returns: pandas.DataFrame: The loaded DataFrame.
- landusemix.utils.load_geojson(filepath)[source]¶
Load a GeoJSON file into a GeoDataFrame.
Parameters: filepath (str): The path to the GeoJSON file.
Returns: geopandas.GeoDataFrame: The loaded GeoDataFrame.
- landusemix.utils.load_raster(filepath)[source]¶
Load a raster file into a GeoDataFrame.
Parameters: filepath (str): The path to the raster file.
Returns: numpy.ndarray: The loaded raster data.
- landusemix.utils.load_sample_csv()[source]¶
Load the included sample CSV file.
Returns: pandas.DataFrame: The loaded sample DataFrame.
- landusemix.utils.load_sample_geojson()[source]¶
Load the included sample GeoJSON file.
Returns: geopandas.GeoDataFrame: The loaded sample GeoDataFrame.
- landusemix.utils.load_sample_raster()[source]¶
Load the included sample raster file.
Returns: numpy.ndarray: The loaded sample raster data.
- landusemix.utils.load_sample_shapefile()[source]¶
Load the included sample Shapefile.
Returns: geopandas.GeoDataFrame: The loaded sample GeoDataFrame.