onstove.MCA#
- class onstove.MCA(**kwargs)[source]#
The
MCA
class is used to conduct a spatial Multicriteria Analysis in order to prioritize areas of action for clean cooking access.The MCA model is based in the methods of the Energy Access Explorer (EAE) and the Clean Cooking Explorer (CCE). It focuses on identifying potential areas where clean cooking can be quickly adopted, areas where markets for clean cooking technologies can be expanded or areas in need of financial assistance or lack of infrastructure. In brief, it identifies priority areas of action from the user perspective.
Note
The
MCA
class inherits all functionalities from theDataProcessor
class.- Parameters:
- **kwargs: dictionary of parameters
Parameters from the
DataProcessor
parent class.
- Attributes:
demand_index
The Demand Index highlights the potential demand for clean cooking in different parts of the study area.
supply_index
The Supply Index highlights the potential for clean cooking supply in different parts of the study area.
clean_cooking_index
The Clean Cooking Index measures where demand and supply are simultaneously higher.
assistance_need_index
The Assistance Need Index measures where demand and supply are simultaneously higher.
Methods
add_layer
(path, layer_type[, category, ...])Adds a new layer (type VectorLayer or RasterLayer) to the DataProcessor class
add_mask_layer
(path[, category, name, ...])Adds a vector layer to self.mask_layer.
align_layers
([datasets, save_layers])Ensures that the coordinate system and resolution of the raster is the same as the base layer
get_distance_rasters
([datasets, save_layers])Calls the .distance_raster method of all the layers entered.
get_index
([datasets, buffer, name])Computes a standard index based on the
datasets
provided.index
(layers)Computes a standard index based on the
layers
provided.mask_layers
([datasets, crop, save_layers])Uses the mask layer in
self.mask_layer
to mask layers to its boundaries.normalize_rasters
([datasets, buffer, ...])Calls the .normalize method of all the layers entered.
plot_share
([index, layer, title, output_file])Creates a pie chart showing five different classes of the index categorized from low to high.
read_model
(path)Reads a model from a pickle
reproject_layers
([datasets, save_layers])Reprojects all layers entered.
save_datasets
([datasets])Saves layers.
set_assistance_need_index
([datasets, buffer])Computes the
assistance_need_index
based on thedatasets
provided.set_clean_cooking_index
([demand_weight, ...])Computes the
clean_cooking_index
using thedemand_index
and thesupply_index
.set_demand_index
([datasets, buffer])Computes the
demand_index
based on thedatasets
provided.set_postgres
(dbname, user, password)Wrapper function to set a connection to a PostgreSQL database using the psycopg2.connect class.
set_supply_index
([datasets, buffer])Computes the
supply_index
based on thedatasets
provided.to_pickle
(name)Saves the model as a pickle.