|
76 | 76 | "explore(gdf)"
|
77 | 77 | ]
|
78 | 78 | },
|
| 79 | + { |
| 80 | + "cell_type": "markdown", |
| 81 | + "id": "33ca87e0-cd33-474c-aabb-88655d333b82", |
| 82 | + "metadata": {}, |
| 83 | + "source": [ |
| 84 | + "* **Zoom in on the data points in boulder using your scroll wheel**.\n", |
| 85 | + "* **Once you're done exploring, close the JupyterGIS explorer tab**." |
| 86 | + ] |
| 87 | + }, |
79 | 88 | {
|
80 | 89 | "cell_type": "markdown",
|
81 | 90 | "id": "3a19593b-9112-4dfc-8015-0fb4ee210fb6",
|
|
85 | 94 | "\n",
|
86 | 95 | "JupyterGIS introduces a new file format for projects.\n",
|
87 | 96 | "\n",
|
88 |
| - "We've prepared a JupyterGIS project, i.e. a `.jGIS` file, with a basemap:" |
| 97 | + "We've prepared a JupyterGIS project, i.e. a `.jGIS` file, with a basemap. Let's load it and call it `doc`:" |
89 | 98 | ]
|
90 | 99 | },
|
91 | 100 | {
|
|
108 | 117 | "id": "eeac2318-9a05-4f6e-a235-f2230e46177a",
|
109 | 118 | "metadata": {},
|
110 | 119 | "source": [
|
111 |
| - "Let's add our example data:" |
| 120 | + "No data is present in this document yet, it's just a basemap.\n", |
| 121 | + "\n", |
| 122 | + "* **Add our example data**:" |
112 | 123 | ]
|
113 | 124 | },
|
114 | 125 | {
|
|
126 | 137 | "id": "0c2a1a42-b21f-447b-be26-9c61a3dd3bc6",
|
127 | 138 | "metadata": {},
|
128 | 139 | "source": [
|
129 |
| - "## The map has been updated!\n", |
| 140 | + "#### The map has been updated!\n", |
130 | 141 | "\n",
|
131 |
| - "But you have to scroll up to see the change in the widget.\n", |
132 |
| - "Let's open that map in a new panel view instead of as an embedded widget.\n", |
| 142 | + "But you have to scroll up in the Notebook to see the change in the widget.\n", |
| 143 | + "We're going to make many more changes, so let's open up the project file we just built.\n", |
133 | 144 | "\n",
|
134 |
| - "In the blank space to the left of the map, right-click, then select \"create new view for cell output\".\n", |
135 |
| - "We'll keep the map open in a panel from now on." |
| 145 | + "* **In the file browser, double-click `example.jGIS` to open the project file as a full tab**.\n", |
| 146 | + "* **Click and drag that tab to move it to a split view**.\n", |
| 147 | + " * Experiment with dragging it to different places to find a comfortable layout.\n", |
| 148 | + " * Try resizing the split view by clicking and draging on the divider!" |
136 | 149 | ]
|
137 | 150 | },
|
138 | 151 | {
|
139 | 152 | "cell_type": "markdown",
|
140 | 153 | "id": "4851bdac-8e48-45d0-9c36-f14271c85792",
|
141 | 154 | "metadata": {},
|
142 | 155 | "source": [
|
143 |
| - "## The layers panel\n", |
| 156 | + "#### The layers panel\n", |
144 | 157 | "\n",
|
145 | 158 | "Let's view the layers currently on the map.\n",
|
146 | 159 | "\n",
|
147 |
| - "On the far left panel, click the globe icon.\n", |
| 160 | + "On the left panel, you should see the JupyterGIS layers panel. You may need to expand it!\n", |
148 | 161 | "\n",
|
149 |
| - "Then expand the \"Layers\" view within the new panel.\n", |
| 162 | + "* If you don't see the layers panel, click the globe icon on the **far** left column of icons.\n", |
| 163 | + "* If the layers view is collapsed, expand it.\n", |
| 164 | + "* **Right click on \"SEEC and NSIDC\" and select \"Zoom to Layer\"**.\n", |
150 | 165 | "\n",
|
151 |
| - "Right click on \"SEEC and NSIDC\" and select \"Zoom to Layer\".\n", |
152 |
| - "You should see your data points on the furthest edges of the map, but the basemap has likely become unusable.\n", |
153 |
| - "Zoom out a little bit by scrolling." |
| 166 | + " You should see your data points on the furthest edges of the map.\n", |
| 167 | + " Zoom out a little bit to see the data points more clearly." |
154 | 168 | ]
|
155 | 169 | },
|
156 | 170 | {
|
|
160 | 174 | "source": [
|
161 | 175 | "## Challenge\n",
|
162 | 176 | "\n",
|
163 |
| - "### Add the other dataset you created in the previous module\n", |
| 177 | + "### Add the \"final\" dataset you created in Module 1\n", |
| 178 | + "\n", |
| 179 | + "`example.jGIS` should already be open in a separate window.\n", |
164 | 180 | "\n",
|
165 |
| - "You created a dataset with a location that's meaningful to you in the previous module. Load that dataset in the cell below, and check that the map updated!\n", |
| 181 | + "* **Add the final dataset from the previous module as a layer in the cell below**, and check that the map updated!\n", |
166 | 182 | "\n",
|
167 |
| - "Don't forget to give your new layer a name. Also, consider that you may need to specify a relative path, e.g. `../module-1/final.geojson`." |
| 183 | + " Hint: Don't forget to give your new layer a meaningful name.\n", |
| 184 | + "\n", |
| 185 | + " Hint: Reference the code cells above to see how to add a geojson layer to the map.\n", |
| 186 | + "\n", |
| 187 | + " Hint: The dataset you created was named `final.geojson`, but it's in a different directory than this notebook. The path to the layer you should use is `\"../module-1/final.geojson\"`." |
168 | 188 | ]
|
169 | 189 | },
|
170 | 190 | {
|
|
174 | 194 | "metadata": {},
|
175 | 195 | "outputs": [],
|
176 | 196 | "source": [
|
177 |
| - "# Add your GeoJSON layer in this cell." |
| 197 | + "# Add your GeoJSON layer to the doc in this cell." |
178 | 198 | ]
|
179 | 199 | },
|
180 | 200 | {
|
181 | 201 | "cell_type": "markdown",
|
182 |
| - "id": "b5c0736c-0b6c-4930-9bdf-0b256028b400", |
| 202 | + "id": "b9b1faad-ea7a-4a5e-ae86-74dea098c82e", |
| 203 | + "metadata": {}, |
| 204 | + "source": [ |
| 205 | + ":::{hint} Solution\n", |
| 206 | + ":class: dropdown\n", |
| 207 | + "\n", |
| 208 | + "Here is a solution you can copy/paste:\n", |
| 209 | + "\n", |
| 210 | + "```python\n", |
| 211 | + "doc.add_geojson_layer(\"../module-1/final.geojson\", name=\"My module-1 dataset\")\n", |
| 212 | + "```\n", |
| 213 | + ":::" |
| 214 | + ] |
| 215 | + }, |
| 216 | + { |
| 217 | + "cell_type": "markdown", |
| 218 | + "id": "3365876f-d5cb-4c74-924e-6c5df91ee324", |
183 | 219 | "metadata": {
|
184 | 220 | "jp-MarkdownHeadingCollapsed": true
|
185 | 221 | },
|
186 | 222 | "source": [
|
187 |
| - "### Identify points\n", |
| 223 | + "### Let's play with a different data source\n", |
188 | 224 | "\n",
|
189 |
| - "In the toolbar at the top of the map, select the \"i\" icon to toggle on identify mode.\n", |
| 225 | + "* In the map panel, **click the ➕ icon in the toolbar at the top of the map**.\n", |
| 226 | + "* **Select \"Add Vector Layer\"**, then **\"New GeoJSON Layer\"**.\n", |
| 227 | + "* In the dialog's \"Path\" field, **select \"Browse Server Files\"**.\n", |
| 228 | + "* **Navigate to the `workshop-csdms2025-exercises/examples/module-2` directory**.\n", |
| 229 | + "* **Select `us_cities.geojson`**.\n", |
| 230 | + "* **Click the \"Select\" button**.\n", |
| 231 | + "* **Click \"OK\"**.\n", |
190 | 232 | "\n",
|
191 |
| - "Select the layer in the layers panel you want to identify features from.\n", |
192 |
| - "Click a point to see its attributes.\n", |
193 |
| - "They'll be visible in the \"identify\" section of the right panel.\n", |
| 233 | + "You may notice that the added layer is titled \"Custom GeoJSON Layer\". Let's fix that!\n", |
194 | 234 | "\n",
|
195 |
| - "If the right panel isn't open, click the globe icon in the far right of JupyterLab.\n", |
196 |
| - "If the \"identify\" section isn't visible, you may need to expand it (the triangle to the left of the word \"identify\" should be pointing **down**).\n", |
197 |
| - "If it's still not visible, you may need to shrink the other open panels by clicking and dragging at the edge, or by collapsing it entirely." |
| 235 | + "* **Right-click the layer and select \"Rename Layer\"**.\n", |
| 236 | + "* **Title it \"US Cities\"**." |
198 | 237 | ]
|
199 | 238 | },
|
200 | 239 | {
|
201 | 240 | "cell_type": "markdown",
|
202 |
| - "id": "3365876f-d5cb-4c74-924e-6c5df91ee324", |
203 |
| - "metadata": {}, |
| 241 | + "id": "b5c0736c-0b6c-4930-9bdf-0b256028b400", |
| 242 | + "metadata": { |
| 243 | + "jp-MarkdownHeadingCollapsed": true |
| 244 | + }, |
204 | 245 | "source": [
|
205 |
| - "### Let's play with other data sources.\n", |
| 246 | + "### Identify points\n", |
206 | 247 | "\n",
|
207 |
| - "The JupyterGIS Python API doesn't yet support adding remote GeoJSON layers, so we'll use the JupyterGIS GUI for this.\n", |
| 248 | + "Sometimes you want to learn more about features than what you can see on the map. For example, the population of a city.\n", |
208 | 249 | "\n",
|
209 |
| - "In the map panel, click the ➕ icon in the toolbar at the top of the map.\n", |
210 |
| - "Select \"Add Vector Layer\", then \"New GeoJSON Layer\".\n", |
211 |
| - "In the dialog's \"Path\" field, select \"Browse Server Files\".\n", |
212 |
| - "Navigate to the `workshop-csdms2025-exercises/examples/module-2` directory, then select `us_cities.geojson`.\n", |
| 250 | + "* **In the toolbar at the top of the map, select the \"i\" icon to toggle on identify mode**.\n", |
| 251 | + "* **Select the US Cities layer you added in the previous step**.\n", |
| 252 | + "* **Click a point to see its attributes**.\n", |
213 | 253 | "\n",
|
214 |
| - "Click the \"Select\" button, then click \"OK\".\n", |
| 254 | + " They'll be visible in the \"identify\" section of the right panel.\n", |
215 | 255 | "\n",
|
216 |
| - "You may notice that the added layer is titled \"Custom GeoJSON Layer\". Right-click the layer and select \"Rename Layer\".\n", |
217 |
| - "Title it \"US Cities\"." |
| 256 | + "* If the right panel isn't open, click the globe icon in the far right of JupyterLab.\n", |
| 257 | + "* If the \"identify\" section isn't visible, you may need to expand it (the triangle to the left of the word \"identify\" should be pointing **down**).\n", |
| 258 | + "* If it's still not visible, you may need to shrink the other open panels by clicking and dragging at the edge, or by collapsing it entirely." |
218 | 259 | ]
|
219 | 260 | },
|
220 | 261 | {
|
|
224 | 265 | "source": [
|
225 | 266 | "### Add symbology\n",
|
226 | 267 | "\n",
|
| 268 | + "Viewing points one-by-one isn't always what we need; sometimes we need to be able to see patterns on the map visually.\n", |
| 269 | + "\n", |
227 | 270 | "**⚠️ There's a bug here, watch out! ⚠️**\n",
|
228 | 271 | "\n",
|
229 | 272 | "Don't forget, **JupyterGIS is in early stages. It will get much better!**\n",
|
230 | 273 | "\n",
|
231 | 274 | "#### Work around the bug\n",
|
232 | 275 | "\n",
|
233 |
| - "Before we can apply symbology, we need to set the vector type to \"circle\" in the right panel.\n", |
234 |
| - "Under \"Objects properties\", select \"Circle\" in the Type dropdown, then click OK.\n", |
| 276 | + "Before we can apply symbology, we need to work around a bug.\n", |
| 277 | + "\n", |
| 278 | + "* **Set the vector type to \"circle\" in the right panel.**\n", |
| 279 | + "* **Under \"Objects properties\", select \"Circle\" in the \"Type\" dropdown, then click OK.**\n", |
235 | 280 | "You may need to scroll down, resize, or collapse sections of the right sidebar to see the OK button.\n",
|
236 | 281 | "\n",
|
237 | 282 | "#### Now, we can set symbology!\n",
|
238 | 283 | "\n",
|
239 |
| - "Right click on the \"US Cities\" layer in the left panel.\n", |
240 |
| - "Select \"Edit symbology\".\n", |
241 |
| - "Select \"Render type: Graduated\", \"Value: ELEV_IN_FT\", \"Method: Color\".\n", |
242 |
| - "Select your favorite colormap (**please, don't select \"Rainbow\" - it is not an effective colormap**).\n", |
243 |
| - "Click \"Classify\", then click \"OK\".\n", |
| 284 | + "* **Right click on the \"US Cities\" layer in the left panel**.\n", |
| 285 | + "* **Select \"Edit symbology\"**.\n", |
| 286 | + "* **Input the following settings**\n", |
| 287 | + "\n", |
| 288 | + " You may want to view these settings in a separate window; SHIFT+right-click the image and select \"Open in new window\"\n", |
| 289 | + "\n", |
| 290 | + " \n", |
| 291 | + " \n", |
| 292 | + " * Render type: Graduated\n", |
| 293 | + " * Value: ELEV_IN_FT\n", |
| 294 | + " * Method: Color\n", |
| 295 | + " * Select your favorite colormap (**please, don't select \"Rainbow\" - it is not an effective colormap**).\n", |
| 296 | + "* **Click \"Classify\", then click \"OK\".**\n", |
244 | 297 | "\n",
|
245 |
| - "What's the highest-elevation city you can see?\n", |
| 298 | + "What's the highest elevation value you can see?\n", |
246 | 299 | "What would you do differently to make it easier to find?\n",
|
247 | 300 | "Do you see any flaws in this dataset when you use \"Identify\" on the points?"
|
248 | 301 | ]
|
|
0 commit comments