|
8 | 8 | "source": [
|
9 | 9 | "# STSA Data Visualization With Python\n",
|
10 | 10 | "\n",
|
11 |
| - "<img width=\"700\" src=\"https://ibm.box.com/shared/static/gk8bni28qatazqhn6wpwyp8c06ogepcx.png\">\n", |
| 11 | + "<img width=\"700\" src=\"https://github.com/IBM/visualize-data-with-python/blob/master/doc/source/images/Harvey.png\">\n", |
12 | 12 | "\n",
|
13 | 13 | "NASA TERRA MODIS INFRARED IMAGE OF HARVEY AT 0419 UTC 26 AUGUST 2017 JUST AFTER LANDFALL AS A\n",
|
14 | 14 | "CATEGORY 4 HURRICANE IN TEXAS. IMAGE COURTESY OF UW/CIMSS.\n",
|
|
140 | 140 | "metadata": {},
|
141 | 141 | "outputs": [],
|
142 | 142 | "source": [
|
143 |
| - "!wget \"https://ibm.box.com/shared/static/vtw86pvek6zeqtt64hfubc4cb03aj83y.csv\"\n", |
144 |
| - "!mv vtw86pvek6zeqtt64hfubc4cb03aj83y.csv HuntingBayou\n", |
145 |
| - "!ls" |
| 143 | + "!wget https://raw.githubusercontent.com/IBM/visualize-data-with-python/master/data/HuntingBayou.csv\n" |
146 | 144 | ]
|
147 | 145 | },
|
148 | 146 | {
|
|
158 | 156 | "metadata": {},
|
159 | 157 | "outputs": [],
|
160 | 158 | "source": [
|
161 |
| - "! head -n 35 HuntingBayou" |
| 159 | + "! head -n 35 HuntingBayou.csv" |
162 | 160 | ]
|
163 | 161 | },
|
164 | 162 | {
|
|
175 | 173 | "metadata": {},
|
176 | 174 | "outputs": [],
|
177 | 175 | "source": [
|
178 |
| - "df = pd.read_csv('HuntingBayou',sep='\\t',skiprows=(0-28),header=(29))" |
| 176 | + "df = pd.read_csv('HuntingBayou.csv',sep='\\t',skiprows=(0-28),header=(29))" |
179 | 177 | ]
|
180 | 178 | },
|
181 | 179 | {
|
|
226 | 224 | "cell_type": "markdown",
|
227 | 225 | "metadata": {},
|
228 | 226 | "source": [
|
229 |
| - "Let's replace the `site_no` with a `site_name` for `HuntingBayou`:" |
| 227 | + "Let's replace the `site_no` with a `site_name` for `HuntingBayou.csv`:" |
230 | 228 | ]
|
231 | 229 | },
|
232 | 230 | {
|
|
236 | 234 | "outputs": [],
|
237 | 235 | "source": [
|
238 | 236 | "df.rename(columns={'site_no': 'site_name'}, inplace=True)\n",
|
239 |
| - "df['site_name'].replace(\"08075770\", \"HuntingBayou\", inplace=True)" |
| 237 | + "df['site_name'].replace(\"08075770\", \"HuntingBayou.csv\", inplace=True)" |
240 | 238 | ]
|
241 | 239 | },
|
242 | 240 | {
|
|
432 | 430 | " \n",
|
433 | 431 | "#### 2.7.1 Select _DataFrame Table_ icon in the display widget to see the data in tabular form\n",
|
434 | 432 | "\n",
|
435 |
| - "<img width=\"500\" src=\"https://ibm.box.com/shared/static/v2m8x90x4h27lsjzvny2mjmavx04cuem.png\">\n", |
| 433 | + "<img width=\"500\" src=\"https://github.com/IBM/visualize-data-with-python/blob/master/doc/source/selectDataFrameTableIcon.png\">\n", |
436 | 434 | "\n",
|
437 | 435 | "#### 2.7.2 Select the chart icon to pull down and choose `line chart`. Click the `Options` button, and then for `Keys` drag and drop `datetime` and for `Values` drag and drop `Discharge`. This will display the water discharge at this stream gauge in cubic feet per second.\n",
|
438 | 436 | "\n",
|
439 |
| - "<img width=\"500\" src=\"https://ibm.box.com/shared/static/jqh9t25jv39q5vplx4ecccl10zpoiudr.png\">\n", |
| 437 | + "<img width=\"500\" src=\"https://github.com/IBM/visualize-data-with-python/blob/master/doc/source/selectLineChart.png\">\n", |
440 | 438 | "\n",
|
441 |
| - "<img width=\"500\" src=\"https://ibm.box.com/shared/static/pyot4jkd1j2kxgbtlhvqk35i5w9r91f2.png\">\n", |
| 439 | + "<img width=\"500\" src=\"https://github.com/IBM/visualize-data-with-python/blob/master/doc/source/chooseDatetimeDischarge.png\">\n", |
442 | 440 | "\n",
|
443 | 441 | "\n",
|
444 | 442 | "#### 2.7.4 Click the `Options` button, and then for `Keys` drag and drop `datetime` and for `Values` drag and drop `Gauge_Height`. This will display the height of the water at this stream gauge, in feet.\n"
|
|
491 | 489 | "metadata": {},
|
492 | 490 | "outputs": [],
|
493 | 491 | "source": [
|
494 |
| - "!wget \"https://ibm.box.com/shared/static/oh717dsl1d63nhomhguoqwpyp1f00psk.csv\"" |
| 492 | + "!wget https://raw.githubusercontent.com/IBM/visualize-data-with-python/master/data/maxFlood.csv\n" |
495 | 493 | ]
|
496 | 494 | },
|
497 | 495 | {
|
|
500 | 498 | "metadata": {},
|
501 | 499 | "outputs": [],
|
502 | 500 | "source": [
|
503 |
| - "!mv oh717dsl1d63nhomhguoqwpyp1f00psk.csv flood.csv\n", |
504 |
| - "!ls" |
505 |
| - ] |
506 |
| - }, |
507 |
| - { |
508 |
| - "cell_type": "code", |
509 |
| - "execution_count": null, |
510 |
| - "metadata": {}, |
511 |
| - "outputs": [], |
512 |
| - "source": [ |
513 |
| - "maxFlood = pd.read_csv('flood.csv')" |
| 501 | + "maxFlood = pd.read_csv('maxFlood.csv')" |
514 | 502 | ]
|
515 | 503 | },
|
516 | 504 | {
|
|
592 | 580 | "metadata": {},
|
593 | 581 | "outputs": [],
|
594 | 582 | "source": [
|
595 |
| - "!wget https://ibm.box.com/shared/static/wo7piia0faxp1vu8cfkmrb5e5olon9l0.geojson\n", |
596 |
| - "!mv wo7piia0faxp1vu8cfkmrb5e5olon9l0.geojson houstonFlood.geojson\n", |
597 |
| - "!ls" |
| 583 | + "!wget https://raw.githubusercontent.com/IBM/visualize-data-with-python/master/data/streamGauges.geojson\n" |
598 | 584 | ]
|
599 | 585 | },
|
600 | 586 | {
|
|
626 | 612 | "\n",
|
627 | 613 | " self.setLayers([\n",
|
628 | 614 | " {\n",
|
629 |
| - " \"name\": \"Houston Flood\",\n", |
630 |
| - " \"url\": \"https://ibm.box.com/shared/static/wo7piia0faxp1vu8cfkmrb5e5olon9l0.geojson\",\n", |
| 615 | + " \"name\": \"Houston Flooded Streets\",\n", |
| 616 | + " \"url\": \"https://raw.githubusercontent.com/IBM/visualize-data-with-python/master/data/houston.geojson\",\n", |
631 | 617 | " \"type\": \"LineString\"\n",
|
632 | 618 | " },\n",
|
633 | 619 | " {\n",
|
634 |
| - " \"name\": \"STSA homes\",\n", |
635 |
| - " \"url\": \"https://ibm.box.com/shared/static/g4go447ovrwmuwvn6f79leeiqftoys0u.geojson\",\n", |
| 620 | + " \"name\": \"Random fictional homes\",\n", |
| 621 | + " \"url\": \"https://raw.githubusercontent.com/IBM/visualize-data-with-python/master/data/HoustonFloodedZips250.geojson\",\n", |
636 | 622 | " \"circle-color\": \"rgb(0, 255, 0)\"\n",
|
637 | 623 | " }\n",
|
638 | 624 | " ])\n",
|
|
0 commit comments