Skip to content

Commit

Permalink
update examples with latest modules. Now much faster plotting times!
Browse files Browse the repository at this point in the history
  • Loading branch information
Gen Tolhurst committed Nov 28, 2024
1 parent dda5176 commit 0d8ad65
Show file tree
Hide file tree
Showing 18 changed files with 1,622 additions and 1,041 deletions.
16 changes: 8 additions & 8 deletions example_notebooks/FAQ_example_4pp_1plus3.ipynb

Large diffs are not rendered by default.

30 changes: 23 additions & 7 deletions example_notebooks/FAQ_example_TCs.ipynb

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions example_notebooks/FAQ_example_crop_mask.ipynb

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions example_notebooks/FAQ_example_custom_mask.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -364,81 +364,81 @@
" <td>0.5</td>\n",
" <td>WANorth</td>\n",
" <td>Western Australia North</td>\n",
" <td>34.218263</td>\n",
" <td>26.917095</td>\n",
" <td>36.844151</td>\n",
" <td>34.245081</td>\n",
" <td>26.919819</td>\n",
" <td>36.866158</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0.5</td>\n",
" <td>WASouth</td>\n",
" <td>Western Australia South</td>\n",
" <td>28.277318</td>\n",
" <td>19.140133</td>\n",
" <td>34.710121</td>\n",
" <td>28.302459</td>\n",
" <td>19.143959</td>\n",
" <td>34.729240</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.5</td>\n",
" <td>NSW</td>\n",
" <td>New South Wales and Australian Capital Territory</td>\n",
" <td>25.113421</td>\n",
" <td>9.448744</td>\n",
" <td>29.404444</td>\n",
" <td>25.123405</td>\n",
" <td>9.428082</td>\n",
" <td>29.465317</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.5</td>\n",
" <td>VIC</td>\n",
" <td>Victoria</td>\n",
" <td>20.930688</td>\n",
" <td>10.315168</td>\n",
" <td>25.295231</td>\n",
" <td>20.920369</td>\n",
" <td>10.299044</td>\n",
" <td>25.303953</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.5</td>\n",
" <td>SA</td>\n",
" <td>South Australia</td>\n",
" <td>27.429348</td>\n",
" <td>18.323315</td>\n",
" <td>31.770166</td>\n",
" <td>27.436786</td>\n",
" <td>18.347836</td>\n",
" <td>31.792736</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>0.5</td>\n",
" <td>TAS</td>\n",
" <td>Tasmania</td>\n",
" <td>15.589719</td>\n",
" <td>8.689108</td>\n",
" <td>18.970528</td>\n",
" <td>15.578399</td>\n",
" <td>8.676420</td>\n",
" <td>18.966295</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>0.5</td>\n",
" <td>NT</td>\n",
" <td>Northern Territory</td>\n",
" <td>33.164134</td>\n",
" <td>25.058292</td>\n",
" <td>35.993961</td>\n",
" <td>33.180254</td>\n",
" <td>25.032635</td>\n",
" <td>36.024994</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>0.5</td>\n",
" <td>QLDNorth</td>\n",
" <td>Queensland North</td>\n",
" <td>32.178040</td>\n",
" <td>23.239285</td>\n",
" <td>34.781693</td>\n",
" <td>32.198613</td>\n",
" <td>23.252319</td>\n",
" <td>34.815948</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>0.5</td>\n",
" <td>QLDSouth</td>\n",
" <td>Queensland South</td>\n",
" <td>30.171418</td>\n",
" <td>19.437073</td>\n",
" <td>33.922173</td>\n",
" <td>30.193644</td>\n",
" <td>19.448208</td>\n",
" <td>33.934422</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
Expand All @@ -459,15 +459,15 @@
"\n",
" TXm_mean TXm_min TXm_max \n",
"region \n",
"0 34.218263 26.917095 36.844151 \n",
"1 28.277318 19.140133 34.710121 \n",
"2 25.113421 9.448744 29.404444 \n",
"3 20.930688 10.315168 25.295231 \n",
"4 27.429348 18.323315 31.770166 \n",
"5 15.589719 8.689108 18.970528 \n",
"6 33.164134 25.058292 35.993961 \n",
"7 32.178040 23.239285 34.781693 \n",
"8 30.171418 19.437073 33.922173 "
"0 34.245081 26.919819 36.866158 \n",
"1 28.302459 19.143959 34.729240 \n",
"2 25.123405 9.428082 29.465317 \n",
"3 20.920369 10.299044 25.303953 \n",
"4 27.436786 18.347836 31.792736 \n",
"5 15.578399 8.676420 18.966295 \n",
"6 33.180254 25.032635 36.024994 \n",
"7 32.198613 23.252319 34.815948 \n",
"8 30.193644 19.448208 33.934422 "
]
},
"execution_count": 9,
Expand Down
36 changes: 20 additions & 16 deletions example_notebooks/FAQ_example_orientation.ipynb

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions example_notebooks/FAQ_example_stippling.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions example_notebooks/FAQ_example_subplot_titles.ipynb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions example_notebooks/FAQ_example_vcentre.ipynb

Large diffs are not rendered by default.

121 changes: 62 additions & 59 deletions example_notebooks/acs_plotting_maps_examples.ipynb

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions example_notebooks/area_statistics_example.ipynb

Large diffs are not rendered by default.

23 changes: 7 additions & 16 deletions example_notebooks/area_statistics_example_basin_gpkg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@
"outputs": [],
"source": [
"# import needed packages\n",
"from acs_area_statistics import acs_regional_stats, regions\n",
"from acs_area_statistics import acs_regional_stats, get_regions\n",
"import xarray as xr\n",
"import geopandas as gpd\n",
"import regionmask\n",
"import cartopy.crs as ccrs\n",
"from glob import glob"
"from glob import glob\n",
"\n",
"regions = get_regions([\"nrm_regions\", \"australia\"])"
]
},
{
Expand Down Expand Up @@ -87,18 +89,7 @@
"execution_count": 5,
"id": "b9f34021-cccd-4889-bd02-6df5b54d203c",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/geopandas/io/file.py:399: FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_datetime without passing `errors` and catch exceptions explicitly instead\n",
" as_dt = pd.to_datetime(df[k], errors=\"ignore\")\n",
"/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/geopandas/io/file.py:399: FutureWarning: errors='ignore' is deprecated and will raise in a future version. Use to_datetime without passing `errors` and catch exceptions explicitly instead\n",
" as_dt = pd.to_datetime(df[k], errors=\"ignore\")\n"
]
}
],
"outputs": [],
"source": [
"# read in the data for the areas to average across\n",
"gdf = gpd.read_file(\"/g/data/mn51/users/ah7841/NCBLevel2DrainageBasinGroup_gda2020_v01.gpkg\")\n",
Expand Down Expand Up @@ -139,8 +130,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 1min 9s, sys: 2min 30s, total: 3min 39s\n",
"Wall time: 3min 43s\n"
"CPU times: user 57.7 s, sys: 37.2 s, total: 1min 34s\n",
"Wall time: 1min 38s\n"
]
}
],
Expand Down
Loading

0 comments on commit 0d8ad65

Please sign in to comment.