Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebooks for 0.2.2 #31

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 45 additions & 41 deletions tutorials/notebooks/quickstart/quickstartcatalog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,52 +52,56 @@
"metadata": {},
"source": [
"In configuring a Data Layer, two important attributes, in particular, are the level and the datatype (as they determine storage size and speed of retrieval at query time):\n",
"* the level is a granularity band range,\n",
"* the datatype is the data type that will be applied to the storage.\n",
"\n",
" * the level is a granularity band range,\n",
" * the datatype is the data type that will be applied to the storage.\n",
"\n",
"The most efficient level and type that can contain the data to be uploaded to a Data Layer should always be used.\n",
"\n",
"Level:\n",
"* 29 (11.125 cm at equator)\n",
"* 28 (22.25 cm at equator)\n",
"* 27 (44.5 cm at equator)\n",
"* 26 (0.89 m at equator)\n",
"* 25 (1.78 m at equator)\n",
"* 24 (3.56 m at equator)\n",
"* 23 (7.12 m at equator)\n",
"* 22 (14.24 m at equator)\n",
"* 21 (28.48 m at equator)\n",
"* 20 (56.96 m at equator)\n",
"* 19 (113.92 m at equator)\n",
"* 18 (227.84 m at equator)\n",
"* 17 (455.68 m at equator)\n",
"* 16 (911.36 m at equator)\n",
"* 15 (1.82272 km at equator)\n",
"* 14 (3.64544 km at equator)\n",
"* 13 (7.29088 km at equator)\n",
"* 12 (14.58176 km at equator)\n",
"* 11 (29.16352 km at equator)\n",
"* 10 (58.32704 km at equator)\n",
"* 9 (116.65408 km at equator)\n",
"* 8 (233.30816 km at equator)\n",
"* 7 (466.61632 km at equator)\n",
"* 6 (933.23264 km at equator)\n",
"* 5 (1866.46528 km at equator)\n",
"* 4 (3732.93056 km at equator)\n",
"* 3 (7465.86112 km at equator)\n",
"* 2 (14931.72224 km at equator)\n",
"* 1 (29863.44448 km at equator)\n",
"\n",
"Data Type:\n",
"* Raster & Vector:\n",
" * bt (Byte)\n",
" * sh (Short Integer)\n",
" * in (Integer) \n",
" * db (Double) \n",
" * fl (Float)\n",
"* Vector Only:\n",
" * lo (Long) \n",
" * st (String)"
" * 29 (11.125 cm at equator)\n",
" * 28 (22.25 cm at equator)\n",
" * 27 (44.5 cm at equator)\n",
" * 26 (0.89 m at equator)\n",
" * 25 (1.78 m at equator)\n",
" * 24 (3.56 m at equator)\n",
" * 23 (7.12 m at equator)\n",
" * 22 (14.24 m at equator)\n",
" * 21 (28.48 m at equator)\n",
" * 20 (56.96 m at equator)\n",
" * 19 (113.92 m at equator)\n",
" * 18 (227.84 m at equator)\n",
" * 17 (455.68 m at equator)\n",
" * 16 (911.36 m at equator)\n",
" * 15 (1.82272 km at equator)\n",
" * 14 (3.64544 km at equator)\n",
" * 13 (7.29088 km at equator)\n",
" * 12 (14.58176 km at equator)\n",
" * 11 (29.16352 km at equator)\n",
" * 10 (58.32704 km at equator)\n",
" * 9 (116.65408 km at equator)\n",
" * 8 (233.30816 km at equator)\n",
" * 7 (466.61632 km at equator)\n",
" * 6 (933.23264 km at equator)\n",
" * 5 (1866.46528 km at equator)\n",
" * 4 (3732.93056 km at equator)\n",
" * 3 (7465.86112 km at equator)\n",
" * 2 (14931.72224 km at equator)\n",
" * 1 (29863.44448 km at equator)\n",
"\n",
"Data Types for Raster & Vector:\n",
" \n",
" * bt (Byte)\n",
" * sh (Short Integer)\n",
" * in (Integer) \n",
" * db (Double) \n",
" * fl (Float) \n",
" \n",
"Data Types for Vector Only:\n",
" \n",
" * lo (Long) \n",
" * st (String)"
]
},
{
Expand Down
26 changes: 10 additions & 16 deletions tutorials/notebooks/quickstart/quickstartsetup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
"All of the documentation and samples we provide are built using Jupyter notebooks. You can read the documentation in text form [here](https://pairs.res.ibm.com/tutorial/). You can run the notebooks yourself by cloning the [ibmpairs repository](https://github.com/IBM/ibmpairs) and looking at the \"notebooks\" directory.\n",
"\n",
"To run the notebooks you will need a number of things:\n",
"* Environmental Intelligence Suite API credentials stored in EIS_USERNAME and EIS_APIKEY environment variables\n",
"* A Python3.7 or higher environment\n",
"* A Jupyter Notebook environment\n",
"* The ibmpairs pip package at version 0.2.1 or greater installed into you Python3 environment. \n",
"\n",
" * Environmental Intelligence Suite API credentials stored in EIS_USERNAME and EIS_APIKEY environment variables\n",
" * A Python3.7 or higher environment\n",
" * A Jupyter Notebook environment\n",
" * The ibmpairs pip package at version 0.2.1 or greater installed into you Python3 environment. \n",
"\n",
"<div class=\"alert alert-info\">\n",
"Note that the notebooks include runnable examples but you need to run them in order from top to bottom. This is because there are some lines of set up code, for example, setting authentication credentials, that only appear in the first code cell. We leave them out subsequent cells to avoid clutter.\n",
Expand Down Expand Up @@ -46,9 +47,9 @@
"### On Windows\n",
"Open the 'Environment Variables' dialog by doing the following\n",
"\n",
"* Type 'sysdm.cpl' into the 'Type here to search' box to bring up the 'System Properties' dialog\n",
"* Select the 'Advanced' tab\n",
"* Press the 'Environment Variables...' button\n",
" * Type 'sysdm.cpl' into the 'Type here to search' box to bring up the 'System Properties' dialog\n",
" * Select the 'Advanced' tab\n",
" * Press the 'Environment Variables...' button\n",
"\n",
"On the 'Environment Variables' dialog you can create 'New...' environment variables for EIS_USERNAME and EIS_APIKEY setting the values to the ones you have been given. \n",
"\n",
Expand All @@ -58,13 +59,13 @@
"\n",
"The API tutorials are written in Python3. You can use any programming language by talking to the Geospatial Analytics HTTP endpoints using the standard HTTP libraries from your language of choice. \n",
"\n",
"If you want to use Python3 but don't have an environment set up including Jupyter notebooks there are many resources on the internet that can help you and there are some more detailed notes [here]().\n",
"If you want to use Python3 but don't have an environment set up including Jupyter notebooks there are many resources on the internet that can help you.\n",
"\n",
"## PAIRS Python API Wrapper\n",
"\n",
"The Jupyter notebooks in this tutorial use the (IBM PAIRS Python API Wrapper](https://github.com/IBM/ibmpairs) for convenience. You will need to install this into your Python3 environment. Make sure you have install at least version 0.2.1.\n",
"\n",
"There is a more detailed overview of the IBM PAIRS Python API Wrapper [here]().\n",
"There is a more detailed overview of the IBM PAIRS Python API Wrapper [here](tutorial/pythonapiwrapper.ipynb).\n",
"\n",
"### PIP \n",
"```\n",
Expand Down Expand Up @@ -101,13 +102,6 @@
"pip3 install Fiona-1.8.18-cp37-cp37m-win_amd64.whl\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@
"![Queries Menu](guiqueriesmenu.jpg)\n",
"\n",
"You should see submenus for the three default components:\n",
"* Dashboard Visualizations\n",
"* Geospatial Analytics\n",
"* Alert Console\n",
"\n",
" * Dashboard Visualizations\n",
" * Geospatial Analytics\n",
" * Alert Console\n",
"\n",
"For now we're going to get you started by running a simple query in Geospatial Analytics using the \"Queries\" page. \n",
"\n",
"## Creating A Point Query\n",
"We're going to create a point query, so press the \"Create Query\" button in the top right hand corner (circled in the previous screenshot).\n",
"\n",
"This leads to a series of screens where you specify what data you want to query, where in the world you want to query and the time frame you are interested in. For this first query:\n",
"* What = Temperature above ground from the Current and historical weather (IBM TWC) data set\n",
"* Where = A point in the United Kingdom (UK)\n",
"* When = 12 noon (UTC) on 1st December 2021\n",
"\n",
" * What = Temperature above ground from the Current and historical weather (IBM TWC) data set\n",
" * Where = A point in the United Kingdom (UK)\n",
" * When = 12 noon (UTC) on 1st December 2021\n",
"\n",
"### What (data layers you want to query)\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/notebooks/tutorial/pythonapiwrapper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Overview\n",
"## Overview\n",
"\n",
"The ibmpairs Python API Wrapper (paw) is a python module that can be used to interact with the Geospatial Analytics component of the IBM Environmental Intelligence Suite (EIS). \n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/notebooks/tutorial/userdefinedfunctions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"The following map shows *for each pixel* the first day of 2017 during which for the first time of that year the temperature crossed 283 Kelvin (49.73 F). (The day of the year is given numerically, i.e. January first is 1, February first 32 and so on.) As one would expect, the South-East and Southern California already show such temperatures at the beginning of the year, while warmer temperatures reach the Rockies during early Summer.\n",
"\n",
"![temperature_above_283_usa_2017.png](temperature_above_283_usa_2017.png)\n",
"![temperatureabove283usa2017](temperatureabove283usa2017.png)\n",
"\n",
"This map was created with a single Geospatial Analytics API call using a user defined function. Similarly it is possible to evaluate a decision tree or a fully connected neural network pixel-wise for a large area using a UDF and thus push the evaluation of a machine learning model into Geospatial Analytics queries. While UDFs can get very complex, we start with a very simple example.\n",
"\n",
Expand Down