"\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/ws/sp2668/bwSyncAndShare/lectures/esm_tutorials/tutorial-6/networks/base.nc'"
]
}
],
...
...
@@ -853,7 +864,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
...
...
@@ -867,7 +878,36 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.4"
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
%% Cell type:markdown id: tags:
# Energy System Modelling - Tutorial 06
Clustering the European Grid
%% Cell type:markdown id: tags:
**Tasks:**
>-Load a European Power Grid <br>
>-Calculate order and size <br>
>-Use clustering algorithm <br>
>-Study the impact of the number of clusters on minimum installed capacities <br>
%% Cell type:code id: tags:
``` python
import yaml
import pypsa
import numpy as np
import xarray as xr
import pandas as pd
#
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.lines as mlines
from sklearn.cluster import KMeans
#
%matplotlib inline
import time
import tutorial
import tutorial6utilities
```
%% Cell type:markdown id: tags:
## Introduction – the European grid
%% Cell type:markdown id: tags:
**Import base.nc, <br>
plot it with library.plot_network(network_base,option="kV",basemap="no") <br>