Technoecon etl
Extract data from Remind, transform it for pypsa PyPSA and write it to files
make_pypsa_like_costs(frames)
translate the REMIND costs into pypsa format for a single region.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frames
|
dict[DataFrame]
|
dictionary with the REMIND data tables to be transformed. Region-filtered |
required |
Returns: pd.DataFrame: DataFrame containing cost data for a region.
Source code in src/rpycpl/technoecon_etl.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
map_to_pypsa_tech(remind_costs_formatted, pypsa_costs, mappings, weights, years=None, currency_conversion=1)
Map the REMIND technology names to pypsa technoloies using the conversions specified in the map config
Parameters:
Name | Type | Description | Default |
---|---|---|---|
remind_costs_formatted
|
DataFrame
|
DataFrame containing REMIND cost data. |
required |
pypsa_costs
|
DataFrame
|
DataFrame containing pypsa cost data. |
required |
mappings
|
DataFrame
|
DataFrame containing the mapping funcs and names from REMIND to pypsa technologies. |
required |
weights
|
DataFrame
|
DataFrame containing the weights. |
required |
years
|
Iterable
|
years to be used. Defaults to None (use remidn dat) |
None
|
currency_conversion
|
float
|
conversion factor for currency (PyPSA to REMIND). |
1
|
Returns: pd.DataFrame: DataFrame with mapped technology names.
Source code in src/rpycpl/technoecon_etl.py
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
|
transform_capex(capex)
Transform the CAPEX data from REMIND to pypsa.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
capex
|
DataFrame
|
DataFrame containing REMIND capex data. |
required |
Returns: pd.DataFrame: Transformed capex data.
Source code in src/rpycpl/technoecon_etl.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
transform_co2_intensity(co2_intensity, years)
Transform the CO2 intensity data from REMIND to pypsa.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
co2_intensity
|
DataFrame
|
DataFrame containing REMIND CO2 intensity data. |
required |
years
|
list | Index
|
relevant years data. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
pd.DataFrame: Transformed CO2 intensity data. |
Source code in src/rpycpl/technoecon_etl.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
transform_efficiency(eff_data, years)
Transform the efficiency data from REMIND to pypsa.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
eff_data
|
DataFrame
|
DataFrame containing REMIND efficiency data. |
required |
years
|
list | Index
|
relevant years. |
required |
Returns: pd.DataFrame: Transformed efficiency data.
Source code in src/rpycpl/technoecon_etl.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
transform_fom(fom)
Transform the Fixed Operational Maintenance data from REMIND to pypsa.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fom
|
DataFrame
|
DataFrame containing REMIND FOM data. |
required |
Returns: pd.DataFrame: Transformed FOM data.
Source code in src/rpycpl/technoecon_etl.py
217 218 219 220 221 222 223 224 225 226 227 228 229 |
|
transform_lifetime(lifetime)
Transform the lifetime data from REMIND to pypsa.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lifetime
|
DataFrame
|
DataFrame containing REMIND lifetime data. |
required |
Returns: pd.DataFrame: Transformed lifetime data.
Source code in src/rpycpl/technoecon_etl.py
245 246 247 248 249 250 251 252 253 254 |
|
transform_vom(vom)
Transform the Variable Operational Maintenance data from REMIND to pypsa. Args: vom (pd.DataFrame): DataFrame containing REMIND VOM data. Returns: pd.DataFrame: Transformed VOM data.
Source code in src/rpycpl/technoecon_etl.py
257 258 259 260 261 262 263 264 265 266 |
|
validate_mappings(mappings)
validate the mapping of the technologies to pypsa technologies Args: mappings (pd.DataFrame): DataFrame containing the mapping funcs and names from REMIND to pypsa technologies. Raises: ValueError: if mappers not allowed ValueError: if columns not expected ValueError: if proxy learning (use_remind_with_learning_from) is used for something other than invest
Source code in src/rpycpl/technoecon_etl.py
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 |
|
validate_output(df_out, costs_remind)
validate the output data Args: df_out (pd.DataFrame): DataFrame containing the output data costs_remind (pd.DataFrame): DataFrame containing the formatted remind data
Source code in src/rpycpl/technoecon_etl.py
633 634 635 636 637 638 639 640 641 642 643 644 |
|
validate_remind_data(costs_remind, mappings)
validate the remind cost data Args: remind_data (pd.DataFrame): DataFrame containing the remind data
Source code in src/rpycpl/technoecon_etl.py
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
|