diff --git a/data-science-for-esm/07-workshop-networkx.ipynb b/data-science-for-esm/07-workshop-networkx.ipynb index 5c90ad38..6380b649 100644 --- a/data-science-for-esm/07-workshop-networkx.ipynb +++ b/data-science-for-esm/07-workshop-networkx.ipynb @@ -545,7 +545,7 @@ "import matplotlib.pyplot as plt\n", "\n", "fig, ax = plt.subplots(figsize=(5, 5))\n", - "nx.draw(G, with_labels=True, ax=ax, node_color=\"red\", font_weight=\"bold\")\n", + "nx.draw(G, with_labels=True, ax=ax, node_color=\"green\", font_weight=\"bold\")\n", "plt.savefig(\"tmp.png\")" ] }, @@ -661,7 +661,8 @@ "metadata": {}, "outputs": [], "source": [ - "A = nx.adjacency_matrix(G, weight=None).todense()" + "A = nx.adjacency_matrix(G, weight=None).todense()\n", + "A" ] }, { @@ -677,8 +678,7 @@ "metadata": {}, "outputs": [], "source": [ - "K = nx.incidence_matrix(G, oriented=True).todense()\n", - "K" + "nx.incidence_matrix(G, oriented=True).todense()" ] }, { @@ -845,6 +845,15 @@ "edges.head(5)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "edges" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -874,7 +883,7 @@ "metadata": {}, "outputs": [], "source": [ - "print(G)" + "print(N)" ] }, { diff --git a/data-science-for-esm/10-workshop-pypsa-cem.ipynb b/data-science-for-esm/10-workshop-pypsa-cem.ipynb index e44b92ca..9a4211d6 100644 --- a/data-science-for-esm/10-workshop-pypsa-cem.ipynb +++ b/data-science-for-esm/10-workshop-pypsa-cem.ipynb @@ -1055,6 +1055,15 @@ "system_cost(n).sum() * 1e6 / demand.sum()" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "n.export_to_netcdf(\"network-new.nc\")" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/data-science-for-esm/11-workshop-groupwork.ipynb b/data-science-for-esm/11-workshop-groupwork.ipynb index 86eff1a3..b9bed2c0 100644 --- a/data-science-for-esm/11-workshop-groupwork.ipynb +++ b/data-science-for-esm/11-workshop-groupwork.ipynb @@ -963,7 +963,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.4" } }, "nbformat": 4,