Utility Modules#
powerplantmatching.utils Module#
Utility functions for checking data completeness and supporting other functions
Functions#
|
Convert inputs to arrays with at least one dimension. |
Function to inspect grouped and matched entries of a matched dataframe. |
|
|
Convenience function to filter data source according to the config.yaml file. |
|
Update powerplant data based on stored corrections in powerplantmatching/data/in/manual_corrections.csv. |
|
Convenience function for converting country name into alpha 2 codes |
|
Fill missing 'lat' and 'lon' values. |
|
Helper function for multiprocessing in classes/functions |
|
Import the default configuration file and update custom settings. |
|
Helper function to associate dataframe with a name. |
|
|
|
|
|
Evaluate an expression node or a string containing only a Python expression. |
|
Returns a lookup table of the dataframe df with rounded numbers. |
|
Parallel mapping function. |
|
Nominatim request for the Geoposition of a specific location in a country. |
|
Convenience function to convert string of dict to dict type for specified columns. |
Convenience function to import powerplant data source if a string is given. |
|
|
Restore blocks of powerplants from a matched dataframe. |
|
Convenience function to select data by its projectID |
|
Helper function to associate dataframe with a name. |
|
Replace uncommon fueltype specifications as by 'Other'. |
Helper function to set datatype of columns 'Fueltype', 'Country', 'Set', 'File', 'Technology' to categorical. |
|
Convenience function to ensure dict-like output |
|
|
Convenience function to ensure list-like output |
Update your saved matched for a single source. |
powerplantmatching.export Module#
Functions#
|
|
|
Decorate a function to signify its deprecation |
Return the fueltype-specific abbreviation. |
|
|
|
|
Assign a 'bus' column to the dataframe based on a list of coordinates. |
|
Assign a 'bus' column based on a list of coordinates and countries. |
|
Used to set the Region column to DKE/DKW (East/West) for electricity models based on lat,lon-coordinates and a heuristic for unknowns. |
|
Integrate known retire years, e.g. for German nuclear plants with fixed decommissioning dates. |
Returns the timestype-specific technical lifetime. |
|
|
Transform a given dataset into the TIMES format and export as .xlsx. |
|
Rename the columns of the powerplant data according to the convention in PyPSA. |
|
Export a powerplant dataframe to a pypsa.Network(), specify specific buses to allocate the plants (buslist). |
powerplantmatching.heuristics Module#
Functions to modify and adjust power plant datasets
Functions#
|
Aggregate the vast number of VRE (e.g. vom data.OPSD_VRE()) units to one specific (Fueltype + Technology) cohorte per commissioning year. |
|
|
|
Decorate a function to signify its deprecation |
|
This function assumes an age-distribution for given capacity statistics and returns a df, containing how much of capacity has been built for every year. |
|
Extends a given reduced dataframe by externally given VREs. |
|
Returns the matched dataframe with additional entries of non-matched powerplants of a reliable source. |
Fills the empty commissioning years with averages. |
|
|
Function which sets/fills a column 'DateOut' with roughly estimated values for decommissioning years, based on the estimated lifetimes per Fueltype given in the config and corresponding commissioning years. |
|
|
|
Import the default configuration file and update custom settings. |
|
|
|
|
|
Checks if a given dataframe is included in a matched dataframe. |
|
Return an iterator over the (key, value) pairs of a dictionary. |
|
Returns a lookup table of the dataframe df with rounded numbers. |
|
Remove plants outside continental Europe such as the Canarian Islands etc. |
|
Returns a extra column 'Scaled Capacity' with an up or down scaled capacity in order to match the statistics of the ENTSOe country totals. |
|
|
Used to set the Region column to DKE/DKW (East/West) for electricity models based on lat,lon-coordinates and a heuristic for unknowns. |
|
Integrate known retire years, e.g. for German nuclear plants with fixed decommissioning dates. |
powerplantmatching.plot Module#
Functions#
|
|
Makes a boxplot for the capacities grouped by the number of matches. |
|
|
|
|
Create a ~cycler.Cycler object much like |
|
|
|
|
|
|
|
|
|
|
|
Derives [nrows, ncols] based on x plots, so that a subplot looks nicely. |
|
Import the default configuration file and update custom settings. |
|
|
|
Returns a lookup table of the dataframe df with rounded numbers. |
|
|
|
|
|
Replace uncommon fueltype specifications as by 'Other'. |
|
Convenience function to ensure list-like output |