onstove.MCA#
- class onstove.MCA(**kwargs)[source]#
The
MCAclass 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
MCAclass inherits all functionalities from theDataProcessorclass.- Parameters:
- **kwargs: dictionary of parameters
Parameters from the
DataProcessorparent class.
- Attributes:
demand_indexThe Demand Index highlights the potential demand for clean cooking in different parts of the study area.
supply_indexThe Supply Index highlights the potential for clean cooking supply in different parts of the study area.
clean_cooking_indexThe Clean Cooking Index measures where demand and supply are simultaneously higher.
assistance_need_indexThe 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
datasetsprovided.index(layers)Computes a standard index based on the
layersprovided.mask_layers([datasets, crop, save_layers])Uses the mask layer in
self.mask_layerto 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_indexbased on thedatasetsprovided.set_clean_cooking_index([demand_weight, ...])Computes the
clean_cooking_indexusing thedemand_indexand thesupply_index.set_demand_index([datasets, buffer])Computes the
demand_indexbased on thedatasetsprovided.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_indexbased on thedatasetsprovided.to_pickle(name)Saves the model as a pickle.