Skip to content

Commit 51fb2b6

Browse files
committed
run formatter
1 parent 282e9ce commit 51fb2b6

File tree

1 file changed

+10
-25
lines changed

1 file changed

+10
-25
lines changed

tutorials/climate-risk.ipynb

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,12 +2256,7 @@
22562256
"source": [
22572257
"# calculate median value by time of day for the historic data\n",
22582258
"# this takes a while because it needs to process ~30GB\n",
2259-
"hourly_da = (\n",
2260-
" historic_da\n",
2261-
" .groupby(\"time.hour\")\n",
2262-
" .median()\n",
2263-
" .compute()\n",
2264-
")"
2259+
"hourly_da = historic_da.groupby(\"time.hour\").median().compute()"
22652260
]
22662261
},
22672262
{
@@ -2634,9 +2629,6 @@
26342629
"execution_count": 28,
26352630
"id": "da3af858-e212-4d26-b25c-1bccf8458d61",
26362631
"metadata": {
2637-
"jupyter": {
2638-
"source_hidden": true
2639-
},
26402632
"tags": []
26412633
},
26422634
"outputs": [
@@ -2660,25 +2652,18 @@
26602652
"fig, ax = plt.subplots(figsize=(7, 5))\n",
26612653
"im_data = wildfire_danger_48hours.where(wildfire_danger_48hours > 0)\n",
26622654
"ax.imshow(\n",
2663-
" im_data,\n",
2664-
" extent=image_plot_extent,\n",
2665-
" origin=\"upper\",\n",
2666-
" cmap=\"inferno\", \n",
2667-
" vmin=0,\n",
2668-
" vmax=0.7\n",
2655+
" im_data, extent=image_plot_extent, origin=\"upper\", cmap=\"inferno\", vmin=0, vmax=0.7\n",
26692656
")\n",
26702657
"\n",
2671-
"north_america_boundary.plot(\n",
2672-
" ax=ax, facecolor=\"none\", edgecolor=\"black\", linewidth=1.2\n",
2673-
")\n",
2674-
"us_states_boundaries.plot(\n",
2675-
" ax=ax, facecolor=\"none\", edgecolor=\"black\", linewidth=0.7\n",
2676-
")\n",
2658+
"north_america_boundary.plot(ax=ax, facecolor=\"none\", edgecolor=\"black\", linewidth=1.2)\n",
2659+
"us_states_boundaries.plot(ax=ax, facecolor=\"none\", edgecolor=\"black\", linewidth=0.7)\n",
26772660
"\n",
26782661
"ax.axis(\"off\")\n",
26792662
"plt.subplots_adjust(left=0.1, right=0.9, top=0.85, bottom=0.15)\n",
26802663
"fig.suptitle(\"Cumulative wildfire risk in 48 hour forecast\", fontsize=12, y=0.92)\n",
2681-
"fig.text(0.1, 0.05, f\"reference time: {now.strftime(\"%Y-%m-%dT%H\")}\", ha=\"left\", fontsize=10)\n",
2664+
"fig.text(\n",
2665+
" 0.1, 0.05, f\"reference time: {now.strftime('%Y-%m-%dT%H')}\", ha=\"left\", fontsize=10\n",
2666+
")\n",
26822667
"\n",
26832668
"plt.show()"
26842669
]
@@ -2905,9 +2890,9 @@
29052890
],
29062891
"metadata": {
29072892
"kernelspec": {
2908-
"display_name": "Python 3.12 (geo)",
2893+
"display_name": "Python 3 (ipykernel)",
29092894
"language": "python",
2910-
"name": "envname"
2895+
"name": "python3"
29112896
},
29122897
"language_info": {
29132898
"codemirror_mode": {
@@ -2919,7 +2904,7 @@
29192904
"name": "python",
29202905
"nbconvert_exporter": "python",
29212906
"pygments_lexer": "ipython3",
2922-
"version": "3.12.10"
2907+
"version": "3.13.0"
29232908
}
29242909
},
29252910
"nbformat": 4,

0 commit comments

Comments
 (0)