| @@ 462-482 (lines=21) @@ | ||
| 459 | return df |
|
| 460 | ||
| 461 | ||
| 462 | def plot_heat_supply(resulting_capacities): |
|
| 463 | ||
| 464 | from matplotlib import pyplot as plt |
|
| 465 | ||
| 466 | district_heating_areas = select_district_heating_areas("eGon2035") |
|
| 467 | ||
| 468 | for c in ["CHP", "solar_thermal_collector", "geo_thermal", "heat_pump"]: |
|
| 469 | district_heating_areas[c] = ( |
|
| 470 | resulting_capacities[resulting_capacities.carrier == c] |
|
| 471 | .set_index("district_heating_id") |
|
| 472 | .capacity |
|
| 473 | ) |
|
| 474 | ||
| 475 | fig, ax = plt.subplots(1, 1) |
|
| 476 | district_heating_areas.boundary.plot( |
|
| 477 | linewidth=0.2, ax=ax, color="black" |
|
| 478 | ) |
|
| 479 | district_heating_areas.plot( |
|
| 480 | ax=ax, |
|
| 481 | column=c, |
|
| 482 | cmap="magma_r", |
|
| 483 | legend=True, |
|
| 484 | legend_kwds={ |
|
| 485 | "label": f"Installed {c} in MW", |
|
| @@ 723-746 (lines=24) @@ | ||
| 720 | return df_profile_merge.loc[:, columns] |
|
| 721 | ||
| 722 | ||
| 723 | def plot_heat_supply(resulting_capacities): |
|
| 724 | ||
| 725 | from matplotlib import pyplot as plt |
|
| 726 | ||
| 727 | mv_grids = db.select_geodataframe( |
|
| 728 | """ |
|
| 729 | SELECT * FROM grid.egon_mv_grid_district |
|
| 730 | """, |
|
| 731 | index_col="bus_id", |
|
| 732 | ) |
|
| 733 | ||
| 734 | for c in ["CHP", "heat_pump"]: |
|
| 735 | mv_grids[c] = ( |
|
| 736 | resulting_capacities[resulting_capacities.carrier == c] |
|
| 737 | .set_index("mv_grid_id") |
|
| 738 | .capacity |
|
| 739 | ) |
|
| 740 | ||
| 741 | fig, ax = plt.subplots(1, 1) |
|
| 742 | mv_grids.boundary.plot(linewidth=0.2, ax=ax, color="black") |
|
| 743 | mv_grids.plot( |
|
| 744 | ax=ax, |
|
| 745 | column=c, |
|
| 746 | cmap="magma_r", |
|
| 747 | legend=True, |
|
| 748 | legend_kwds={ |
|
| 749 | "label": f"Installed {c} in MW", |
|