Skip to content

Commit

Permalink
Added colab example
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Sep 6, 2021
1 parent b10e9ac commit 2fba6ed
Showing 1 changed file with 154 additions and 0 deletions.
154 changes: 154 additions & 0 deletions examples/wbtgui_colab.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"hide_input": false,
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
},
"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
},
"colab": {
"name": "examples.ipynb",
"provenance": []
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "hA64Z0d5cieX"
},
"source": [
"[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://gishub.org/wbtgui-colab)\n",
"[![image](https://binder.pangeo.io/badge_logo.svg)](https://gishub.org/wbtgui-pangeo)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "XS0R99bNSVcJ"
},
"source": [
"Install the [whiteboxgui](https://github.com/giswqs/whiteboxgui) Python package."
]
},
{
"cell_type": "code",
"metadata": {
"id": "8jkNXwIKRJzM"
},
"source": [
"!pip install whiteboxgui"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "MO3vN4M1SMNa"
},
"source": [
"import whiteboxgui"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "YEGq1QtgSP3F"
},
"source": [
"Download a sample DEM."
]
},
{
"cell_type": "code",
"metadata": {
"id": "nP5sqeUNRJzO"
},
"source": [
"!wget https://github.com/giswqs/whiteboxgui/raw/master/examples/testdata/DEM.tif"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"scrolled": false,
"id": "thk8Cf_bRJzO"
},
"source": [
"whiteboxgui.show()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "Af2_2hlocYnY"
},
"source": [
"![](https://i.imgur.com/0eYEqtH.gif)"
]
}
]
}

0 comments on commit 2fba6ed

Please sign in to comment.