├── .gitignore ├── Exercise-1 ├── Exercise-1-notebook.ipynb └── Exercise1.md ├── Exercise-2 ├── Exercise-2.md ├── Notebook A.ipynb ├── Notebook B.ipynb ├── Report.md └── lib.py ├── Exercise-3 ├── Exercise-3.md └── example.json ├── Exercise-4 ├── Certificate.ipynb ├── Exercise-4.md └── scipy2018.cert.json ├── data ├── 1024px-Hubble_Interacting_Galaxy_AM_0500-620_(2008-04-24).jpg ├── Dockerfile ├── Museums_in_DC.geojson ├── README.md ├── bar.vl.json ├── iris.csv ├── japan_meterological_agency_201707211555.json └── zika_assembled_genomes.fasta ├── environment.yml ├── notebooks ├── Data.ipynb ├── Fasta.ipynb ├── Lorenz.ipynb ├── bqplot demo.ipynb └── lorenz.py ├── outline.md ├── readme.md ├── scipy_cert ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── scipy2018.cert.json ├── src │ └── index.ts ├── style │ └── index.css └── tsconfig.json └── setup.sh /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | lib/ 3 | .ipynb_checkpoints/ 4 | __pycache__/ 5 | my_certificate_viewer/ 6 | -------------------------------------------------------------------------------- /Exercise-1/Exercise-1-notebook.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Exercise 1 notebook\n", 8 | "\n", 9 | "This has just solution, or if you just want tosee the finisehed homework.\n", 10 | "\n", 11 | "This is a markdown cell with **bold** _italic_ inline $math$, and formulas:\n", 12 | "\n", 13 | "$$f(x) = a.x^2+b.x+c$$\n", 14 | "\n", 15 | "$$x_\\pm = \\frac{-b \\pm \\sqrt(b^2-4ac)}{2a}$$\n", 16 | "\n", 17 | "Tribple backticks with llanguage\n", 18 | "\n", 19 | "```python\n", 20 | "# I can write some code:\n", 21 | "from IPython.display import Math\n", 22 | "Math('\\Delta = b^2-4ac')\n", 23 | "```\n", 24 | "\n", 25 | "Indented 4 spaces:\n", 26 | "\n", 27 | " # I can write some code:\n", 28 | " from IPython.display import Math\n", 29 | " Math('\\Delta = b^2-4ac')\n", 30 | "\n", 31 | "\n", 32 | "Try to get a feel of the editor (select and press TAB...)" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": 2, 38 | "metadata": {}, 39 | "outputs": [ 40 | { 41 | "data": { 42 | "text/latex": [ 43 | "$$\\Delta = b^2-4ac$$" 44 | ], 45 | "text/plain": [ 46 | "" 47 | ] 48 | }, 49 | "execution_count": 2, 50 | "metadata": {}, 51 | "output_type": "execute_result" 52 | } 53 | ], 54 | "source": [ 55 | "from IPython.display import Math\n", 56 | "Math('\\Delta = b^2-4ac')" 57 | ] 58 | }, 59 | { 60 | "cell_type": "markdown", 61 | "metadata": {}, 62 | "source": [ 63 | "Let's carry on with the exercise. To be efficient we'll lear to use the keyboard shortcuts. " 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": 5, 69 | "metadata": {}, 70 | "outputs": [ 71 | { 72 | "name": "stdout", 73 | "output_type": "stream", 74 | "text": [ 75 | "Hello SciPy\n" 76 | ] 77 | } 78 | ], 79 | "source": [ 80 | "print(\"Hello SciPy\")" 81 | ] 82 | }, 83 | { 84 | "cell_type": "markdown", 85 | "metadata": {}, 86 | "source": [ 87 | "You will notice that `Ctrl-Enter` execute a cell in place (and keep it selected), while `Shift-Enter` execute and select next. Finally, `Alt-Enter` execute and insert below." 88 | ] 89 | }, 90 | { 91 | "cell_type": "code", 92 | "execution_count": 90, 93 | "metadata": {}, 94 | "outputs": [], 95 | "source": [ 96 | "def fibgen():\n", 97 | " a,b = 1,1\n", 98 | " for i in range(100):\n", 99 | " yield i, a\n", 100 | " a,b = b, a+b\n", 101 | "fib = fibgen()" 102 | ] 103 | }, 104 | { 105 | "cell_type": "code", 106 | "execution_count": 107, 107 | "metadata": {}, 108 | "outputs": [ 109 | { 110 | "data": { 111 | "text/plain": [ 112 | "(16, 1597)" 113 | ] 114 | }, 115 | "execution_count": 107, 116 | "metadata": {}, 117 | "output_type": "execute_result" 118 | } 119 | ], 120 | "source": [ 121 | "# crl-enter to iter through this.\n", 122 | "next(fib)" 123 | ] 124 | }, 125 | { 126 | "cell_type": "markdown", 127 | "metadata": {}, 128 | "source": [ 129 | "## kernel's related functionalities." 130 | ] 131 | }, 132 | { 133 | "cell_type": "code", 134 | "execution_count": 1, 135 | "metadata": {}, 136 | "outputs": [], 137 | "source": [ 138 | "import pandas as pd" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": 109, 144 | "metadata": {}, 145 | "outputs": [ 146 | { 147 | "data": { 148 | "text/plain": [ 149 | "\u001b[0;31mType:\u001b[0m module\n", 150 | "\u001b[0;31mString form:\u001b[0m \n", 151 | "\u001b[0;31mFile:\u001b[0m ~/anaconda/envs/scipy18jlab/lib/python3.6/site-packages/pandas/__init__.py\n", 152 | "\u001b[0;31mDocstring:\u001b[0m \n", 153 | "pandas - a powerful data analysis and manipulation library for Python\n", 154 | "=====================================================================\n", 155 | "\n", 156 | "**pandas** is a Python package providing fast, flexible, and expressive data\n", 157 | "structures designed to make working with \"relational\" or \"labeled\" data both\n", 158 | "easy and intuitive. It aims to be the fundamental high-level building block for\n", 159 | "doing practical, **real world** data analysis in Python. Additionally, it has\n", 160 | "the broader goal of becoming **the most powerful and flexible open source data\n", 161 | "analysis / manipulation tool available in any language**. It is already well on\n", 162 | "its way toward this goal.\n", 163 | "\n", 164 | "Main Features\n", 165 | "-------------\n", 166 | "Here are just a few of the things that pandas does well:\n", 167 | "\n", 168 | " - Easy handling of missing data in floating point as well as non-floating\n", 169 | " point data.\n", 170 | " - Size mutability: columns can be inserted and deleted from DataFrame and\n", 171 | " higher dimensional objects\n", 172 | " - Automatic and explicit data alignment: objects can be explicitly aligned\n", 173 | " to a set of labels, or the user can simply ignore the labels and let\n", 174 | " `Series`, `DataFrame`, etc. automatically align the data for you in\n", 175 | " computations.\n", 176 | " - Powerful, flexible group by functionality to perform split-apply-combine\n", 177 | " operations on data sets, for both aggregating and transforming data.\n", 178 | " - Make it easy to convert ragged, differently-indexed data in other Python\n", 179 | " and NumPy data structures into DataFrame objects.\n", 180 | " - Intelligent label-based slicing, fancy indexing, and subsetting of large\n", 181 | " data sets.\n", 182 | " - Intuitive merging and joining data sets.\n", 183 | " - Flexible reshaping and pivoting of data sets.\n", 184 | " - Hierarchical labeling of axes (possible to have multiple labels per tick).\n", 185 | " - Robust IO tools for loading data from flat files (CSV and delimited),\n", 186 | " Excel files, databases, and saving/loading data from the ultrafast HDF5\n", 187 | " format.\n", 188 | " - Time series-specific functionality: date range generation and frequency\n", 189 | " conversion, moving window statistics, moving window linear regressions,\n", 190 | " date shifting and lagging, etc.\n" 191 | ] 192 | }, 193 | "metadata": {}, 194 | "output_type": "display_data" 195 | } 196 | ], 197 | "source": [ 198 | "pd?" 199 | ] 200 | }, 201 | { 202 | "cell_type": "code", 203 | "execution_count": 5, 204 | "metadata": {}, 205 | "outputs": [ 206 | { 207 | "data": { 208 | "text/plain": [ 209 | "" 210 | ] 211 | }, 212 | "execution_count": 5, 213 | "metadata": {}, 214 | "output_type": "execute_result" 215 | } 216 | ], 217 | "source": [ 218 | "# tab\n", 219 | "pd.D" 220 | ] 221 | }, 222 | { 223 | "cell_type": "code", 224 | "execution_count": null, 225 | "metadata": {}, 226 | "outputs": [], 227 | "source": [ 228 | "#Shift-tab\n", 229 | "pd.DataFrame(" 230 | ] 231 | }, 232 | { 233 | "cell_type": "code", 234 | "execution_count": 111, 235 | "metadata": {}, 236 | "outputs": [ 237 | { 238 | "name": "stdout", 239 | "output_type": "stream", 240 | "text": [ 241 | "1024px-Hubble_Interacting_Galaxy_AM_0500-620_(2008-04-24).jpg\n", 242 | "Dockerfile\n", 243 | "Museums_in_DC.geojson\n", 244 | "README.md\n", 245 | "bar.vl.json\n", 246 | "iris.csv\n", 247 | "japan_meterological_agency_201707211555.json\n", 248 | "zika_assembled_genomes.fasta\n" 249 | ] 250 | } 251 | ], 252 | "source": [ 253 | "!ls ../data/" 254 | ] 255 | }, 256 | { 257 | "cell_type": "code", 258 | "execution_count": 51, 259 | "metadata": {}, 260 | "outputs": [], 261 | "source": [ 262 | "# open inspector\n", 263 | "df = pd.read_csv('../data/iris.csv')" 264 | ] 265 | }, 266 | { 267 | "cell_type": "code", 268 | "execution_count": 54, 269 | "metadata": {}, 270 | "outputs": [], 271 | "source": [ 272 | "#import IPython\n", 273 | "#ip = get_ipython()\n", 274 | "#ip.Completer.use_jedi = False" 275 | ] 276 | }, 277 | { 278 | "cell_type": "code", 279 | "execution_count": 55, 280 | "metadata": {}, 281 | "outputs": [], 282 | "source": [ 283 | "%matplotlib inline" 284 | ] 285 | }, 286 | { 287 | "cell_type": "code", 288 | "execution_count": 56, 289 | "metadata": {}, 290 | "outputs": [ 291 | { 292 | "data": { 293 | "text/html": [ 294 | "
\n", 295 | "\n", 308 | "\n", 309 | " \n", 310 | " \n", 311 | " \n", 312 | " \n", 313 | " \n", 314 | " \n", 315 | " \n", 316 | " \n", 317 | " \n", 318 | " \n", 319 | " \n", 320 | " \n", 321 | " \n", 322 | " \n", 323 | " \n", 324 | " \n", 325 | " \n", 326 | " \n", 327 | " \n", 328 | " \n", 329 | " \n", 330 | " \n", 331 | " \n", 332 | " \n", 333 | " \n", 334 | " \n", 335 | " \n", 336 | " \n", 337 | " \n", 338 | " \n", 339 | " \n", 340 | " \n", 341 | " \n", 342 | " \n", 343 | " \n", 344 | " \n", 345 | " \n", 346 | " \n", 347 | " \n", 348 | " \n", 349 | " \n", 350 | " \n", 351 | " \n", 352 | " \n", 353 | " \n", 354 | " \n", 355 | " \n", 356 | " \n", 357 | " \n", 358 | " \n", 359 | " \n", 360 | " \n", 361 | "
sepal_lengthsepal_widthpetal_lengthpetal_widthspecies
05.13.51.40.2se
14.93.01.40.2setosa
24.73.21.30.2setosa
34.63.11.50.2setosa
45.03.61.40.2setosa
\n", 362 | "
" 363 | ], 364 | "text/plain": [ 365 | " sepal_length sepal_width petal_length petal_width species\n", 366 | "0 5.1 3.5 1.4 0.2 se\n", 367 | "1 4.9 3.0 1.4 0.2 setosa\n", 368 | "2 4.7 3.2 1.3 0.2 setosa\n", 369 | "3 4.6 3.1 1.5 0.2 setosa\n", 370 | "4 5.0 3.6 1.4 0.2 setosa" 371 | ] 372 | }, 373 | "execution_count": 56, 374 | "metadata": {}, 375 | "output_type": "execute_result" 376 | } 377 | ], 378 | "source": [ 379 | "df.head()" 380 | ] 381 | }, 382 | { 383 | "cell_type": "code", 384 | "execution_count": 57, 385 | "metadata": {}, 386 | "outputs": [ 387 | { 388 | "data": { 389 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAELCAYAAADdriHjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X+0XXV55/H3B8gEJMFokhWVJA0aypQKBri1RIRacaxWDDOFGZlVGuOPxVRRoLajtWsVLV3qYK0i0pFBbSX4CydQi44/UJEBrGBvMID8UG4LkiCGm/ArKDLEPPPH2RfuOZx7zzn3fPc+333O57XWXblnn332efY3+97n7n2+z34UEZiZmU3Za9ABmJlZXpwYzMysiRODmZk1cWIwM7MmTgxmZtbEicHMzJo4MZiZWRMnBjMza1JJYpC0t6QfSPpKm+c2SJqUtKX4enMVMZmZWXv7VPQ+ZwK3AwfM8PylEfG2bje2ZMmSWLVqVYq4zMxGxubNm3dExNJO65WeGCQtB14DvA94R4ptrlq1ivHx8RSbMjMbGZJ+0s16VVxKOg94J7BnlnVOknSzpE2SVlQQk5mZzaDUxCDpBOD+iNg8y2pfBlZFxOHAt4CLZ9jWaZLGJY1PTk6WEK2ZmUH5ZwzHAOsk3Q18AXi5pM9MXyEidkbE48XDTwBHtdtQRFwUEWMRMbZ0acdLZGZmNkelJoaIeHdELI+IVcApwFURcer0dSQ9d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n1xzErnymcbOsXtNr5I4347ewN/TaOi9sPAAmAHsCEi7pN0NbCFxj2bDgDeGBHfL253cB6wH40K1zcU9+vvJY6lwIXAymLRWRHxXUnvLZY9v/j3vIg4v3jNXwJ/SOPOmDuAzcDdwBiNCufHgKlmPG+X9FpgHvCfI+KOXuIzm4nPGGwYvQr4aUS8KCJeCHydxp0wT46Io4C/B943bf39I+IlwFuL5wDuAI4r7lp6NvD+OcTxUeAjEfFbwEk09/X498Dv0UhI75E0T9JYsd4RwB/QSAZExCZgHPjDiFgTEY8V29hR3Kn248CfzSE+s7Z8xmDD6BbgQ5LOBb4CPAi8EPhmcZ+mvWncx37K5wEi4hpJB0haBCwELpZ0MI3bFc+bQxyvAA6d1h/lgKmbCAL/p7gz7+OS7qdxH6mXAv809Ytf0pc7bP/y4t/NNBKJWRJODDZ0IuLHko6icVO2DwDfBG6NiLUzvaTN478GvhMR/0mNfrlXzyGUvYC10/7CB6BIFI9PW/QrGj+LXXfYKkxtY+r1Zkn4UpINnWL2zi8i4jM0Ol39NrBU0tri+XktnbdeVyx/KY3bPT9M4/719xbPb5hjKFcCT/YDl7Smw/rXAa+VtK+kBTTayk7ZReMsxqx0/ivDhtE9C3fgAAAAw0lEQVRhwN9I2gM8AbyFxu2Jz5f0TBrH/XnArcX6D0r6Z4oPn4tlH6RxKekdwFVzjOMM4O8k3Vy85zXAH8+0ckT8i6QrgJuAn9D4XOHh4ulPAxe2fPhsVgrfdttGWjEr6c8iYnzQsQBIWhARjxZ9Aa4BTouIGwcdl40WnzGY5eUiSYcC+wIXOynYIPiMwWwOJL0BOLNl8Xcj4vRBxGOWkhODmZk18awkMzNr4sRgZmZNnBjMzKyJE4OZmTVxYjAzsyb/H+ZKmlUcTUE4AAAAAElFTkSuQmCC\n", 390 | "text/plain": [ 391 | "
" 392 | ] 393 | }, 394 | "metadata": {}, 395 | "output_type": "display_data" 396 | } 397 | ], 398 | "source": [ 399 | "ax2 = df.plot.scatter(x='sepal_length',\n", 400 | " y='sepal_width')" 401 | ] 402 | }, 403 | { 404 | "cell_type": "code", 405 | "execution_count": 58, 406 | "metadata": {}, 407 | "outputs": [], 408 | "source": [ 409 | "import numpy as np" 410 | ] 411 | }, 412 | { 413 | "cell_type": "code", 414 | "execution_count": 60, 415 | "metadata": {}, 416 | "outputs": [ 417 | { 418 | "name": "stdout", 419 | "output_type": "stream", 420 | "text": [ 421 | "0 : 0\n", 422 | "1 : 1\n", 423 | "2 : 4\n", 424 | "3 : 9\n", 425 | "4 : 16\n", 426 | "5 : 25\n", 427 | "6 : 36\n", 428 | "7 : 49\n", 429 | "8 : 64\n", 430 | "9 : 81\n", 431 | "10 : 100\n", 432 | "11 : 121\n", 433 | "12 : 144\n", 434 | "13 : 169\n", 435 | "14 : 196\n", 436 | "15 : 225\n", 437 | "16 : 256\n", 438 | "17 : 289\n", 439 | "18 : 324\n", 440 | "19 : 361\n", 441 | "20 : 400\n", 442 | "21 : 441\n", 443 | "22 : 484\n", 444 | "23 : 529\n", 445 | "24 : 576\n", 446 | "25 : 625\n", 447 | "26 : 676\n", 448 | "27 : 729\n", 449 | "28 : 784\n", 450 | "29 : 841\n", 451 | "30 : 900\n", 452 | "31 : 961\n", 453 | "32 : 1024\n", 454 | "33 : 1089\n", 455 | "34 : 1156\n", 456 | "35 : 1225\n", 457 | "36 : 1296\n", 458 | "37 : 1369\n", 459 | "38 : 1444\n", 460 | "39 : 1521\n", 461 | "40 : 1600\n", 462 | "41 : 1681\n", 463 | "42 : 1764\n", 464 | "43 : 1849\n", 465 | "44 : 1936\n", 466 | "45 : 2025\n", 467 | "46 : 2116\n", 468 | "47 : 2209\n", 469 | "48 : 2304\n", 470 | "49 : 2401\n", 471 | "50 : 2500\n", 472 | "51 : 2601\n", 473 | "52 : 2704\n", 474 | "53 : 2809\n", 475 | "54 : 2916\n", 476 | "55 : 3025\n", 477 | "56 : 3136\n", 478 | "57 : 3249\n", 479 | "58 : 3364\n", 480 | "59 : 3481\n", 481 | "60 : 3600\n", 482 | "61 : 3721\n", 483 | "62 : 3844\n", 484 | "63 : 3969\n", 485 | "64 : 4096\n", 486 | "65 : 4225\n", 487 | "66 : 4356\n", 488 | "67 : 4489\n", 489 | "68 : 4624\n", 490 | "69 : 4761\n", 491 | "70 : 4900\n", 492 | "71 : 5041\n", 493 | "72 : 5184\n", 494 | "73 : 5329\n", 495 | "74 : 5476\n", 496 | "75 : 5625\n", 497 | "76 : 5776\n", 498 | "77 : 5929\n", 499 | "78 : 6084\n", 500 | "79 : 6241\n", 501 | "80 : 6400\n", 502 | "81 : 6561\n", 503 | "82 : 6724\n", 504 | "83 : 6889\n", 505 | "84 : 7056\n", 506 | "85 : 7225\n", 507 | "86 : 7396\n", 508 | "87 : 7569\n", 509 | "88 : 7744\n", 510 | "89 : 7921\n", 511 | "90 : 8100\n", 512 | "91 : 8281\n", 513 | "92 : 8464\n", 514 | "93 : 8649\n", 515 | "94 : 8836\n", 516 | "95 : 9025\n", 517 | "96 : 9216\n", 518 | "97 : 9409\n", 519 | "98 : 9604\n", 520 | "99 : 9801\n", 521 | "100 : 10000\n", 522 | "101 : 10201\n", 523 | "102 : 10404\n", 524 | "103 : 10609\n", 525 | "104 : 10816\n", 526 | "105 : 11025\n", 527 | "106 : 11236\n", 528 | "107 : 11449\n", 529 | "108 : 11664\n", 530 | "109 : 11881\n", 531 | "110 : 12100\n", 532 | "111 : 12321\n", 533 | "112 : 12544\n", 534 | "113 : 12769\n", 535 | "114 : 12996\n", 536 | "115 : 13225\n", 537 | "116 : 13456\n", 538 | "117 : 13689\n", 539 | "118 : 13924\n", 540 | "119 : 14161\n", 541 | "120 : 14400\n", 542 | "121 : 14641\n", 543 | "122 : 14884\n", 544 | "123 : 15129\n", 545 | "124 : 15376\n", 546 | "125 : 15625\n", 547 | "126 : 15876\n", 548 | "127 : 16129\n", 549 | "128 : 16384\n", 550 | "129 : 16641\n", 551 | "130 : 16900\n", 552 | "131 : 17161\n", 553 | "132 : 17424\n", 554 | "133 : 17689\n", 555 | "134 : 17956\n", 556 | "135 : 18225\n", 557 | "136 : 18496\n", 558 | "137 : 18769\n", 559 | "138 : 19044\n", 560 | "139 : 19321\n", 561 | "140 : 19600\n", 562 | "141 : 19881\n", 563 | "142 : 20164\n", 564 | "143 : 20449\n", 565 | "144 : 20736\n", 566 | "145 : 21025\n", 567 | "146 : 21316\n", 568 | "147 : 21609\n", 569 | "148 : 21904\n", 570 | "149 : 22201\n", 571 | "150 : 22500\n", 572 | "151 : 22801\n", 573 | "152 : 23104\n", 574 | "153 : 23409\n", 575 | "154 : 23716\n", 576 | "155 : 24025\n", 577 | "156 : 24336\n", 578 | "157 : 24649\n", 579 | "158 : 24964\n", 580 | "159 : 25281\n", 581 | "160 : 25600\n", 582 | "161 : 25921\n", 583 | "162 : 26244\n", 584 | "163 : 26569\n", 585 | "164 : 26896\n", 586 | "165 : 27225\n", 587 | "166 : 27556\n", 588 | "167 : 27889\n", 589 | "168 : 28224\n", 590 | "169 : 28561\n", 591 | "170 : 28900\n", 592 | "171 : 29241\n", 593 | "172 : 29584\n", 594 | "173 : 29929\n", 595 | "174 : 30276\n", 596 | "175 : 30625\n", 597 | "176 : 30976\n", 598 | "177 : 31329\n", 599 | "178 : 31684\n", 600 | "179 : 32041\n", 601 | "180 : 32400\n", 602 | "181 : 32761\n", 603 | "182 : 33124\n", 604 | "183 : 33489\n", 605 | "184 : 33856\n", 606 | "185 : 34225\n", 607 | "186 : 34596\n", 608 | "187 : 34969\n", 609 | "188 : 35344\n", 610 | "189 : 35721\n", 611 | "190 : 36100\n", 612 | "191 : 36481\n", 613 | "192 : 36864\n", 614 | "193 : 37249\n", 615 | "194 : 37636\n", 616 | "195 : 38025\n", 617 | "196 : 38416\n", 618 | "197 : 38809\n", 619 | "198 : 39204\n", 620 | "199 : 39601\n", 621 | "200 : 40000\n", 622 | "201 : 40401\n", 623 | "202 : 40804\n", 624 | "203 : 41209\n", 625 | "204 : 41616\n", 626 | "205 : 42025\n", 627 | "206 : 42436\n", 628 | "207 : 42849\n", 629 | "208 : 43264\n", 630 | "209 : 43681\n", 631 | "210 : 44100\n", 632 | "211 : 44521\n", 633 | "212 : 44944\n", 634 | "213 : 45369\n", 635 | "214 : 45796\n", 636 | "215 : 46225\n", 637 | "216 : 46656\n", 638 | "217 : 47089\n", 639 | "218 : 47524\n", 640 | "219 : 47961\n", 641 | "220 : 48400\n", 642 | "221 : 48841\n", 643 | "222 : 49284\n", 644 | "223 : 49729\n", 645 | "224 : 50176\n", 646 | "225 : 50625\n", 647 | "226 : 51076\n", 648 | "227 : 51529\n", 649 | "228 : 51984\n", 650 | "229 : 52441\n", 651 | "230 : 52900\n", 652 | "231 : 53361\n", 653 | "232 : 53824\n", 654 | "233 : 54289\n", 655 | "234 : 54756\n", 656 | "235 : 55225\n", 657 | "236 : 55696\n", 658 | "237 : 56169\n", 659 | "238 : 56644\n", 660 | "239 : 57121\n", 661 | "240 : 57600\n", 662 | "241 : 58081\n", 663 | "242 : 58564\n", 664 | "243 : 59049\n", 665 | "244 : 59536\n", 666 | "245 : 60025\n", 667 | "246 : 60516\n", 668 | "247 : 61009\n", 669 | "248 : 61504\n", 670 | "249 : 62001\n", 671 | "250 : 62500\n", 672 | "251 : 63001\n", 673 | "252 : 63504\n", 674 | "253 : 64009\n", 675 | "254 : 64516\n", 676 | "255 : 65025\n", 677 | "256 : 65536\n", 678 | "257 : 66049\n", 679 | "258 : 66564\n", 680 | "259 : 67081\n", 681 | "260 : 67600\n", 682 | "261 : 68121\n", 683 | "262 : 68644\n", 684 | "263 : 69169\n", 685 | "264 : 69696\n", 686 | "265 : 70225\n", 687 | "266 : 70756\n", 688 | "267 : 71289\n", 689 | "268 : 71824\n", 690 | "269 : 72361\n", 691 | "270 : 72900\n", 692 | "271 : 73441\n", 693 | "272 : 73984\n", 694 | "273 : 74529\n", 695 | "274 : 75076\n", 696 | "275 : 75625\n", 697 | "276 : 76176\n", 698 | "277 : 76729\n", 699 | "278 : 77284\n", 700 | "279 : 77841\n", 701 | "280 : 78400\n", 702 | "281 : 78961\n", 703 | "282 : 79524\n", 704 | "283 : 80089\n", 705 | "284 : 80656\n", 706 | "285 : 81225\n", 707 | "286 : 81796\n", 708 | "287 : 82369\n", 709 | "288 : 82944\n", 710 | "289 : 83521\n", 711 | "290 : 84100\n", 712 | "291 : 84681\n", 713 | "292 : 85264\n", 714 | "293 : 85849\n", 715 | "294 : 86436\n", 716 | "295 : 87025\n", 717 | "296 : 87616\n", 718 | "297 : 88209\n", 719 | "298 : 88804\n", 720 | "299 : 89401\n", 721 | "300 : 90000\n", 722 | "301 : 90601\n", 723 | "302 : 91204\n", 724 | "303 : 91809\n", 725 | "304 : 92416\n", 726 | "305 : 93025\n", 727 | "306 : 93636\n", 728 | "307 : 94249\n", 729 | "308 : 94864\n", 730 | "309 : 95481\n", 731 | "310 : 96100\n", 732 | "311 : 96721\n", 733 | "312 : 97344\n", 734 | "313 : 97969\n", 735 | "314 : 98596\n", 736 | "315 : 99225\n", 737 | "316 : 99856\n", 738 | "317 : 100489\n", 739 | "318 : 101124\n", 740 | "319 : 101761\n", 741 | "320 : 102400\n", 742 | "321 : 103041\n", 743 | "322 : 103684\n", 744 | "323 : 104329\n", 745 | "324 : 104976\n", 746 | "325 : 105625\n", 747 | "326 : 106276\n", 748 | "327 : 106929\n", 749 | "328 : 107584\n", 750 | "329 : 108241\n", 751 | "330 : 108900\n", 752 | "331 : 109561\n", 753 | "332 : 110224\n", 754 | "333 : 110889\n", 755 | "334 : 111556\n", 756 | "335 : 112225\n", 757 | "336 : 112896\n", 758 | "337 : 113569\n", 759 | "338 : 114244\n", 760 | "339 : 114921\n", 761 | "340 : 115600\n", 762 | "341 : 116281\n", 763 | "342 : 116964\n", 764 | "343 : 117649\n", 765 | "344 : 118336\n", 766 | "345 : 119025\n", 767 | "346 : 119716\n", 768 | "347 : 120409\n", 769 | "348 : 121104\n", 770 | "349 : 121801\n", 771 | "350 : 122500\n", 772 | "351 : 123201\n", 773 | "352 : 123904\n", 774 | "353 : 124609\n", 775 | "354 : 125316\n", 776 | "355 : 126025\n", 777 | "356 : 126736\n", 778 | "357 : 127449\n", 779 | "358 : 128164\n", 780 | "359 : 128881\n", 781 | "360 : 129600\n", 782 | "361 : 130321\n", 783 | "362 : 131044\n", 784 | "363 : 131769\n", 785 | "364 : 132496\n", 786 | "365 : 133225\n", 787 | "366 : 133956\n", 788 | "367 : 134689\n", 789 | "368 : 135424\n", 790 | "369 : 136161\n", 791 | "370 : 136900\n", 792 | "371 : 137641\n", 793 | "372 : 138384\n", 794 | "373 : 139129\n", 795 | "374 : 139876\n", 796 | "375 : 140625\n", 797 | "376 : 141376\n", 798 | "377 : 142129\n", 799 | "378 : 142884\n", 800 | "379 : 143641\n", 801 | "380 : 144400\n", 802 | "381 : 145161\n", 803 | "382 : 145924\n", 804 | "383 : 146689\n", 805 | "384 : 147456\n", 806 | "385 : 148225\n", 807 | "386 : 148996\n", 808 | "387 : 149769\n", 809 | "388 : 150544\n", 810 | "389 : 151321\n", 811 | "390 : 152100\n", 812 | "391 : 152881\n", 813 | "392 : 153664\n", 814 | "393 : 154449\n", 815 | "394 : 155236\n", 816 | "395 : 156025\n", 817 | "396 : 156816\n", 818 | "397 : 157609\n", 819 | "398 : 158404\n", 820 | "399 : 159201\n", 821 | "400 : 160000\n", 822 | "401 : 160801\n", 823 | "402 : 161604\n", 824 | "403 : 162409\n", 825 | "404 : 163216\n", 826 | "405 : 164025\n", 827 | "406 : 164836\n", 828 | "407 : 165649\n", 829 | "408 : 166464\n", 830 | "409 : 167281\n", 831 | "410 : 168100\n", 832 | "411 : 168921\n", 833 | "412 : 169744\n", 834 | "413 : 170569\n", 835 | "414 : 171396\n", 836 | "415 : 172225\n", 837 | "416 : 173056\n", 838 | "417 : 173889\n", 839 | "418 : 174724\n", 840 | "419 : 175561\n", 841 | "420 : 176400\n", 842 | "421 : 177241\n", 843 | "422 : 178084\n", 844 | "423 : 178929\n", 845 | "424 : 179776\n", 846 | "425 : 180625\n", 847 | "426 : 181476\n", 848 | "427 : 182329\n", 849 | "428 : 183184\n", 850 | "429 : 184041\n", 851 | "430 : 184900\n", 852 | "431 : 185761\n", 853 | "432 : 186624\n", 854 | "433 : 187489\n", 855 | "434 : 188356\n", 856 | "435 : 189225\n", 857 | "436 : 190096\n", 858 | "437 : 190969\n", 859 | "438 : 191844\n", 860 | "439 : 192721\n", 861 | "440 : 193600\n", 862 | "441 : 194481\n", 863 | "442 : 195364\n", 864 | "443 : 196249\n", 865 | "444 : 197136\n", 866 | "445 : 198025\n", 867 | "446 : 198916\n", 868 | "447 : 199809\n", 869 | "448 : 200704\n", 870 | "449 : 201601\n", 871 | "450 : 202500\n", 872 | "451 : 203401\n", 873 | "452 : 204304\n", 874 | "453 : 205209\n", 875 | "454 : 206116\n", 876 | "455 : 207025\n", 877 | "456 : 207936\n", 878 | "457 : 208849\n", 879 | "458 : 209764\n", 880 | "459 : 210681\n", 881 | "460 : 211600\n", 882 | "461 : 212521\n", 883 | "462 : 213444\n", 884 | "463 : 214369\n", 885 | "464 : 215296\n", 886 | "465 : 216225\n", 887 | "466 : 217156\n", 888 | "467 : 218089\n", 889 | "468 : 219024\n", 890 | "469 : 219961\n", 891 | "470 : 220900\n", 892 | "471 : 221841\n", 893 | "472 : 222784\n", 894 | "473 : 223729\n", 895 | "474 : 224676\n", 896 | "475 : 225625\n", 897 | "476 : 226576\n", 898 | "477 : 227529\n", 899 | "478 : 228484\n", 900 | "479 : 229441\n", 901 | "480 : 230400\n", 902 | "481 : 231361\n", 903 | "482 : 232324\n", 904 | "483 : 233289\n", 905 | "484 : 234256\n", 906 | "485 : 235225\n", 907 | "486 : 236196\n", 908 | "487 : 237169\n", 909 | "488 : 238144\n", 910 | "489 : 239121\n", 911 | "490 : 240100\n", 912 | "491 : 241081\n", 913 | "492 : 242064\n", 914 | "493 : 243049\n", 915 | "494 : 244036\n", 916 | "495 : 245025\n", 917 | "496 : 246016\n", 918 | "497 : 247009\n", 919 | "498 : 248004\n", 920 | "499 : 249001\n" 921 | ] 922 | } 923 | ], 924 | "source": [ 925 | "for i in range(500):\n", 926 | " print(i,\":\",i**2)" 927 | ] 928 | }, 929 | { 930 | "cell_type": "code", 931 | "execution_count": 64, 932 | "metadata": {}, 933 | "outputs": [ 934 | { 935 | "data": { 936 | "application/javascript": [ 937 | "alert(\"Hello SciPy\")" 938 | ], 939 | "text/plain": [ 940 | "" 941 | ] 942 | }, 943 | "execution_count": 64, 944 | "metadata": {}, 945 | "output_type": "execute_result" 946 | } 947 | ], 948 | "source": [ 949 | "from IPython.display import Javascript\n", 950 | "Javascript('alert(\"Hello SciPy\")')" 951 | ] 952 | }, 953 | { 954 | "cell_type": "code", 955 | "execution_count": null, 956 | "metadata": {}, 957 | "outputs": [], 958 | "source": [] 959 | }, 960 | { 961 | "cell_type": "code", 962 | "execution_count": null, 963 | "metadata": {}, 964 | "outputs": [], 965 | "source": [] 966 | } 967 | ], 968 | "metadata": { 969 | "kernelspec": { 970 | "display_name": "Python 3", 971 | "language": "python", 972 | "name": "python3" 973 | }, 974 | "language_info": { 975 | "codemirror_mode": { 976 | "name": "ipython", 977 | "version": 3 978 | }, 979 | "file_extension": ".py", 980 | "mimetype": "text/x-python", 981 | "name": "python", 982 | "nbconvert_exporter": "python", 983 | "pygments_lexer": "ipython3", 984 | "version": "3.6.5" 985 | } 986 | }, 987 | "nbformat": 4, 988 | "nbformat_minor": 2 989 | } 990 | -------------------------------------------------------------------------------- /Exercise-1/Exercise1.md: -------------------------------------------------------------------------------- 1 | # Exercises 1 2 | 3 | Remove all the sticky notes from your screen :-) and attempt the following. 4 | These are _guidelines_, feel free to err on the side of workflow and 5 | options that suits _you_ if you find them best. 6 | 7 | Keep in mind, if something is not intuitive, or not in the place you expected 8 | it, write it down (for example on the red sticky note), and give it to us at the 9 | break. 10 | 11 | ## View this file as rendered markdown. 12 | 13 | Right-click on the `Exercise1.md` file to open it as rendered markdown. 14 | 15 | ## Layout 16 | 17 | Create a new notebook. 18 | 19 | Arrange the notebook and rendered markdown side-by-side. Then arrange them, one on top and one on bottom. Then arrange them in a single panel with two tabs. Then split them out again to side-by-side. 20 | 21 | ## Notebook operations 22 | 23 | - Change the first cell to markdown, and write some markdown with 24 | - Bold 25 | - italic 26 | - [Math](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference) (inlne and formulas): `$f(x) = a.x^2+b.x+c$`, `$$x_\pm = \frac{-b \pm \sqrt(b^2-4ac)}{2a}$$` 27 | - Code (triple backtick fences ` ``` `, or indented 4 spaces) 28 | - Create a code cell and evaluate it, printing "Hello SciPy" 29 | - Experiment with the run shortcuts `Ctrl-Enter`, `Shift-Enter`, and `Alt-Enter` and note the differences between them (see the Run menu for help). 30 | - try importing `pandas` 31 | - evaluate `pandas?` to get the help on the pandas library. 32 | - try `pandas.D` to get tab completion on the pandas library. Note that completions can take a few second the first time the library get inspected to get result. 33 | - Complete to `pandas.DataFrame(` place the cursor after the open bracket and press `Shift-Tab` to get quick help. 34 | - To always see the info about the current function you can open the inspector via the command palette. 35 | - Use the command palette the find the Keyboard shortcut to open the inspector. 36 | - Move the inspector tab somewhere so that you can see both it and the notebook. 37 | - Type `pandas.read_csv(` to see the inspector display function help. 38 | - Use panda’s `read_csv` to load `'../data/iris.csv'` into a dataframe, display this dataframe 39 | - open `'../data/iris.csv'` as a standalone CSV file. 40 | - use `%matpltolib inline` to allow inline graphs, 41 | - make a scatter plot of `sepal_length` vs `sepal_width`. 42 | 43 | 44 | # More advanced notebooks 45 | 46 | - Move a cell by dragging 47 | - Use the View menu, or click the blue bar, to collapse and expand an input and an output. 48 | - Use the context menu to enable scrolling in a cell that has lots of output. 49 | - Try “Create new view for output” in the context menu of an output. Modify and execute the cell again to see the mirrored output update (will learn more in section 2) 50 | - Learn the various keyboard shortcuts through the menu and the command palette. 51 | -------------------------------------------------------------------------------- /Exercise-2/Exercise-2.md: -------------------------------------------------------------------------------- 1 | # Exercises 2 2 | 3 | Remove all the sticky notes from your screen :-) and attempt the following. 4 | These are _guidelines_, feel free to ere on the side of workflow and 5 | options that suits _you_ if you find them best. 6 | 7 | Keep in mind, if something is not intuitive, or not in the place you expected it, write 8 | it down (for example on the red sticky note), and give it to us at the break. 9 | 10 | ## Running things 11 | 12 | 13 | - Binding multiple documents to the same kernel 14 | - Notebook + console workflow 15 | - Markdown + console workflow 16 | - Python code file + console workflow 17 | - Open notebook in classic notebook, modify, save and reopen in Lab (hint: look in Help menu) 18 | - Try creating new document/notebook/terminal/console 19 | - Open two notebooks with the same kernel 20 | - Go to the Running tab to shut down all kernels 21 | 22 | - Try arranging different layout, and refresh the page. Get a feeling of which layout element persist across refresh 23 | - Try to find information about "single-document mode" 24 | -------------------------------------------------------------------------------- /Exercise-2/Notebook A.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Notebook A" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 5, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "a=3" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": null, 22 | "metadata": {}, 23 | "outputs": [], 24 | "source": [] 25 | } 26 | ], 27 | "metadata": { 28 | "kernelspec": { 29 | "display_name": "Python 3", 30 | "language": "python", 31 | "name": "python3" 32 | }, 33 | "language_info": { 34 | "codemirror_mode": { 35 | "name": "ipython", 36 | "version": 3 37 | }, 38 | "file_extension": ".py", 39 | "mimetype": "text/x-python", 40 | "name": "python", 41 | "nbconvert_exporter": "python", 42 | "pygments_lexer": "ipython3", 43 | "version": "3.6.5" 44 | } 45 | }, 46 | "nbformat": 4, 47 | "nbformat_minor": 2 48 | } 49 | -------------------------------------------------------------------------------- /Exercise-2/Notebook B.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Notebook B" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 6, 13 | "metadata": {}, 14 | "outputs": [ 15 | { 16 | "data": { 17 | "text/plain": [ 18 | "3" 19 | ] 20 | }, 21 | "execution_count": 6, 22 | "metadata": {}, 23 | "output_type": "execute_result" 24 | } 25 | ], 26 | "source": [ 27 | "a" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": null, 33 | "metadata": {}, 34 | "outputs": [], 35 | "source": [] 36 | } 37 | ], 38 | "metadata": { 39 | "kernelspec": { 40 | "display_name": "Python 3", 41 | "language": "python", 42 | "name": "python3" 43 | }, 44 | "language_info": { 45 | "codemirror_mode": { 46 | "name": "ipython", 47 | "version": 3 48 | }, 49 | "file_extension": ".py", 50 | "mimetype": "text/x-python", 51 | "name": "python", 52 | "nbconvert_exporter": "python", 53 | "pygments_lexer": "ipython3", 54 | "version": "3.6.5" 55 | } 56 | }, 57 | "nbformat": 4, 58 | "nbformat_minor": 2 59 | } 60 | -------------------------------------------------------------------------------- /Exercise-2/Report.md: -------------------------------------------------------------------------------- 1 | ## Attached markdown document to a console. 2 | 3 | 4 | Right-click somewhere on this document and click `"Create console for editor"`. 5 | You will be prompted to select a kernel (new or existing). 6 | 7 | Now that this is done, the current or _fenced block_, _selection_ or _line_ will be sent to the console and executed. 8 | 9 | # Iris dataset 10 | 11 | Let's learn some Pandas. First import `pandas`, it is common to alias to the shorter name `pd`. 12 | 13 | ``` 14 | import pandas as pd 15 | ``` 16 | 17 | Pandas provides some nice utilities function to load csv datasets: 18 | 19 | ``` 20 | df = pd.read_csv('../data/iris.csv') 21 | ``` 22 | 23 | enable inline plotting with `%matplotlib` magic function: 24 | 25 | ``` 26 | %matplotlib inline 27 | ``` 28 | 29 | ``` 30 | df.plot.scatter('sepal_width', 'sepal_length') 31 | ``` 32 | 33 | # Categorical 34 | ``` 35 | %load_ext autoreload 36 | %autoreload 1 37 | %aimport lib 38 | ``` 39 | 40 | ``` 41 | df = pd.read_csv('../data/iris.csv') 42 | lib.categorify(df, 'species') 43 | df.plot.scatter('sepal_width', 'sepal_length', c='species', colormap='viridis') 44 | ``` -------------------------------------------------------------------------------- /Exercise-2/lib.py: -------------------------------------------------------------------------------- 1 | from pandas import Categorical 2 | 3 | def categorify(df, keys): 4 | if isinstance(keys, str): 5 | keys = (keys, ) 6 | 7 | for key in keys: 8 | #df[key] = Categorical(df[key]) 9 | cat_map = {cat:i for i,cat in enumerate(set(df[key]))} 10 | df[key] = df[key].apply(lambda x:cat_map[x]) -------------------------------------------------------------------------------- /Exercise-3/Exercise-3.md: -------------------------------------------------------------------------------- 1 | # Exercises 3 2 | 3 | Remove all the sticky notes from your screen :-) and attempt the following. 4 | These are _guidelines_, feel free to err on the side of workflow and 5 | options that suits _you_ if you find them best. 6 | 7 | Keep in mind, if something is not intuitive, or not in the place you expected 8 | it, write it down (for example on the red sticky note), and give it to us at the 9 | break. 10 | 11 | 12 | ## Assign existing shortcut to new action 13 | 14 | In the notebook, the cells outputs can be collapsed or expanded, the name of the command to do so are `notebook:hide-cell-outputs` and `notebook:show-cell-outputs`. 15 | 16 | You can, for example bind the keys `-` (minus) and `+` (plus), to show/hide the cells. On QWERTY keyboards `+` will be availlable by using `Shift +`. 17 | 18 | Try to bind an existing keyboard shortcut to ` notebook:run-all-cells` 19 | 20 | Configure your editor to not automatically close brackets. -------------------------------------------------------------------------------- /Exercise-3/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "notebook:run-all":{ 3 | "keys":[ 4 | "-" 5 | ], 6 | "command":"notebook:hide-cell-outputs", 7 | "selector":".jp-Notebook:focus" 8 | }, 9 | "notebook:show-cell-outputs-2":{ 10 | "keys":[ 11 | "Shift =" 12 | ], 13 | "command":"notebook:show-cell-outputs", 14 | "selector":".jp-Notebook:focus" 15 | } 16 | } -------------------------------------------------------------------------------- /Exercise-4/Certificate.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "class Certificate:\n", 10 | " def __init__(self, data):\n", 11 | " self.data = data\n", 12 | " def _repr_mimebundle_(self, include, exclude, **kwargs):\n", 13 | " data = {\n", 14 | " 'application/vnd.jupyterlab.certificate': self.data,\n", 15 | " 'text/plain': 'Certificate for JupyterLab given to %s at %s'%(self.data['given'], self.data['event'])\n", 16 | " }\n", 17 | " if include:\n", 18 | " data = {k:v for (k,v) in data.items() if k in include}\n", 19 | " if exclude:\n", 20 | " data = {k:v for (k,v) in data.items() if k not in exclude}\n", 21 | " return data\n" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": null, 27 | "metadata": {}, 28 | "outputs": [], 29 | "source": [ 30 | "Certificate({'given': 'My Name', 'event': 'My Event'})" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [] 39 | } 40 | ], 41 | "metadata": { 42 | "kernelspec": { 43 | "display_name": "Python 3", 44 | "language": "python", 45 | "name": "python3" 46 | }, 47 | "language_info": { 48 | "codemirror_mode": { 49 | "name": "ipython", 50 | "version": 3 51 | }, 52 | "file_extension": ".py", 53 | "mimetype": "text/x-python", 54 | "name": "python", 55 | "nbconvert_exporter": "python", 56 | "pygments_lexer": "ipython3", 57 | "version": "3.6.5" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 2 62 | } 63 | -------------------------------------------------------------------------------- /Exercise-4/Exercise-4.md: -------------------------------------------------------------------------------- 1 | # Exercise 5: Extensions 2 | 3 | Remove all the sticky notes from your screen :-) and attempt the following. 4 | These are _guidelines_, feel free to ere on the side of workflow and 5 | options that suits _you_ if you find them best. 6 | 7 | Keep in mind, if something is not intuitive, or not in the place you expected it, write 8 | it down (for example on the red sticky note), and give it to us at the break. 9 | 10 | ## Creating a new blank extension 11 | 12 | We will be using the cookie-cutter project to generate a basic extension. This will generate a basic extension that reads data from a `.cert.json` JSON file and displays it nicely in JupyterLab. 13 | 14 | Open a terminal and run: 15 | 16 | ``` 17 | cookiecutter https://github.com/jupyterlab/mimerender-cookiecutter-ts 18 | ``` 19 | 20 | At the prompts, enter the following: 21 | ``` 22 | author_name []: 23 | author_email []: 24 | extension_name [myextension]: my_certificate_viewer 25 | viewer_name [My Viewer]: Certificate Viewer 26 | mimetype [application/vnd.my_organization.my_type]: application/vnd.jupyterlab.certificate 27 | mimetype_name [my_type]: certificate 28 | file_extension [.my_type]: .cert.json 29 | Select data_format: 30 | 1 - string 31 | 2 - json 32 | Choose from 1, 2 [1]: 2 33 | ``` 34 | 35 | ## Install the extension 36 | 37 | In the terminal, install your new extension 38 | 39 | ``` 40 | conda activate scipy18jlab 41 | jupyter labextension install ./my_certificate_viewer 42 | ``` 43 | 44 | You can check what extensions are installed with: 45 | 46 | ``` 47 | jupyter labextension list 48 | ``` 49 | 50 | Refresh your browser to pick up the new extension javascript. 51 | 52 | Test it out by opening the `scipy2018.cert.json` file. Right-clicking on the file should show your viewer in the 'Open with' menu, and double-clicking should open and display the file in a blank tab. 53 | 54 | Right-click on the `scipy2018.cert.json` file and open it in the editor to change the name to your name and the event to "Scipy 2018". Notice that the extension-rendered tab updates in real-time. 55 | 56 | ## Customize the display 57 | 58 | In order to develop our extension and have our changes appear automatically, we'll link the extension rather than just installing it. Run the following in your terminal that has the scipy18jlab environment active: 59 | 60 | ``` 61 | jupyter labextension link ./my_certificate_viewer 62 | ``` 63 | 64 | Now customize the display. Open the `my_certificate_viewer/src/index.ts` TypeScript file. Edit the `renderModel` function to replace the line that sets the `this.node.textContent` line with a bit fancier HTML: 65 | 66 | ```javascript 67 | this.node.innerHTML = ` 68 |
69 |
70 |
Certificate
71 |
${data.given}
72 |
For mastery of JupyterLab
73 |
${data.event}
74 |
75 |
76 |
77 |
78 |
79 | ` 80 | ``` 81 | 82 | Now rebuild JupyterLab to incorporate these changes by running the following in your terminal: 83 | 84 | ``` 85 | jupyter lab build 86 | ``` 87 | 88 | Open the `scipy2018.cert.json` file again to see that things look a bit better. 89 | 90 | ## Style the display 91 | 92 | Finally, let's style this certificate to look really nice. Add the following to 93 | the `my_certificate_viewer/style/index.css` file: 94 | 95 | ```css 96 | .mimerenderer-certificate .cert{ 97 | background-color: #07618B; 98 | width: 350px;height: 250px; 99 | margin-left: 35%;margin-top: 10%; 100 | position: relative; 101 | border-radius: 20px 20px 20px 20px; 102 | -webkit-box-shadow: 0px 5px 10px 0px; 103 | -moz-box-shadow: 0px 5px 10px 0px; 104 | box-shadow: 0px 5px 10px 0px; 105 | } 106 | 107 | .mimerenderer-certificate .paper{ 108 | position: absolute; 109 | width: 300px; 110 | height: 200px; 111 | background: #E0E0E0; 112 | left: 25px; 113 | top: 25px; 114 | border-radius: 5px 5px 5px 5px; 115 | } 116 | 117 | .mimerenderer-certificate .cert .medal { 118 | background: #C9992E; 119 | width: 20px; 120 | height: 20px; 121 | top: 30px; 122 | left: 30px; 123 | position: absolute; 124 | padding: 10px 10px 10px 10px; 125 | font-size: 2em; 126 | border-radius: 50%; 127 | z-index:30; 128 | } 129 | 130 | .mimerenderer-certificate .ribbon1 { 131 | width: 15px; 132 | height: 40px; 133 | background-color: #9bdbf6; 134 | position: absolute; 135 | top: 50px; 136 | left: 35px; 137 | z-index: 1; 138 | -webkit-transform: rotate(30deg); 139 | border-right: 1px solid white; 140 | } 141 | 142 | .mimerenderer-certificate .ribbon2 { 143 | width: 15px; 144 | height: 40px; 145 | background-color: #9bdbf6; 146 | position: absolute; 147 | top: 50px; 148 | left: 50px; 149 | z-index: 1; 150 | -webkit-transform: rotate(150deg); 151 | border-right: 1px solid white; 152 | } 153 | 154 | .mimerenderer-certificate .title { 155 | background:#E0E0E0; 156 | font-weight: bold; 157 | text-align: center; 158 | margin-top: 20px; 159 | height: 30px; 160 | z-index:999; 161 | } 162 | 163 | .mimerenderer-certificate .textX { 164 | z-index: 200; 165 | text-align: center; 166 | padding: 0px; 167 | text-align: center; 168 | margin-top: 20px; 169 | } 170 | 171 | .mimerenderer-certificate .text2 { 172 | background-color: #E0E0E0; 173 | z-index: 200; 174 | padding: 0px 200px; 175 | text-align: center; 176 | margin-left: 50px; 177 | } 178 | 179 | .mimerenderer-certificate .text3 { 180 | background-color: #B3B3B3; 181 | z-index: 200; 182 | padding: 0px 200px; 183 | text-align: center; 184 | margin-left: 50px; 185 | } 186 | ``` 187 | 188 | Rebuild JupyterLab and open the certificate again to see these changes. 189 | 190 | ## Install plugin 191 | 192 | Congratulations! You can now install the extension again to wrap things up. 193 | 194 | ``` 195 | jupyter labextension install ./my_certificate_viewer 196 | ``` 197 | 198 | ## Notebook 199 | 200 | A mimerender extension is used to render both files and rich outputs in 201 | notebooks. Open the `Certificate.ipynb` notebook and run it. 202 | 203 | ## More information 204 | 205 | For more information about writing extensions, especially more substantial ones, see the [XKCD extension tutorial](http://jupyterlab.readthedocs.io/en/stable/developer/xkcd_extension_tutorial.html) in the JupyterLab documentation. -------------------------------------------------------------------------------- /Exercise-4/scipy2018.cert.json: -------------------------------------------------------------------------------- 1 | {"given": "My Name", "event": "Event"} -------------------------------------------------------------------------------- /data/1024px-Hubble_Interacting_Galaxy_AM_0500-620_(2008-04-24).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jupyterlab/scipy2018-jupyterlab-tutorial/845ab4e4e464721e385c6a0d20c2679e1f0a69fc/data/1024px-Hubble_Interacting_Galaxy_AM_0500-620_(2008-04-24).jpg -------------------------------------------------------------------------------- /data/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) Jupyter Development Team. 2 | # Distributed under the terms of the Modified BSD License. 3 | FROM jupyter/minimal-notebook 4 | 5 | MAINTAINER Jupyter Project 6 | 7 | USER root 8 | 9 | # libav-tools for matplotlib anim 10 | RUN apt-get update && \ 11 | apt-get install -y --no-install-recommends libav-tools && \ 12 | apt-get clean && \ 13 | rm -rf /var/lib/apt/lists/* 14 | 15 | USER $NB_USER 16 | 17 | # Install Python 3 packages 18 | # Remove pyqt and qt pulled in for matplotlib since we're only ever going to 19 | # use notebook-friendly backends in these images 20 | RUN conda install --quiet --yes \ 21 | 'nomkl' \ 22 | 'ipywidgets=6.0*' \ 23 | 'pandas=0.19*' \ 24 | 'numexpr=2.6*' \ 25 | 'matplotlib=2.0*' \ 26 | 'scipy=0.19*' \ 27 | 'seaborn=0.7*' \ 28 | 'scikit-learn=0.18*' \ 29 | 'scikit-image=0.12*' \ 30 | 'sympy=1.0*' \ 31 | 'cython=0.25*' \ 32 | 'patsy=0.4*' \ 33 | 'statsmodels=0.8*' \ 34 | 'cloudpickle=0.2*' \ 35 | 'dill=0.2*' \ 36 | 'numba=0.31*' \ 37 | 'bokeh=0.12*' \ 38 | 'sqlalchemy=1.1*' \ 39 | 'hdf5=1.8.17' \ 40 | 'h5py=2.6*' \ 41 | 'vincent=0.4.*' \ 42 | 'beautifulsoup4=4.5.*' \ 43 | 'xlrd' && \ 44 | conda remove --quiet --yes --force qt pyqt && \ 45 | conda clean -tipsy 46 | 47 | # Activate ipywidgets extension in the environment that runs the notebook server 48 | RUN jupyter nbextension enable --py widgetsnbextension --sys-prefix 49 | 50 | # Install Python 2 packages 51 | # Remove pyqt and qt pulled in for matplotlib since we're only ever going to 52 | # use notebook-friendly backends in these images 53 | RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 \ 54 | 'nomkl' \ 55 | 'ipython=5.3*' \ 56 | 'ipywidgets=6.0*' \ 57 | 'pandas=0.19*' \ 58 | 'numexpr=2.6*' \ 59 | 'matplotlib=2.0*' \ 60 | 'scipy=0.19*' \ 61 | 'seaborn=0.7*' \ 62 | 'scikit-learn=0.18*' \ 63 | 'scikit-image=0.12*' \ 64 | 'sympy=1.0*' \ 65 | 'cython=0.25*' \ 66 | 'patsy=0.4*' \ 67 | 'statsmodels=0.8*' \ 68 | 'cloudpickle=0.2*' \ 69 | 'dill=0.2*' \ 70 | 'numba=0.31*' \ 71 | 'bokeh=0.12*' \ 72 | 'hdf5=1.8.17' \ 73 | 'h5py=2.6*' \ 74 | 'sqlalchemy=1.1*' \ 75 | 'pyzmq' \ 76 | 'vincent=0.4.*' \ 77 | 'beautifulsoup4=4.5.*' \ 78 | 'xlrd' && \ 79 | conda remove -n python2 --quiet --yes --force qt pyqt && \ 80 | conda clean -tipsy 81 | # Add shortcuts to distinguish pip for python2 and python3 envs 82 | RUN ln -s $CONDA_DIR/envs/python2/bin/pip $CONDA_DIR/bin/pip2 && \ 83 | ln -s $CONDA_DIR/bin/pip $CONDA_DIR/bin/pip3 84 | 85 | # Import matplotlib the first time to build the font cache. 86 | ENV XDG_CACHE_HOME /home/$NB_USER/.cache/ 87 | RUN MPLBACKEND=Agg $CONDA_DIR/envs/python2/bin/python -c "import matplotlib.pyplot" 88 | 89 | USER root 90 | 91 | # Install Python 2 kernel spec globally to avoid permission problems when NB_UID 92 | # switching at runtime and to allow the notebook server running out of the root 93 | # environment to find it. Also, activate the python2 environment upon kernel 94 | # launch. 95 | RUN pip install kernda --no-cache && \ 96 | $CONDA_DIR/envs/python2/bin/python -m ipykernel install && \ 97 | kernda -o -y /usr/local/share/jupyter/kernels/python2/kernel.json && \ 98 | pip uninstall kernda -y 99 | 100 | USER $NB_USER 101 | -------------------------------------------------------------------------------- /data/Museums_in_DC.geojson: -------------------------------------------------------------------------------- 1 | {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"OBJECTID":1,"ADDRESS":"716 MONROE STREET NE","NAME":"AMERICAN POETRY MUSEUM","ADDRESS_ID":309744,"LEGALNAME":"HERITAGE US","ALTNAME":"AMERICAN POETRY MUSEUM","WEBURL":" http://americanpoetrymuseum.org/"},"geometry":{"type":"Point","coordinates":[-76.995003703568,38.9328428790235]}},{"type":"Feature","properties":{"OBJECTID":2,"ADDRESS":"719 6TH STREET NW","NAME":"GERMAN-AMERICAN HERITAGE MUSEUM","ADDRESS_ID":238949,"LEGALNAME":"CORCORAN GALLERY OF ART","ALTNAME":" ","WEBURL":"http://gahmusa.org/"},"geometry":{"type":"Point","coordinates":[-77.01958878310639,38.89911061096782]}},{"type":"Feature","properties":{"OBJECTID":3,"ADDRESS":"1307 NEW HAMPSHIRE AVENUE NW","NAME":"HEURICH HOUSE FOUNDATION","ADDRESS_ID":241060,"LEGALNAME":"U.S. DEPARTMENT OF THE INTERIOR MUSEUM","ALTNAME":"HEURICH HOUSE FOUNDATION","WEBURL":"HTTP://HEURICHHOUSE.ORG"},"geometry":{"type":"Point","coordinates":[-77.04460619923155,38.908030206509885]}},{"type":"Feature","properties":{"OBJECTID":4,"ADDRESS":"950 INDEPENDENCE AVENUE SW","NAME":"NATIONAL MUSEUM OF AFRICAN ART","ADDRESS_ID":293262,"LEGALNAME":"BUILDING PRESERVATION FOUNDATION","ALTNAME":"NATIONAL MUSEUM OF AFRICAN ART","WEBURL":"HTTP://AFRICA.SI.EDU/"},"geometry":{"type":"Point","coordinates":[-77.02550917725944,38.88796214949963]}},{"type":"Feature","properties":{"OBJECTID":5,"ADDRESS":"740 JACKSON PLACE NW","NAME":"THE WHITE HOUSE ENDOWMENT TRUST","ADDRESS_ID":218748,"LEGALNAME":"NATIONAL BUILDING MUSEUM","ALTNAME":"THE WHITE HOUSE ENDOWMENT TRUST","WEBURL":"HTTP://WWW.WHITEHOUSEHISTORY.ORG"},"geometry":{"type":"Point","coordinates":[-77.03820629325264,38.899842529027275]}},{"type":"Feature","properties":{"OBJECTID":6,"ADDRESS":"921 PENNSYLVANIA AVENUE SE","NAME":"OLD NAVAL HOSPITAL FOUNDATION","ADDRESS_ID":82564,"LEGALNAME":"JEWISH WAR VETERANS NATIONAL MEMORIAL MUSEUM ARCHIVES AND LI","ALTNAME":"OLD NAVAL HOSPITAL FOUNDATION","WEBURL":"http://hillcenterdc.org/home/"},"geometry":{"type":"Point","coordinates":[-76.99314290714912,38.8829885933721]}},{"type":"Feature","properties":{"OBJECTID":7,"ADDRESS":"2201 C STREET NW","NAME":"DIPLOMATIC ROOMS FOUNDATION","ADDRESS_ID":243360,"LEGALNAME":"NATIONAL PLASTICS MUSEUM INC","ALTNAME":"DIPLOMATIC ROOMS FOUNDATION","WEBURL":"https://diplomaticrooms.state.gov/home.aspx"},"geometry":{"type":"Point","coordinates":[-77.04831079505838,38.894135140073566]}},{"type":"Feature","properties":{"OBJECTID":8,"ADDRESS":"4400 MASSACHUSETTS AVENUE NW","NAME":"AMERICAN UNIVERSITY MUSEUM AT THE KATZEN ARTS CENTER","ADDRESS_ID":223994,"LEGALNAME":"VERNISSAGE FOUNDATION","ALTNAME":"AMERICAN UNIVERSITY MUSEUM AT THE KATZEN ARTS CENTER","WEBURL":"HTTP://WWW.AMERICAN.EDU/CAS/MUSEUM/"},"geometry":{"type":"Point","coordinates":[-77.08841712551974,38.9390892139132]}},{"type":"Feature","properties":{"OBJECTID":9,"ADDRESS":"2320 S STREET NW","NAME":"TEXTILE MUSEUM","ADDRESS_ID":243164,"LEGALNAME":"SMITHSONIAN INSTITUTION, S. DILLON RIPLEY CENTER","ALTNAME":"TEXTILE MUSEUM","WEBURL":"HTTP://WWW.TEXTILEMUSEUM.ORG"},"geometry":{"type":"Point","coordinates":[-77.0464284034822,38.89880233850966]}},{"type":"Feature","properties":{"OBJECTID":10,"ADDRESS":"1145 17TH STREET NW","NAME":"NATIONAL GEOGRAPHIC MUSEUM","ADDRESS_ID":290192,"LEGALNAME":"CAPITOL HILL RESTORATION SOCIETY INC","ALTNAME":" ","WEBURL":"HTTP://WWW.NATIONALGEOGRAPHIC.COM"},"geometry":{"type":"Point","coordinates":[-77.03815544194862,38.90519711304962]}},{"type":"Feature","properties":{"OBJECTID":11,"ADDRESS":"3501 NEW YORK AVENUE NE","NAME":"THE NATIONAL BONSAI & PENJING MUSEUM","ADDRESS_ID":293238,"LEGALNAME":"NATIONAL BONSAI FOUNDATION","ALTNAME":" ","WEBURL":"https://www.bonsai-nbf.org/contact-us/"},"geometry":{"type":"Point","coordinates":[-76.96989266812075,38.91241055669072]}},{"type":"Feature","properties":{"OBJECTID":12,"ADDRESS":"2020 O STREET NW","NAME":"O STREET MUSEUM","ADDRESS_ID":243057,"LEGALNAME":"LEPIDOPTERISTS SOCIETY","ALTNAME":" ","WEBURL":"http://www.omuseum.org/museum/"},"geometry":{"type":"Point","coordinates":[-77.04592748104784,38.90839101941751]}},{"type":"Feature","properties":{"OBJECTID":13,"ADDRESS":"2101 CONSTITUTION AVENUE NW","NAME":"NATIONAL ACADEMY OF SCIENCES","ADDRESS_ID":242716,"LEGALNAME":"SMITHSONIAN INSTITUTION, NATURAL HISTORY MUSEUM","ALTNAME":"NATIONAL ACADEMY OF SCIENCES","WEBURL":"WWW.NATIONALACADEMIES.ORG/NAS/ARTS"},"geometry":{"type":"Point","coordinates":[-77.0476448925699,38.89296693766957]}},{"type":"Feature","properties":{"OBJECTID":14,"ADDRESS":"2401 FOXHALL ROAD NW","NAME":"KREEGER MUSEUM","ADDRESS_ID":271251,"LEGALNAME":"CONGRESSIONAL CEMETERY","ALTNAME":"KREEGER MUSEUM","WEBURL":"HTTP://WWW.KREEGERMUSEUM.ORG/"},"geometry":{"type":"Point","coordinates":[-77.08878098790044,38.92191197499568]}},{"type":"Feature","properties":{"OBJECTID":15,"ADDRESS":"1250 NEW YORK AVENUE NW","NAME":"THE NATIONAL MUSEUM OF WOMEN IN THE ART","ADDRESS_ID":279010,"LEGALNAME":"NATIONAL MUSEUM OF HEALTH AND MEDICINE","ALTNAME":"THE NATIONAL MUSEUM OF WOMEN IN THE ART","WEBURL":"HTTP://WWW.NMWA.ORG"},"geometry":{"type":"Point","coordinates":[-77.029163689541,38.90005647268176]}},{"type":"Feature","properties":{"OBJECTID":16,"ADDRESS":"900 JEFFERSON DRIVE SW","NAME":"ARTS AND INDUSTRIES BUILDING","ADDRESS_ID":293260,"LEGALNAME":"ANACOSTIA COMMUNITY MUSEUM","ALTNAME":" ","WEBURL":"http://www.si.edu/Museums/arts-and-industries-building"},"geometry":{"type":"Point","coordinates":[-77.02446647929001,38.888201004559114]}},{"type":"Feature","properties":{"OBJECTID":17,"ADDRESS":"736 SICARD STREET SE","NAME":"NATIONAL MUSEUM OF UNITED STATES NAVY","ADDRESS_ID":311896,"LEGALNAME":"BLACK SPORTS LEGENDS FOUNDATION","ALTNAME":"NATIONAL MUSEUM OF UNITED STATES NAVY","WEBURL":"http://www.history.navy.mil/museums/NationalMuseum/org8-1.htm"},"geometry":{"type":"Point","coordinates":[-76.99526950368147,38.87303084860059]}},{"type":"Feature","properties":{"OBJECTID":18,"ADDRESS":"500 17TH STREET NW","NAME":"CORCORAN GALLERY OF ART","ADDRESS_ID":279802,"LEGALNAME":"SMITHSONIAN INSTITUTION, NATIONAL ZOOLOGICAL PARK","ALTNAME":"CORCORAN GALLERY OF ART","WEBURL":"http://www.corcoran.org/"},"geometry":{"type":"Point","coordinates":[-77.0397427304576,38.895854463821884]}},{"type":"Feature","properties":{"OBJECTID":19,"ADDRESS":"2017 I STREET NW","NAME":"THE ARTS CLUB OF WASHINGTON","ADDRESS_ID":285527,"LEGALNAME":"SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF AFRICAN AMERICAN HISTORY AND CULTURE","ALTNAME":"THE ARTS CLUB OF WASHINGTON","WEBURL":"HTTP://WWW.ARTSCLUBOFWASHINGTON.ORG"},"geometry":{"type":"Point","coordinates":[-77.04573426864144,38.90157618582308]}},{"type":"Feature","properties":{"OBJECTID":20,"ADDRESS":"701 3RD STREET NW","NAME":"LILLIAN AND ALBERT SMALL JEWISH MUSEUM","ADDRESS_ID":293253,"LEGALNAME":"LILLIAN AND ALBERT SMALL JEWISH MUSEUM","ALTNAME":" ","WEBURL":"http://www.jhsgw.org/"},"geometry":{"type":"Point","coordinates":[-77.01493675564363,38.89857205791096]}},{"type":"Feature","properties":{"OBJECTID":21,"ADDRESS":"320 A STREET NE","NAME":"FREDERICK DOUGLASS MUSEUM","ADDRESS_ID":38979,"LEGALNAME":"COSMOS CLUB HISTORIC PRESERVATION FOUNDATION","ALTNAME":" ","WEBURL":"http://www3.nahc.org/fd/"},"geometry":{"type":"Point","coordinates":[-77.00110470253333,38.891131915241964]}},{"type":"Feature","properties":{"OBJECTID":22,"ADDRESS":"1334 G STREET NW","NAME":"ARMENIAN GENOCIDE MUSEUM AND MEMORIAL","ADDRESS_ID":240658,"LEGALNAME":"GERMAN-AMERICAN HERITAGE MUSEUM","ALTNAME":"ARMENIAN GENOCIDE MUSEUM AND MEMORIAL","WEBURL":"http://www.armeniangenocidemuseum.org/"},"geometry":{"type":"Point","coordinates":[-77.03108432435003,38.89804891426683]}},{"type":"Feature","properties":{"OBJECTID":23,"ADDRESS":"1799 NEW YORK AVENUE NW","NAME":"OCTAGON MUSEUM","ADDRESS_ID":218490,"LEGALNAME":"AMERICAN RED CROSS MUSEUM","ALTNAME":" ","WEBURL":"HTTP://WWW.THEOCTAGON.ORG"},"geometry":{"type":"Point","coordinates":[-77.04141820048949,38.89635375607101]}},{"type":"Feature","properties":{"OBJECTID":24,"ADDRESS":"1901 FORT PLACE SE","NAME":"ANACOSTIA COMMUNITY MUSEUM","ADDRESS_ID":286524,"LEGALNAME":"FAUNA & FLORA INTERNATIONAL INC","ALTNAME":"ANACOSTIA COMMUNITY MUSEUM","WEBURL":"HTTP://ANACOSTIA.SI.EDU"},"geometry":{"type":"Point","coordinates":[-76.97678467186984,38.8565826636904]}},{"type":"Feature","properties":{"OBJECTID":25,"ADDRESS":"2312 CALIFORNIA STREET NW","NAME":"NATIONAL MUSEUM OF THE JEWISH PEOPLE","ADDRESS_ID":234961,"LEGALNAME":"GREENSEED COMMUNITY GARDEN LAND TRUST","ALTNAME":" ","WEBURL":"http://www.nsideas.com/archive/nmjh/"},"geometry":{"type":"Point","coordinates":[-77.05118108814123,38.91537084189858]}},{"type":"Feature","properties":{"OBJECTID":26,"ADDRESS":"430 17TH STREET NW","NAME":"AMERICAN RED CROSS MUSEUM","ADDRESS_ID":300987,"LEGALNAME":"DOUBLE M MANAGEMENT","ALTNAME":"AMERICAN RED CROSS MUSEUM","WEBURL":"http://www.redcross.org/"},"geometry":{"type":"Point","coordinates":[-77.04020705622152,38.89482654014118]}},{"type":"Feature","properties":{"OBJECTID":27,"ADDRESS":"1600 21ST STREET NW","NAME":"THE PHILLIPS COLLECTION","ADDRESS_ID":243333,"LEGALNAME":"SMITHSONIAN INSTITUTION, RENWICK GALLERY","ALTNAME":"THE PHILLIPS COLLECTION","WEBURL":"HTTP://WWW.PHILLIPSCOLLECTION.ORG"},"geometry":{"type":"Point","coordinates":[-77.04685454590388,38.91150979086159]}},{"type":"Feature","properties":{"OBJECTID":28,"ADDRESS":"800 F STREET NW","NAME":"INTERNATIONAL SPY MUSEUM","ADDRESS_ID":238378,"LEGALNAME":"CONFEDERATE MEMORIAL HALL ASSOCIATION","ALTNAME":"INTERNATIONAL SPY MUSEUM","WEBURL":"HTTP://WWW.SPYMUSEUM.ORG/"},"geometry":{"type":"Point","coordinates":[-77.02328618491306,38.896986480912865]}},{"type":"Feature","properties":{"OBJECTID":29,"ADDRESS":"100 RAOUL WALLENBERG PLACE SW","NAME":"UNITED STATES HOLOCAUST MEMORIAL MUSEUM","ADDRESS_ID":293186,"LEGALNAME":"NATIONAL MUSIC CENTER AND MUSEUM FOUNDATION","ALTNAME":"UNITED STATES HOLOCAUST MEMORIAL MUSEUM","WEBURL":"HTTP://WWW.USHMM.ORG"},"geometry":{"type":"Point","coordinates":[-77.03268853739414,38.88668873773371]}},{"type":"Feature","properties":{"OBJECTID":30,"ADDRESS":"801 K STREET NW","NAME":"HISTORICAL SOCIETY OF WASHINGTON DC","ADDRESS_ID":238956,"LEGALNAME":"Historical Society of Washington, D.C","ALTNAME":" ","WEBURL":"http://www.dchistory.org/"},"geometry":{"type":"Point","coordinates":[-77.02294505078932,38.90262956584554]}},{"type":"Feature","properties":{"OBJECTID":31,"ADDRESS":"1849 C STREET NW","NAME":"INTERIOR MUSEUM","ADDRESS_ID":293214,"LEGALNAME":"VICE PRESIDENTS RESIDENCE FOUNDATION","ALTNAME":"INTERIOR MUSEUM","WEBURL":"HTTP://WWW.DOI.GOV/INTERIORMUSEUM"},"geometry":{"type":"Point","coordinates":[-77.04260256434321,38.89445283458921]}},{"type":"Feature","properties":{"OBJECTID":32,"ADDRESS":"4155 LINNEAN AVENUE NW","NAME":"HILLWOOD MUSEUM & GARDENS","ADDRESS_ID":284839,"LEGALNAME":"SMITHSONIAN INSTITUTION, NATIONAL GALLERY OF ART","ALTNAME":"HILLWOOD MUSEUM & GARDENS","WEBURL":"WWW.HILLWOODMUSEUM.ORG"},"geometry":{"type":"Point","coordinates":[-77.0526196505072,38.94364171194315]}},{"type":"Feature","properties":{"OBJECTID":33,"ADDRESS":"1318 VERMONT AVENUE NW","NAME":"BETHUNE MEMORIAL MUSEUM","ADDRESS_ID":225385,"LEGALNAME":"NATIONAL MUSEUM OF WOMEN IN THE ARTS INC","ALTNAME":" ","WEBURL":"http://www.nps.gov/mamc/index.htm"},"geometry":{"type":"Point","coordinates":[-77.03086564182146,38.90817580546652]}},{"type":"Feature","properties":{"OBJECTID":34,"ADDRESS":"1500 MASSACHUSETTS AVENUE NW","NAME":"NATIONAL MUSEUM OF CATHOLIC ART AND LIBRARY","ADDRESS_ID":242324,"LEGALNAME":"KREEGER MUSEUM","ALTNAME":" ","WEBURL":"http://nmcal.org/nmcah_exhibition_in_washington.html"},"geometry":{"type":"Point","coordinates":[-77.03551120800971,38.90651019329394]}},{"type":"Feature","properties":{"OBJECTID":35,"ADDRESS":"1 MASSACHUSETTS AVENUE NW","NAME":"NATIONAL GUARD MEMORIAL MUSEUM","ADDRESS_ID":238009,"LEGALNAME":"CARL SCHMITT FOUNDATION INC","ALTNAME":" ","WEBURL":"HTTP://WWW.NGEF.ORG"},"geometry":{"type":"Point","coordinates":[-77.00956143652462,38.89812580681995]}},{"type":"Feature","properties":{"OBJECTID":36,"ADDRESS":"1811 R STREET NW","NAME":"NATIONAL MUSEUM OF AMERICAN JEWISH MILITARY HISTORY","ADDRESS_ID":243292,"LEGALNAME":"CITY TAVERN PRESERVATION FOUNDATION","ALTNAME":"JEWISH WAR VETERANS NATIONAL MEMORIAL MUSEUM ARCHIVES AND LIBRARY","WEBURL":"http://www.nmajmh.org/"},"geometry":{"type":"Point","coordinates":[-77.04211577477285,38.91282059721026]}},{"type":"Feature","properties":{"OBJECTID":37,"ADDRESS":"3900 HAREWOOD ROAD NE","NAME":"POPE JOHN PAUL II CULTURAL CENTER","ADDRESS_ID":288031,"LEGALNAME":"AMERICAN POETRY MUSEUM","ALTNAME":" ","WEBURL":"HTTP://WWW.JP2CC.ORG"},"geometry":{"type":"Point","coordinates":[-77.00466710351098,38.93776654366721]}},{"type":"Feature","properties":{"OBJECTID":38,"ADDRESS":"700 PENNSYLVANIA AVENUE NW","NAME":"NATIONAL ARCHIVES MUSEUM","ADDRESS_ID":293251,"LEGALNAME":"PHILLIPS COLLECTION","ALTNAME":"NATIONAL ARCHIVES MUSEUM","WEBURL":"https://www.archives.gov/dc-metro/washington/"},"geometry":{"type":"Point","coordinates":[-77.0228592459719,38.89285370583677]}},{"type":"Feature","properties":{"OBJECTID":39,"ADDRESS":"201 18TH STREET NW","NAME":"ART MUSEUM OF THE AMERICAS","ADDRESS_ID":294191,"LEGALNAME":"Art Museum of the Americas","ALTNAME":" ","WEBURL":"http://www.museum.oas.org/"},"geometry":{"type":"Point","coordinates":[-77.04147388756545,38.892799844291474]}},{"type":"Feature","properties":{"OBJECTID":40,"ADDRESS":"9 HILLYER COURT NW","NAME":"INTERNATIONAL ARTS & ARTISTS","ADDRESS_ID":279975,"LEGALNAME":"THE INTERNATIONAL SPY MUSEUM","ALTNAME":"INTERNATIONAL ARTS & ARTISTS","WEBURL":"WWW.ARTSANDARTISTS.ORG"},"geometry":{"type":"Point","coordinates":[-77.04730884101534,38.91222144699389]}},{"type":"Feature","properties":{"OBJECTID":41,"ADDRESS":"2 MASSACHUSETTS AVENUE NE","NAME":"NATIONAL POSTAL MUSEUM","ADDRESS_ID":293217,"LEGALNAME":"BEAD SOCIETY OF GREATER WASHINGTON","ALTNAME":"NATIONAL POSTAL MUSEUM","WEBURL":"HTTP://POSTALMUSEUM.SI.EDU"},"geometry":{"type":"Point","coordinates":[-77.00819124512859,38.8981463599396]}},{"type":"Feature","properties":{"OBJECTID":42,"ADDRESS":"1519 MONROE STREET NW","NAME":"POWHATAN MUSEUM","ADDRESS_ID":234557,"LEGALNAME":"AMERICAN UNIVERSITY MUSEUM","ALTNAME":" ","WEBURL":"http://www.powhatanmuseum.com/"},"geometry":{"type":"Point","coordinates":[-77.03550660261739,38.93243814726252]}},{"type":"Feature","properties":{"OBJECTID":43,"ADDRESS":"144 CONSTITUTION AVENUE NE","NAME":"SEWALL-BELMONT HOUSE AND MUSEUM","ADDRESS_ID":286201,"LEGALNAME":"AMERICAN MUSEUM OF PEACE INC","ALTNAME":" ","WEBURL":"HTTP://WWW.SEWALLBELMONT.ORG"},"geometry":{"type":"Point","coordinates":[-77.00375845550963,38.89219466787653]}},{"type":"Feature","properties":{"OBJECTID":44,"ADDRESS":"802 MASSACHUSETTS AVENUE NE","NAME":"SHOOK MUSEUM FOUNDATION","ADDRESS_ID":79669,"LEGALNAME":"GREENPEACE FUND","ALTNAME":" ","WEBURL":"SHOOKMUSEUM.ORG"},"geometry":{"type":"Point","coordinates":[-76.9944246526475,38.891834530779185]}},{"type":"Feature","properties":{"OBJECTID":45,"ADDRESS":"1400 CONSTITUTION AVENUE NW","NAME":"SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF NATURAL HISTORY","ADDRESS_ID":310702,"LEGALNAME":"B'NAI B'RITH KLUTZNICK MUSEUM","ALTNAME":"SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF NATURAL HISTORY","WEBURL":"http://www.mnh.si.edu/"},"geometry":{"type":"Point","coordinates":[-77.02591603234607,38.89121850995097]}},{"type":"Feature","properties":{"OBJECTID":46,"ADDRESS":"500 HOWARD PLACE NW","NAME":"HOWARD UNIVERSITY MUSEUM","ADDRESS_ID":243398,"LEGALNAME":"COLLECTONS STRIES AMRCN MSLIMS","ALTNAME":" ","WEBURL":"http://www.coas.howard.edu/msrc/museum.html"},"geometry":{"type":"Point","coordinates":[-77.0196991986925,38.922360224748935]}},{"type":"Feature","properties":{"OBJECTID":47,"ADDRESS":"8TH STREET NW AND F ST NW","NAME":"NATIONAL PORTRAIT GALLERY","ADDRESS_ID":294248,"LEGALNAME":"BOHEMIA ARTS","ALTNAME":"NATIONAL PORTRAIT GALLERY","WEBURL":"HTTP://WWW.NPG.SI.EDU"},"geometry":{"type":"Point","coordinates":[-77.02295571583119,38.89815890118559]}},{"type":"Feature","properties":{"OBJECTID":48,"ADDRESS":"14TH STREET NW AND CONSTITUTION AVENUE NW","NAME":"NATIONAL MUSEUM OF AFRICAN AMERICAN HISTORY AND CULTURE","ADDRESS_ID":903110,"LEGALNAME":"AMERICANS FOR BATTLEFIELD PRESERVATION","ALTNAME":"NATIONAL MUSEUM OF AFRICAN AMERICAN HISTORY AND CULTURE","WEBURL":"HTTP://WWW.NMAAHC.SI.EDU/"},"geometry":{"type":"Point","coordinates":[-77.03271597832732,38.89119983415094]}},{"type":"Feature","properties":{"OBJECTID":49,"ADDRESS":"4TH STREET SW AND INDEPENDENCE AVENUE SW","NAME":"NATIONAL MUSEUM OF AMERICAN INDIAN","ADDRESS_ID":294429,"LEGALNAME":"BLAIR HOUSE RESTORATION FUND","ALTNAME":" ","WEBURL":"WWW.NMAI.SI.EDU"},"geometry":{"type":"Point","coordinates":[-77.01672595283219,38.88826561652]}},{"type":"Feature","properties":{"OBJECTID":50,"ADDRESS":"6TH STREET SW AND INDEPENDENCE AVENUE SW","NAME":"NATIONAL AIR AND SPACE MUSEUM","ADDRESS_ID":301565,"LEGALNAME":"BETHUNE MEMORIAL MUSEUM","ALTNAME":"NATIONAL AIR AND SPACE MUSEUM","WEBURL":"HTTP://WWW.NASM.SI.EDU/"},"geometry":{"type":"Point","coordinates":[-77.01979999825605,38.888161175521944]}},{"type":"Feature","properties":{"OBJECTID":51,"ADDRESS":"7THB STREET AND INDEPENDENCE AVENUE SW","NAME":"HIRSHHORN MUSEUM AND SCULPTURE GARDEN","ADDRESS_ID":294428,"LEGALNAME":"D.C. OFFICE OF PUBLIC RECORDS AND ARCHIVES","ALTNAME":"HIRSHHORN MUSEUM AND SCULPTURE GARDEN","WEBURL":"HTTP://HIRSHHORN.SI.EDU/"},"geometry":{"type":"Point","coordinates":[-77.02294902891254,38.88843565656003]}},{"type":"Feature","properties":{"OBJECTID":52,"ADDRESS":"MADISON DRIVE NW AND 12TH STREET NW","NAME":"SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF AMERICAN HISTORY","ADDRESS_ID":293200,"LEGALNAME":null,"ALTNAME":"SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF AMERICAN HISTORY","WEBURL":"HTTP://AMERICANHISTORY.SI.EDU"},"geometry":{"type":"Point","coordinates":[-77.03005156534492,38.89123181993075]}},{"type":"Feature","properties":{"OBJECTID":53,"ADDRESS":"4TH STREET NW AND MADISON DRIVE NW","NAME":"NATIONAL GALLERY OF ART - EAST BUILDING","ADDRESS_ID":293209,"LEGALNAME":null,"ALTNAME":null,"WEBURL":"http://www.nga.gov/content/ngaweb/visit/maps-and-information/east-building.html"},"geometry":{"type":"Point","coordinates":[-77.01668919569053,38.89125721273486]}},{"type":"Feature","properties":{"OBJECTID":54,"ADDRESS":"4TH STREET NW AND MADISON DRIVE NW","NAME":"NATIONAL GALLERY OF ART - WEST BUILDING","ADDRESS_ID":293249,"LEGALNAME":null,"ALTNAME":null,"WEBURL":"http://www.nga.gov/content/ngaweb/visit/maps-and-information/west-building.html"},"geometry":{"type":"Point","coordinates":[-77.01989150273015,38.891313914429645]}},{"type":"Feature","properties":{"OBJECTID":55,"ADDRESS":"1000 JEFFERSON DRIVE SW","NAME":"SMITHSONIAN INSTITUTION - CASTLE","ADDRESS_ID":293187,"LEGALNAME":null,"ALTNAME":null,"WEBURL":"http://www.si.edu/Museums/smithsonian-institution-building"},"geometry":{"type":"Point","coordinates":[-77.02597189316775,38.88879577572046]}},{"type":"Feature","properties":{"OBJECTID":56,"ADDRESS":"1050 INDEPENDENCE AVENUE SW","NAME":"SACKLER GALLERY","ADDRESS_ID":293191,"LEGALNAME":"ARTHUR M. SACKLER GALLERY","ALTNAME":null,"WEBURL":"http://www.asia.si.edu/"},"geometry":{"type":"Point","coordinates":[-77.02645343758842,38.88796502751886]}},{"type":"Feature","properties":{"OBJECTID":57,"ADDRESS":"JEFFERSON DRIVE SW AND 12TH STREET SW","NAME":"FREER GALLERY","ADDRESS_ID":294417,"LEGALNAME":"FREER GALLERY OF ART","ALTNAME":null,"WEBURL":"http://www.asia.si.edu/"},"geometry":{"type":"Point","coordinates":[-77.02736845485786,38.8882746680144]}}]} -------------------------------------------------------------------------------- /data/README.md: -------------------------------------------------------------------------------- 1 | # Data used in demonstrations 2 | 3 | 4 | ## `zika_assembled_genomes.fasta` 5 | 6 | **Description** 7 | 8 | * [Fasta](https://en.wikipedia.org/wiki/FASTA_format) file. 9 | * 110 Zika virus genomes 10 | * Assembled from clinical and mosquito samples across 10 countries and territories. 11 | * Followed by phylogenetic analysis to infer evolution of virus through Americas. 12 | 13 | For more information, see the paper [here](https://www.nature.com/nature/journal/v546/n7658/full/nature22402.html). 14 | 15 | 16 | **Citation** 17 | 18 | ``` 19 | @article{metsky2017zika, 20 | title={Zika virus evolution and spread in the Americas}, 21 | author={Metsky, Hayden C and Matranga, Christian B and Wohl, Shirlee and Schaffner, Stephen F and Freije, Catherine A and Winnicki, Sarah M and West, Kendra and Qu, James and Baniecki, Mary Lynn and Gladden-Young, Adrianne and others}, 22 | journal={Nature}, 23 | year={2017}, 24 | publisher={Nature Research} 25 | } 26 | ``` 27 | -------------------------------------------------------------------------------- /data/bar.vl.json: -------------------------------------------------------------------------------- 1 | {"data":{"values":[{"a":"A","b":28},{"a":"B","b":55},{"a":"C","b":43},{"a":"D","b":91},{"a":"E","b":81},{"a":"F","b":53},{"a":"G","b":19},{"a":"H","b":87},{"a":"I","b":52}]},"description":"A simple bar chart with embedded data.","encoding":{"x":{"field":"a","type":"ordinal"},"y":{"field":"b","type":"quantitative"}},"mark":"bar"} -------------------------------------------------------------------------------- /data/iris.csv: -------------------------------------------------------------------------------- 1 | sepal_length,sepal_width,petal_length,petal_width,species 2 | 5.1,3.5,1.4,0.2,setosa 3 | 4.9,3,1.4,0.2,setosa 4 | 4.7,3.2,1.3,0.2,setosa 5 | 4.6,3.1,1.5,0.2,setosa 6 | 5,3.6,1.4,0.2,setosa 7 | 5.4,3.9,1.7,0.4,setosa 8 | 4.6,3.4,1.4,0.3,setosa 9 | 5,3.4,1.5,0.2,setosa 10 | 4.4,2.9,1.4,0.2,setosa 11 | 4.9,3.1,1.5,0.1,setosa 12 | 5.4,3.7,1.5,0.2,setosa 13 | 4.8,3.4,1.6,0.2,setosa 14 | 4.8,3,1.4,0.1,setosa 15 | 4.3,3,1.1,0.1,setosa 16 | 5.8,4,1.2,0.2,setosa 17 | 5.7,4.4,1.5,0.4,setosa 18 | 5.4,3.9,1.3,0.4,setosa 19 | 5.1,3.5,1.4,0.3,setosa 20 | 5.7,3.8,1.7,0.3,setosa 21 | 5.1,3.8,1.5,0.3,setosa 22 | 5.4,3.4,1.7,0.2,setosa 23 | 5.1,3.7,1.5,0.4,setosa 24 | 4.6,3.6,1,0.2,setosa 25 | 5.1,3.3,1.7,0.5,setosa 26 | 4.8,3.4,1.9,0.2,setosa 27 | 5,3,1.6,0.2,setosa 28 | 5,3.4,1.6,0.4,setosa 29 | 5.2,3.5,1.5,0.2,setosa 30 | 5.2,3.4,1.4,0.2,setosa 31 | 4.7,3.2,1.6,0.2,setosa 32 | 4.8,3.1,1.6,0.2,setosa 33 | 5.4,3.4,1.5,0.4,setosa 34 | 5.2,4.1,1.5,0.1,setosa 35 | 5.5,4.2,1.4,0.2,setosa 36 | 4.9,3.1,1.5,0.1,setosa 37 | 5,3.2,1.2,0.2,setosa 38 | 5.5,3.5,1.3,0.2,setosa 39 | 4.9,3.1,1.5,0.1,setosa 40 | 4.4,3,1.3,0.2,setosa 41 | 5.1,3.4,1.5,0.2,setosa 42 | 5,3.5,1.3,0.3,setosa 43 | 4.5,2.3,1.3,0.3,setosa 44 | 4.4,3.2,1.3,0.2,setosa 45 | 5,3.5,1.6,0.6,setosa 46 | 5.1,3.8,1.9,0.4,setosa 47 | 4.8,3,1.4,0.3,setosa 48 | 5.1,3.8,1.6,0.2,setosa 49 | 4.6,3.2,1.4,0.2,setosa 50 | 5.3,3.7,1.5,0.2,setosa 51 | 5,3.3,1.4,0.2,setosa 52 | 7,3.2,4.7,1.4,versicolor 53 | 6.4,3.2,4.5,1.5,versicolor 54 | 6.9,3.1,4.9,1.5,versicolor 55 | 5.5,2.3,4,1.3,versicolor 56 | 6.5,2.8,4.6,1.5,versicolor 57 | 5.7,2.8,4.5,1.3,versicolor 58 | 6.3,3.3,4.7,1.6,versicolor 59 | 4.9,2.4,3.3,1,versicolor 60 | 6.6,2.9,4.6,1.3,versicolor 61 | 5.2,2.7,3.9,1.4,versicolor 62 | 5,2,3.5,1,versicolor 63 | 5.9,3,4.2,1.5,versicolor 64 | 6,2.2,4,1,versicolor 65 | 6.1,2.9,4.7,1.4,versicolor 66 | 5.6,2.9,3.6,1.3,versicolor 67 | 6.7,3.1,4.4,1.4,versicolor 68 | 5.6,3,4.5,1.5,versicolor 69 | 5.8,2.7,4.1,1,versicolor 70 | 6.2,2.2,4.5,1.5,versicolor 71 | 5.6,2.5,3.9,1.1,versicolor 72 | 5.9,3.2,4.8,1.8,versicolor 73 | 6.1,2.8,4,1.3,versicolor 74 | 6.3,2.5,4.9,1.5,versicolor 75 | 6.1,2.8,4.7,1.2,versicolor 76 | 6.4,2.9,4.3,1.3,versicolor 77 | 6.6,3,4.4,1.4,versicolor 78 | 6.8,2.8,4.8,1.4,versicolor 79 | 6.7,3,5,1.7,versicolor 80 | 6,2.9,4.5,1.5,versicolor 81 | 5.7,2.6,3.5,1,versicolor 82 | 5.5,2.4,3.8,1.1,versicolor 83 | 5.5,2.4,3.7,1,versicolor 84 | 5.8,2.7,3.9,1.2,versicolor 85 | 6,2.7,5.1,1.6,versicolor 86 | 5.4,3,4.5,1.5,versicolor 87 | 6,3.4,4.5,1.6,versicolor 88 | 6.7,3.1,4.7,1.5,versicolor 89 | 6.3,2.3,4.4,1.3,versicolor 90 | 5.6,3,4.1,1.3,versicolor 91 | 5.5,2.5,4,1.3,versicolor 92 | 5.5,2.6,4.4,1.2,versicolor 93 | 6.1,3,4.6,1.4,versicolor 94 | 5.8,2.6,4,1.2,versicolor 95 | 5,2.3,3.3,1,versicolor 96 | 5.6,2.7,4.2,1.3,versicolor 97 | 5.7,3,4.2,1.2,versicolor 98 | 5.7,2.9,4.2,1.3,versicolor 99 | 6.2,2.9,4.3,1.3,versicolor 100 | 5.1,2.5,3,1.1,versicolor 101 | 5.7,2.8,4.1,1.3,versicolor 102 | 6.3,3.3,6,2.5,virginica 103 | 5.8,2.7,5.1,1.9,virginica 104 | 7.1,3,5.9,2.1,virginica 105 | 6.3,2.9,5.6,1.8,virginica 106 | 6.5,3,5.8,2.2,virginica 107 | 7.6,3,6.6,2.1,virginica 108 | 4.9,2.5,4.5,1.7,virginica 109 | 7.3,2.9,6.3,1.8,virginica 110 | 6.7,2.5,5.8,1.8,virginica 111 | 7.2,3.6,6.1,2.5,virginica 112 | 6.5,3.2,5.1,2,virginica 113 | 6.4,2.7,5.3,1.9,virginica 114 | 6.8,3,5.5,2.1,virginica 115 | 5.7,2.5,5,2,virginica 116 | 5.8,2.8,5.1,2.4,virginica 117 | 6.4,3.2,5.3,2.3,virginica 118 | 6.5,3,5.5,1.8,virginica 119 | 7.7,3.8,6.7,2.2,virginica 120 | 7.7,2.6,6.9,2.3,virginica 121 | 6,2.2,5,1.5,virginica 122 | 6.9,3.2,5.7,2.3,virginica 123 | 5.6,2.8,4.9,2,virginica 124 | 7.7,2.8,6.7,2,virginica 125 | 6.3,2.7,4.9,1.8,virginica 126 | 6.7,3.3,5.7,2.1,virginica 127 | 7.2,3.2,6,1.8,virginica 128 | 6.2,2.8,4.8,1.8,virginica 129 | 6.1,3,4.9,1.8,virginica 130 | 6.4,2.8,5.6,2.1,virginica 131 | 7.2,3,5.8,1.6,virginica 132 | 7.4,2.8,6.1,1.9,virginica 133 | 7.9,3.8,6.4,2,virginica 134 | 6.4,2.8,5.6,2.2,virginica 135 | 6.3,2.8,5.1,1.5,virginica 136 | 6.1,2.6,5.6,1.4,virginica 137 | 7.7,3,6.1,2.3,virginica 138 | 6.3,3.4,5.6,2.4,virginica 139 | 6.4,3.1,5.5,1.8,virginica 140 | 6,3,4.8,1.8,virginica 141 | 6.9,3.1,5.4,2.1,virginica 142 | 6.7,3.1,5.6,2.4,virginica 143 | 6.9,3.1,5.1,2.3,virginica 144 | 5.8,2.7,5.1,1.9,virginica 145 | 6.8,3.2,5.9,2.3,virginica 146 | 6.7,3.3,5.7,2.5,virginica 147 | 6.7,3,5.2,2.3,virginica 148 | 6.3,2.5,5,1.9,virginica 149 | 6.5,3,5.2,2,virginica 150 | 6.2,3.4,5.4,2.3,virginica 151 | 5.9,3,5.1,1.8,virginica 152 | -------------------------------------------------------------------------------- /data/japan_meterological_agency_201707211555.json: -------------------------------------------------------------------------------- 1 | {"type": "FeatureCollection", "features": [{"geometry": {"type": "Point", "coordinates": [130.119, 34.967]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.446, 42.368]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.115, 34.838]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.064, 34.727]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.829, 42.568]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.777, 42.508]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.677, 42.437]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [129.987, 35.013]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.103, 35.144]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [129.958, 35.36]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.126, 34.962]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.202, 42.152]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.539, 42.373]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.589, 42.441]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.093, 34.883]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.504, 42.38]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.143, 34.834]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.064, 34.873]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.605, 42.478]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.481, 42.39]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.753, 42.543]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.117, 35.206]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.128, 34.917]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.148, 34.921]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.418, 42.319]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [129.993, 34.949]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.022, 34.952]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.637, 42.499]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.203, 42.15]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.375, 42.344]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.749, 42.615]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [129.976, 35.214]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.031, 34.87]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.524, 42.402]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.15, 34.865]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [124.928, 22.035]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [124.829, 22.113]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [124.877, 22.303]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.87, 42.587]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.868, 42.579]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [129.981, 34.943]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.052, 34.91]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.036, 34.957]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.135, 34.891]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.0, 34.962]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.618, 42.414]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.088, 34.896]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.626, 42.492]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.649, 42.417]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.533, 42.304]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [130.036, 34.814]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.041, 34.966]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [130.149, 34.853]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.586, 42.234]}, "type": "Feature", "properties": {"type": 1}}, {"geometry": {"type": "Point", "coordinates": [140.571, 42.239]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [129.947, 34.931]}, "type": "Feature", "properties": {"type": 0}}, {"geometry": {"type": "Point", "coordinates": [140.695, 42.514]}, "type": "Feature", "properties": {"type": 1}}]} -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: scipy18jlab 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - python=3.6 6 | - pip 7 | - cookiecutter=1.6 8 | - notebook=5.5 9 | - pandas=0.23 10 | - nodejs=9.11 11 | - jupyterlab 12 | - bqplot 13 | - pythreejs 14 | -------------------------------------------------------------------------------- /notebooks/Data.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Open a CSV file using Pandas" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [ 15 | { 16 | "data": { 17 | "text/html": [ 18 | "
\n", 19 | "\n", 32 | "\n", 33 | " \n", 34 | " \n", 35 | " \n", 36 | " \n", 37 | " \n", 38 | " \n", 39 | " \n", 40 | " \n", 41 | " \n", 42 | " \n", 43 | " \n", 44 | " \n", 45 | " \n", 46 | " \n", 47 | " \n", 48 | " \n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | " \n", 98 | " \n", 99 | " \n", 100 | " \n", 101 | " \n", 102 | " \n", 103 | " \n", 104 | " \n", 105 | " \n", 106 | " \n", 107 | " \n", 108 | " \n", 109 | " \n", 110 | " \n", 111 | " \n", 112 | " \n", 113 | " \n", 114 | " \n", 115 | " \n", 116 | " \n", 117 | " \n", 118 | " \n", 119 | " \n", 120 | " \n", 121 | " \n", 122 | " \n", 123 | " \n", 124 | " \n", 125 | " \n", 126 | " \n", 127 | " \n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | "
sepal_lengthsepal_widthpetal_lengthpetal_widthspecies
05.13.51.40.2se
14.93.01.40.2setosa
24.73.21.30.2setosa
34.63.11.50.2setosa
45.03.61.40.2setosa
55.43.91.70.4setosa
64.63.41.40.3setosa
75.03.41.50.2setosa
84.42.91.40.2setosa
94.93.11.50.1setosa
105.43.71.50.2setosa
114.83.41.60.2setosa
124.83.01.40.1setosa
134.33.01.10.1setosa
145.84.01.20.2setosa
155.74.41.50.4setosa
165.43.91.30.4setosa
175.13.51.40.3setosa
185.73.81.70.3setosa
195.13.81.50.3setosa
\n", 206 | "
" 207 | ], 208 | "text/plain": [ 209 | " sepal_length sepal_width petal_length petal_width species\n", 210 | "0 5.1 3.5 1.4 0.2 se\n", 211 | "1 4.9 3.0 1.4 0.2 setosa\n", 212 | "2 4.7 3.2 1.3 0.2 setosa\n", 213 | "3 4.6 3.1 1.5 0.2 setosa\n", 214 | "4 5.0 3.6 1.4 0.2 setosa\n", 215 | "5 5.4 3.9 1.7 0.4 setosa\n", 216 | "6 4.6 3.4 1.4 0.3 setosa\n", 217 | "7 5.0 3.4 1.5 0.2 setosa\n", 218 | "8 4.4 2.9 1.4 0.2 setosa\n", 219 | "9 4.9 3.1 1.5 0.1 setosa\n", 220 | "10 5.4 3.7 1.5 0.2 setosa\n", 221 | "11 4.8 3.4 1.6 0.2 setosa\n", 222 | "12 4.8 3.0 1.4 0.1 setosa\n", 223 | "13 4.3 3.0 1.1 0.1 setosa\n", 224 | "14 5.8 4.0 1.2 0.2 setosa\n", 225 | "15 5.7 4.4 1.5 0.4 setosa\n", 226 | "16 5.4 3.9 1.3 0.4 setosa\n", 227 | "17 5.1 3.5 1.4 0.3 setosa\n", 228 | "18 5.7 3.8 1.7 0.3 setosa\n", 229 | "19 5.1 3.8 1.5 0.3 setosa" 230 | ] 231 | }, 232 | "execution_count": 1, 233 | "metadata": {}, 234 | "output_type": "execute_result" 235 | } 236 | ], 237 | "source": [ 238 | "import pandas\n", 239 | "df = pandas.read_csv('../data/iris.csv')\n", 240 | "df.head(20)" 241 | ] 242 | }, 243 | { 244 | "cell_type": "markdown", 245 | "metadata": {}, 246 | "source": [ 247 | "## Read a GeoJSON file" 248 | ] 249 | }, 250 | { 251 | "cell_type": "code", 252 | "execution_count": 2, 253 | "metadata": {}, 254 | "outputs": [], 255 | "source": [ 256 | "import json\n", 257 | "\n", 258 | "with open('../data/Museums_in_DC.geojson') as f:\n", 259 | " s = json.loads(f.read())" 260 | ] 261 | }, 262 | { 263 | "cell_type": "code", 264 | "execution_count": 3, 265 | "metadata": {}, 266 | "outputs": [ 267 | { 268 | "data": { 269 | "text/plain": [ 270 | "{'type': 'FeatureCollection',\n", 271 | " 'features': [{'type': 'Feature',\n", 272 | " 'properties': {'OBJECTID': 1,\n", 273 | " 'ADDRESS': '716 MONROE STREET NE',\n", 274 | " 'NAME': 'AMERICAN POETRY MUSEUM',\n", 275 | " 'ADDRESS_ID': 309744,\n", 276 | " 'LEGALNAME': 'HERITAGE US',\n", 277 | " 'ALTNAME': 'AMERICAN POETRY MUSEUM',\n", 278 | " 'WEBURL': ' http://americanpoetrymuseum.org/'},\n", 279 | " 'geometry': {'type': 'Point',\n", 280 | " 'coordinates': [-76.995003703568, 38.9328428790235]}},\n", 281 | " {'type': 'Feature',\n", 282 | " 'properties': {'OBJECTID': 2,\n", 283 | " 'ADDRESS': '719 6TH STREET NW',\n", 284 | " 'NAME': 'GERMAN-AMERICAN HERITAGE MUSEUM',\n", 285 | " 'ADDRESS_ID': 238949,\n", 286 | " 'LEGALNAME': 'CORCORAN GALLERY OF ART',\n", 287 | " 'ALTNAME': ' ',\n", 288 | " 'WEBURL': 'http://gahmusa.org/'},\n", 289 | " 'geometry': {'type': 'Point',\n", 290 | " 'coordinates': [-77.01958878310639, 38.89911061096782]}},\n", 291 | " {'type': 'Feature',\n", 292 | " 'properties': {'OBJECTID': 3,\n", 293 | " 'ADDRESS': '1307 NEW HAMPSHIRE AVENUE NW',\n", 294 | " 'NAME': 'HEURICH HOUSE FOUNDATION',\n", 295 | " 'ADDRESS_ID': 241060,\n", 296 | " 'LEGALNAME': 'U.S. DEPARTMENT OF THE INTERIOR MUSEUM',\n", 297 | " 'ALTNAME': 'HEURICH HOUSE FOUNDATION',\n", 298 | " 'WEBURL': 'HTTP://HEURICHHOUSE.ORG'},\n", 299 | " 'geometry': {'type': 'Point',\n", 300 | " 'coordinates': [-77.04460619923155, 38.908030206509885]}},\n", 301 | " {'type': 'Feature',\n", 302 | " 'properties': {'OBJECTID': 4,\n", 303 | " 'ADDRESS': '950 INDEPENDENCE AVENUE SW',\n", 304 | " 'NAME': 'NATIONAL MUSEUM OF AFRICAN ART',\n", 305 | " 'ADDRESS_ID': 293262,\n", 306 | " 'LEGALNAME': 'BUILDING PRESERVATION FOUNDATION',\n", 307 | " 'ALTNAME': 'NATIONAL MUSEUM OF AFRICAN ART',\n", 308 | " 'WEBURL': 'HTTP://AFRICA.SI.EDU/'},\n", 309 | " 'geometry': {'type': 'Point',\n", 310 | " 'coordinates': [-77.02550917725944, 38.88796214949963]}},\n", 311 | " {'type': 'Feature',\n", 312 | " 'properties': {'OBJECTID': 5,\n", 313 | " 'ADDRESS': '740 JACKSON PLACE NW',\n", 314 | " 'NAME': 'THE WHITE HOUSE ENDOWMENT TRUST',\n", 315 | " 'ADDRESS_ID': 218748,\n", 316 | " 'LEGALNAME': 'NATIONAL BUILDING MUSEUM',\n", 317 | " 'ALTNAME': 'THE WHITE HOUSE ENDOWMENT TRUST',\n", 318 | " 'WEBURL': 'HTTP://WWW.WHITEHOUSEHISTORY.ORG'},\n", 319 | " 'geometry': {'type': 'Point',\n", 320 | " 'coordinates': [-77.03820629325264, 38.899842529027275]}},\n", 321 | " {'type': 'Feature',\n", 322 | " 'properties': {'OBJECTID': 6,\n", 323 | " 'ADDRESS': '921 PENNSYLVANIA AVENUE SE',\n", 324 | " 'NAME': 'OLD NAVAL HOSPITAL FOUNDATION',\n", 325 | " 'ADDRESS_ID': 82564,\n", 326 | " 'LEGALNAME': 'JEWISH WAR VETERANS NATIONAL MEMORIAL MUSEUM ARCHIVES AND LI',\n", 327 | " 'ALTNAME': 'OLD NAVAL HOSPITAL FOUNDATION',\n", 328 | " 'WEBURL': 'http://hillcenterdc.org/home/'},\n", 329 | " 'geometry': {'type': 'Point',\n", 330 | " 'coordinates': [-76.99314290714912, 38.8829885933721]}},\n", 331 | " {'type': 'Feature',\n", 332 | " 'properties': {'OBJECTID': 7,\n", 333 | " 'ADDRESS': '2201 C STREET NW',\n", 334 | " 'NAME': 'DIPLOMATIC ROOMS FOUNDATION',\n", 335 | " 'ADDRESS_ID': 243360,\n", 336 | " 'LEGALNAME': 'NATIONAL PLASTICS MUSEUM INC',\n", 337 | " 'ALTNAME': 'DIPLOMATIC ROOMS FOUNDATION',\n", 338 | " 'WEBURL': 'https://diplomaticrooms.state.gov/home.aspx'},\n", 339 | " 'geometry': {'type': 'Point',\n", 340 | " 'coordinates': [-77.04831079505838, 38.894135140073566]}},\n", 341 | " {'type': 'Feature',\n", 342 | " 'properties': {'OBJECTID': 8,\n", 343 | " 'ADDRESS': '4400 MASSACHUSETTS AVENUE NW',\n", 344 | " 'NAME': 'AMERICAN UNIVERSITY MUSEUM AT THE KATZEN ARTS CENTER',\n", 345 | " 'ADDRESS_ID': 223994,\n", 346 | " 'LEGALNAME': 'VERNISSAGE FOUNDATION',\n", 347 | " 'ALTNAME': 'AMERICAN UNIVERSITY MUSEUM AT THE KATZEN ARTS CENTER',\n", 348 | " 'WEBURL': 'HTTP://WWW.AMERICAN.EDU/CAS/MUSEUM/'},\n", 349 | " 'geometry': {'type': 'Point',\n", 350 | " 'coordinates': [-77.08841712551974, 38.9390892139132]}},\n", 351 | " {'type': 'Feature',\n", 352 | " 'properties': {'OBJECTID': 9,\n", 353 | " 'ADDRESS': '2320 S STREET NW',\n", 354 | " 'NAME': 'TEXTILE MUSEUM',\n", 355 | " 'ADDRESS_ID': 243164,\n", 356 | " 'LEGALNAME': 'SMITHSONIAN INSTITUTION, S. DILLON RIPLEY CENTER',\n", 357 | " 'ALTNAME': 'TEXTILE MUSEUM',\n", 358 | " 'WEBURL': 'HTTP://WWW.TEXTILEMUSEUM.ORG'},\n", 359 | " 'geometry': {'type': 'Point',\n", 360 | " 'coordinates': [-77.0464284034822, 38.89880233850966]}},\n", 361 | " {'type': 'Feature',\n", 362 | " 'properties': {'OBJECTID': 10,\n", 363 | " 'ADDRESS': '1145 17TH STREET NW',\n", 364 | " 'NAME': 'NATIONAL GEOGRAPHIC MUSEUM',\n", 365 | " 'ADDRESS_ID': 290192,\n", 366 | " 'LEGALNAME': 'CAPITOL HILL RESTORATION SOCIETY INC',\n", 367 | " 'ALTNAME': ' ',\n", 368 | " 'WEBURL': 'HTTP://WWW.NATIONALGEOGRAPHIC.COM'},\n", 369 | " 'geometry': {'type': 'Point',\n", 370 | " 'coordinates': [-77.03815544194862, 38.90519711304962]}},\n", 371 | " {'type': 'Feature',\n", 372 | " 'properties': {'OBJECTID': 11,\n", 373 | " 'ADDRESS': '3501 NEW YORK AVENUE NE',\n", 374 | " 'NAME': 'THE NATIONAL BONSAI & PENJING MUSEUM',\n", 375 | " 'ADDRESS_ID': 293238,\n", 376 | " 'LEGALNAME': 'NATIONAL BONSAI FOUNDATION',\n", 377 | " 'ALTNAME': ' ',\n", 378 | " 'WEBURL': 'https://www.bonsai-nbf.org/contact-us/'},\n", 379 | " 'geometry': {'type': 'Point',\n", 380 | " 'coordinates': [-76.96989266812075, 38.91241055669072]}},\n", 381 | " {'type': 'Feature',\n", 382 | " 'properties': {'OBJECTID': 12,\n", 383 | " 'ADDRESS': '2020 O STREET NW',\n", 384 | " 'NAME': 'O STREET MUSEUM',\n", 385 | " 'ADDRESS_ID': 243057,\n", 386 | " 'LEGALNAME': 'LEPIDOPTERISTS SOCIETY',\n", 387 | " 'ALTNAME': ' ',\n", 388 | " 'WEBURL': 'http://www.omuseum.org/museum/'},\n", 389 | " 'geometry': {'type': 'Point',\n", 390 | " 'coordinates': [-77.04592748104784, 38.90839101941751]}},\n", 391 | " {'type': 'Feature',\n", 392 | " 'properties': {'OBJECTID': 13,\n", 393 | " 'ADDRESS': '2101 CONSTITUTION AVENUE NW',\n", 394 | " 'NAME': 'NATIONAL ACADEMY OF SCIENCES',\n", 395 | " 'ADDRESS_ID': 242716,\n", 396 | " 'LEGALNAME': 'SMITHSONIAN INSTITUTION, NATURAL HISTORY MUSEUM',\n", 397 | " 'ALTNAME': 'NATIONAL ACADEMY OF SCIENCES',\n", 398 | " 'WEBURL': 'WWW.NATIONALACADEMIES.ORG/NAS/ARTS'},\n", 399 | " 'geometry': {'type': 'Point',\n", 400 | " 'coordinates': [-77.0476448925699, 38.89296693766957]}},\n", 401 | " {'type': 'Feature',\n", 402 | " 'properties': {'OBJECTID': 14,\n", 403 | " 'ADDRESS': '2401 FOXHALL ROAD NW',\n", 404 | " 'NAME': 'KREEGER MUSEUM',\n", 405 | " 'ADDRESS_ID': 271251,\n", 406 | " 'LEGALNAME': 'CONGRESSIONAL CEMETERY',\n", 407 | " 'ALTNAME': 'KREEGER MUSEUM',\n", 408 | " 'WEBURL': 'HTTP://WWW.KREEGERMUSEUM.ORG/'},\n", 409 | " 'geometry': {'type': 'Point',\n", 410 | " 'coordinates': [-77.08878098790044, 38.92191197499568]}},\n", 411 | " {'type': 'Feature',\n", 412 | " 'properties': {'OBJECTID': 15,\n", 413 | " 'ADDRESS': '1250 NEW YORK AVENUE NW',\n", 414 | " 'NAME': 'THE NATIONAL MUSEUM OF WOMEN IN THE ART',\n", 415 | " 'ADDRESS_ID': 279010,\n", 416 | " 'LEGALNAME': 'NATIONAL MUSEUM OF HEALTH AND MEDICINE',\n", 417 | " 'ALTNAME': 'THE NATIONAL MUSEUM OF WOMEN IN THE ART',\n", 418 | " 'WEBURL': 'HTTP://WWW.NMWA.ORG'},\n", 419 | " 'geometry': {'type': 'Point',\n", 420 | " 'coordinates': [-77.029163689541, 38.90005647268176]}},\n", 421 | " {'type': 'Feature',\n", 422 | " 'properties': {'OBJECTID': 16,\n", 423 | " 'ADDRESS': '900 JEFFERSON DRIVE SW',\n", 424 | " 'NAME': 'ARTS AND INDUSTRIES BUILDING',\n", 425 | " 'ADDRESS_ID': 293260,\n", 426 | " 'LEGALNAME': 'ANACOSTIA COMMUNITY MUSEUM',\n", 427 | " 'ALTNAME': ' ',\n", 428 | " 'WEBURL': 'http://www.si.edu/Museums/arts-and-industries-building'},\n", 429 | " 'geometry': {'type': 'Point',\n", 430 | " 'coordinates': [-77.02446647929001, 38.888201004559114]}},\n", 431 | " {'type': 'Feature',\n", 432 | " 'properties': {'OBJECTID': 17,\n", 433 | " 'ADDRESS': '736 SICARD STREET SE',\n", 434 | " 'NAME': 'NATIONAL MUSEUM OF UNITED STATES NAVY',\n", 435 | " 'ADDRESS_ID': 311896,\n", 436 | " 'LEGALNAME': 'BLACK SPORTS LEGENDS FOUNDATION',\n", 437 | " 'ALTNAME': 'NATIONAL MUSEUM OF UNITED STATES NAVY',\n", 438 | " 'WEBURL': 'http://www.history.navy.mil/museums/NationalMuseum/org8-1.htm'},\n", 439 | " 'geometry': {'type': 'Point',\n", 440 | " 'coordinates': [-76.99526950368147, 38.87303084860059]}},\n", 441 | " {'type': 'Feature',\n", 442 | " 'properties': {'OBJECTID': 18,\n", 443 | " 'ADDRESS': '500 17TH STREET NW',\n", 444 | " 'NAME': 'CORCORAN GALLERY OF ART',\n", 445 | " 'ADDRESS_ID': 279802,\n", 446 | " 'LEGALNAME': 'SMITHSONIAN INSTITUTION, NATIONAL ZOOLOGICAL PARK',\n", 447 | " 'ALTNAME': 'CORCORAN GALLERY OF ART',\n", 448 | " 'WEBURL': 'http://www.corcoran.org/'},\n", 449 | " 'geometry': {'type': 'Point',\n", 450 | " 'coordinates': [-77.0397427304576, 38.895854463821884]}},\n", 451 | " {'type': 'Feature',\n", 452 | " 'properties': {'OBJECTID': 19,\n", 453 | " 'ADDRESS': '2017 I STREET NW',\n", 454 | " 'NAME': 'THE ARTS CLUB OF WASHINGTON',\n", 455 | " 'ADDRESS_ID': 285527,\n", 456 | " 'LEGALNAME': 'SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF AFRICAN AMERICAN HISTORY AND CULTURE',\n", 457 | " 'ALTNAME': 'THE ARTS CLUB OF WASHINGTON',\n", 458 | " 'WEBURL': 'HTTP://WWW.ARTSCLUBOFWASHINGTON.ORG'},\n", 459 | " 'geometry': {'type': 'Point',\n", 460 | " 'coordinates': [-77.04573426864144, 38.90157618582308]}},\n", 461 | " {'type': 'Feature',\n", 462 | " 'properties': {'OBJECTID': 20,\n", 463 | " 'ADDRESS': '701 3RD STREET NW',\n", 464 | " 'NAME': 'LILLIAN AND ALBERT SMALL JEWISH MUSEUM',\n", 465 | " 'ADDRESS_ID': 293253,\n", 466 | " 'LEGALNAME': 'LILLIAN AND ALBERT SMALL JEWISH MUSEUM',\n", 467 | " 'ALTNAME': ' ',\n", 468 | " 'WEBURL': 'http://www.jhsgw.org/'},\n", 469 | " 'geometry': {'type': 'Point',\n", 470 | " 'coordinates': [-77.01493675564363, 38.89857205791096]}},\n", 471 | " {'type': 'Feature',\n", 472 | " 'properties': {'OBJECTID': 21,\n", 473 | " 'ADDRESS': '320 A STREET NE',\n", 474 | " 'NAME': 'FREDERICK DOUGLASS MUSEUM',\n", 475 | " 'ADDRESS_ID': 38979,\n", 476 | " 'LEGALNAME': 'COSMOS CLUB HISTORIC PRESERVATION FOUNDATION',\n", 477 | " 'ALTNAME': ' ',\n", 478 | " 'WEBURL': 'http://www3.nahc.org/fd/'},\n", 479 | " 'geometry': {'type': 'Point',\n", 480 | " 'coordinates': [-77.00110470253333, 38.891131915241964]}},\n", 481 | " {'type': 'Feature',\n", 482 | " 'properties': {'OBJECTID': 22,\n", 483 | " 'ADDRESS': '1334 G STREET NW',\n", 484 | " 'NAME': 'ARMENIAN GENOCIDE MUSEUM AND MEMORIAL',\n", 485 | " 'ADDRESS_ID': 240658,\n", 486 | " 'LEGALNAME': 'GERMAN-AMERICAN HERITAGE MUSEUM',\n", 487 | " 'ALTNAME': 'ARMENIAN GENOCIDE MUSEUM AND MEMORIAL',\n", 488 | " 'WEBURL': 'http://www.armeniangenocidemuseum.org/'},\n", 489 | " 'geometry': {'type': 'Point',\n", 490 | " 'coordinates': [-77.03108432435003, 38.89804891426683]}},\n", 491 | " {'type': 'Feature',\n", 492 | " 'properties': {'OBJECTID': 23,\n", 493 | " 'ADDRESS': '1799 NEW YORK AVENUE NW',\n", 494 | " 'NAME': 'OCTAGON MUSEUM',\n", 495 | " 'ADDRESS_ID': 218490,\n", 496 | " 'LEGALNAME': 'AMERICAN RED CROSS MUSEUM',\n", 497 | " 'ALTNAME': ' ',\n", 498 | " 'WEBURL': 'HTTP://WWW.THEOCTAGON.ORG'},\n", 499 | " 'geometry': {'type': 'Point',\n", 500 | " 'coordinates': [-77.04141820048949, 38.89635375607101]}},\n", 501 | " {'type': 'Feature',\n", 502 | " 'properties': {'OBJECTID': 24,\n", 503 | " 'ADDRESS': '1901 FORT PLACE SE',\n", 504 | " 'NAME': 'ANACOSTIA COMMUNITY MUSEUM',\n", 505 | " 'ADDRESS_ID': 286524,\n", 506 | " 'LEGALNAME': 'FAUNA & FLORA INTERNATIONAL INC',\n", 507 | " 'ALTNAME': 'ANACOSTIA COMMUNITY MUSEUM',\n", 508 | " 'WEBURL': 'HTTP://ANACOSTIA.SI.EDU'},\n", 509 | " 'geometry': {'type': 'Point',\n", 510 | " 'coordinates': [-76.97678467186984, 38.8565826636904]}},\n", 511 | " {'type': 'Feature',\n", 512 | " 'properties': {'OBJECTID': 25,\n", 513 | " 'ADDRESS': '2312 CALIFORNIA STREET NW',\n", 514 | " 'NAME': 'NATIONAL MUSEUM OF THE JEWISH PEOPLE',\n", 515 | " 'ADDRESS_ID': 234961,\n", 516 | " 'LEGALNAME': 'GREENSEED COMMUNITY GARDEN LAND TRUST',\n", 517 | " 'ALTNAME': ' ',\n", 518 | " 'WEBURL': 'http://www.nsideas.com/archive/nmjh/'},\n", 519 | " 'geometry': {'type': 'Point',\n", 520 | " 'coordinates': [-77.05118108814123, 38.91537084189858]}},\n", 521 | " {'type': 'Feature',\n", 522 | " 'properties': {'OBJECTID': 26,\n", 523 | " 'ADDRESS': '430 17TH STREET NW',\n", 524 | " 'NAME': 'AMERICAN RED CROSS MUSEUM',\n", 525 | " 'ADDRESS_ID': 300987,\n", 526 | " 'LEGALNAME': 'DOUBLE M MANAGEMENT',\n", 527 | " 'ALTNAME': 'AMERICAN RED CROSS MUSEUM',\n", 528 | " 'WEBURL': 'http://www.redcross.org/'},\n", 529 | " 'geometry': {'type': 'Point',\n", 530 | " 'coordinates': [-77.04020705622152, 38.89482654014118]}},\n", 531 | " {'type': 'Feature',\n", 532 | " 'properties': {'OBJECTID': 27,\n", 533 | " 'ADDRESS': '1600 21ST STREET NW',\n", 534 | " 'NAME': 'THE PHILLIPS COLLECTION',\n", 535 | " 'ADDRESS_ID': 243333,\n", 536 | " 'LEGALNAME': 'SMITHSONIAN INSTITUTION, RENWICK GALLERY',\n", 537 | " 'ALTNAME': 'THE PHILLIPS COLLECTION',\n", 538 | " 'WEBURL': 'HTTP://WWW.PHILLIPSCOLLECTION.ORG'},\n", 539 | " 'geometry': {'type': 'Point',\n", 540 | " 'coordinates': [-77.04685454590388, 38.91150979086159]}},\n", 541 | " {'type': 'Feature',\n", 542 | " 'properties': {'OBJECTID': 28,\n", 543 | " 'ADDRESS': '800 F STREET NW',\n", 544 | " 'NAME': 'INTERNATIONAL SPY MUSEUM',\n", 545 | " 'ADDRESS_ID': 238378,\n", 546 | " 'LEGALNAME': 'CONFEDERATE MEMORIAL HALL ASSOCIATION',\n", 547 | " 'ALTNAME': 'INTERNATIONAL SPY MUSEUM',\n", 548 | " 'WEBURL': 'HTTP://WWW.SPYMUSEUM.ORG/'},\n", 549 | " 'geometry': {'type': 'Point',\n", 550 | " 'coordinates': [-77.02328618491306, 38.896986480912865]}},\n", 551 | " {'type': 'Feature',\n", 552 | " 'properties': {'OBJECTID': 29,\n", 553 | " 'ADDRESS': '100 RAOUL WALLENBERG PLACE SW',\n", 554 | " 'NAME': 'UNITED STATES HOLOCAUST MEMORIAL MUSEUM',\n", 555 | " 'ADDRESS_ID': 293186,\n", 556 | " 'LEGALNAME': 'NATIONAL MUSIC CENTER AND MUSEUM FOUNDATION',\n", 557 | " 'ALTNAME': 'UNITED STATES HOLOCAUST MEMORIAL MUSEUM',\n", 558 | " 'WEBURL': 'HTTP://WWW.USHMM.ORG'},\n", 559 | " 'geometry': {'type': 'Point',\n", 560 | " 'coordinates': [-77.03268853739414, 38.88668873773371]}},\n", 561 | " {'type': 'Feature',\n", 562 | " 'properties': {'OBJECTID': 30,\n", 563 | " 'ADDRESS': '801 K STREET NW',\n", 564 | " 'NAME': 'HISTORICAL SOCIETY OF WASHINGTON DC',\n", 565 | " 'ADDRESS_ID': 238956,\n", 566 | " 'LEGALNAME': 'Historical Society of Washington, D.C',\n", 567 | " 'ALTNAME': ' ',\n", 568 | " 'WEBURL': 'http://www.dchistory.org/'},\n", 569 | " 'geometry': {'type': 'Point',\n", 570 | " 'coordinates': [-77.02294505078932, 38.90262956584554]}},\n", 571 | " {'type': 'Feature',\n", 572 | " 'properties': {'OBJECTID': 31,\n", 573 | " 'ADDRESS': '1849 C STREET NW',\n", 574 | " 'NAME': 'INTERIOR MUSEUM',\n", 575 | " 'ADDRESS_ID': 293214,\n", 576 | " 'LEGALNAME': 'VICE PRESIDENTS RESIDENCE FOUNDATION',\n", 577 | " 'ALTNAME': 'INTERIOR MUSEUM',\n", 578 | " 'WEBURL': 'HTTP://WWW.DOI.GOV/INTERIORMUSEUM'},\n", 579 | " 'geometry': {'type': 'Point',\n", 580 | " 'coordinates': [-77.04260256434321, 38.89445283458921]}},\n", 581 | " {'type': 'Feature',\n", 582 | " 'properties': {'OBJECTID': 32,\n", 583 | " 'ADDRESS': '4155 LINNEAN AVENUE NW',\n", 584 | " 'NAME': 'HILLWOOD MUSEUM & GARDENS',\n", 585 | " 'ADDRESS_ID': 284839,\n", 586 | " 'LEGALNAME': 'SMITHSONIAN INSTITUTION, NATIONAL GALLERY OF ART',\n", 587 | " 'ALTNAME': 'HILLWOOD MUSEUM & GARDENS',\n", 588 | " 'WEBURL': 'WWW.HILLWOODMUSEUM.ORG'},\n", 589 | " 'geometry': {'type': 'Point',\n", 590 | " 'coordinates': [-77.0526196505072, 38.94364171194315]}},\n", 591 | " {'type': 'Feature',\n", 592 | " 'properties': {'OBJECTID': 33,\n", 593 | " 'ADDRESS': '1318 VERMONT AVENUE NW',\n", 594 | " 'NAME': 'BETHUNE MEMORIAL MUSEUM',\n", 595 | " 'ADDRESS_ID': 225385,\n", 596 | " 'LEGALNAME': 'NATIONAL MUSEUM OF WOMEN IN THE ARTS INC',\n", 597 | " 'ALTNAME': ' ',\n", 598 | " 'WEBURL': 'http://www.nps.gov/mamc/index.htm'},\n", 599 | " 'geometry': {'type': 'Point',\n", 600 | " 'coordinates': [-77.03086564182146, 38.90817580546652]}},\n", 601 | " {'type': 'Feature',\n", 602 | " 'properties': {'OBJECTID': 34,\n", 603 | " 'ADDRESS': '1500 MASSACHUSETTS AVENUE NW',\n", 604 | " 'NAME': 'NATIONAL MUSEUM OF CATHOLIC ART AND LIBRARY',\n", 605 | " 'ADDRESS_ID': 242324,\n", 606 | " 'LEGALNAME': 'KREEGER MUSEUM',\n", 607 | " 'ALTNAME': ' ',\n", 608 | " 'WEBURL': 'http://nmcal.org/nmcah_exhibition_in_washington.html'},\n", 609 | " 'geometry': {'type': 'Point',\n", 610 | " 'coordinates': [-77.03551120800971, 38.90651019329394]}},\n", 611 | " {'type': 'Feature',\n", 612 | " 'properties': {'OBJECTID': 35,\n", 613 | " 'ADDRESS': '1 MASSACHUSETTS AVENUE NW',\n", 614 | " 'NAME': 'NATIONAL GUARD MEMORIAL MUSEUM',\n", 615 | " 'ADDRESS_ID': 238009,\n", 616 | " 'LEGALNAME': 'CARL SCHMITT FOUNDATION INC',\n", 617 | " 'ALTNAME': ' ',\n", 618 | " 'WEBURL': 'HTTP://WWW.NGEF.ORG'},\n", 619 | " 'geometry': {'type': 'Point',\n", 620 | " 'coordinates': [-77.00956143652462, 38.89812580681995]}},\n", 621 | " {'type': 'Feature',\n", 622 | " 'properties': {'OBJECTID': 36,\n", 623 | " 'ADDRESS': '1811 R STREET NW',\n", 624 | " 'NAME': 'NATIONAL MUSEUM OF AMERICAN JEWISH MILITARY HISTORY',\n", 625 | " 'ADDRESS_ID': 243292,\n", 626 | " 'LEGALNAME': 'CITY TAVERN PRESERVATION FOUNDATION',\n", 627 | " 'ALTNAME': 'JEWISH WAR VETERANS NATIONAL MEMORIAL MUSEUM ARCHIVES AND LIBRARY',\n", 628 | " 'WEBURL': 'http://www.nmajmh.org/'},\n", 629 | " 'geometry': {'type': 'Point',\n", 630 | " 'coordinates': [-77.04211577477285, 38.91282059721026]}},\n", 631 | " {'type': 'Feature',\n", 632 | " 'properties': {'OBJECTID': 37,\n", 633 | " 'ADDRESS': '3900 HAREWOOD ROAD NE',\n", 634 | " 'NAME': 'POPE JOHN PAUL II CULTURAL CENTER',\n", 635 | " 'ADDRESS_ID': 288031,\n", 636 | " 'LEGALNAME': 'AMERICAN POETRY MUSEUM',\n", 637 | " 'ALTNAME': ' ',\n", 638 | " 'WEBURL': 'HTTP://WWW.JP2CC.ORG'},\n", 639 | " 'geometry': {'type': 'Point',\n", 640 | " 'coordinates': [-77.00466710351098, 38.93776654366721]}},\n", 641 | " {'type': 'Feature',\n", 642 | " 'properties': {'OBJECTID': 38,\n", 643 | " 'ADDRESS': '700 PENNSYLVANIA AVENUE NW',\n", 644 | " 'NAME': 'NATIONAL ARCHIVES MUSEUM',\n", 645 | " 'ADDRESS_ID': 293251,\n", 646 | " 'LEGALNAME': 'PHILLIPS COLLECTION',\n", 647 | " 'ALTNAME': 'NATIONAL ARCHIVES MUSEUM',\n", 648 | " 'WEBURL': 'https://www.archives.gov/dc-metro/washington/'},\n", 649 | " 'geometry': {'type': 'Point',\n", 650 | " 'coordinates': [-77.0228592459719, 38.89285370583677]}},\n", 651 | " {'type': 'Feature',\n", 652 | " 'properties': {'OBJECTID': 39,\n", 653 | " 'ADDRESS': '201 18TH STREET NW',\n", 654 | " 'NAME': 'ART MUSEUM OF THE AMERICAS',\n", 655 | " 'ADDRESS_ID': 294191,\n", 656 | " 'LEGALNAME': 'Art Museum of the Americas',\n", 657 | " 'ALTNAME': ' ',\n", 658 | " 'WEBURL': 'http://www.museum.oas.org/'},\n", 659 | " 'geometry': {'type': 'Point',\n", 660 | " 'coordinates': [-77.04147388756545, 38.892799844291474]}},\n", 661 | " {'type': 'Feature',\n", 662 | " 'properties': {'OBJECTID': 40,\n", 663 | " 'ADDRESS': '9 HILLYER COURT NW',\n", 664 | " 'NAME': 'INTERNATIONAL ARTS & ARTISTS',\n", 665 | " 'ADDRESS_ID': 279975,\n", 666 | " 'LEGALNAME': 'THE INTERNATIONAL SPY MUSEUM',\n", 667 | " 'ALTNAME': 'INTERNATIONAL ARTS & ARTISTS',\n", 668 | " 'WEBURL': 'WWW.ARTSANDARTISTS.ORG'},\n", 669 | " 'geometry': {'type': 'Point',\n", 670 | " 'coordinates': [-77.04730884101534, 38.91222144699389]}},\n", 671 | " {'type': 'Feature',\n", 672 | " 'properties': {'OBJECTID': 41,\n", 673 | " 'ADDRESS': '2 MASSACHUSETTS AVENUE NE',\n", 674 | " 'NAME': 'NATIONAL POSTAL MUSEUM',\n", 675 | " 'ADDRESS_ID': 293217,\n", 676 | " 'LEGALNAME': 'BEAD SOCIETY OF GREATER WASHINGTON',\n", 677 | " 'ALTNAME': 'NATIONAL POSTAL MUSEUM',\n", 678 | " 'WEBURL': 'HTTP://POSTALMUSEUM.SI.EDU'},\n", 679 | " 'geometry': {'type': 'Point',\n", 680 | " 'coordinates': [-77.00819124512859, 38.8981463599396]}},\n", 681 | " {'type': 'Feature',\n", 682 | " 'properties': {'OBJECTID': 42,\n", 683 | " 'ADDRESS': '1519 MONROE STREET NW',\n", 684 | " 'NAME': 'POWHATAN MUSEUM',\n", 685 | " 'ADDRESS_ID': 234557,\n", 686 | " 'LEGALNAME': 'AMERICAN UNIVERSITY MUSEUM',\n", 687 | " 'ALTNAME': ' ',\n", 688 | " 'WEBURL': 'http://www.powhatanmuseum.com/'},\n", 689 | " 'geometry': {'type': 'Point',\n", 690 | " 'coordinates': [-77.03550660261739, 38.93243814726252]}},\n", 691 | " {'type': 'Feature',\n", 692 | " 'properties': {'OBJECTID': 43,\n", 693 | " 'ADDRESS': '144 CONSTITUTION AVENUE NE',\n", 694 | " 'NAME': 'SEWALL-BELMONT HOUSE AND MUSEUM',\n", 695 | " 'ADDRESS_ID': 286201,\n", 696 | " 'LEGALNAME': 'AMERICAN MUSEUM OF PEACE INC',\n", 697 | " 'ALTNAME': ' ',\n", 698 | " 'WEBURL': 'HTTP://WWW.SEWALLBELMONT.ORG'},\n", 699 | " 'geometry': {'type': 'Point',\n", 700 | " 'coordinates': [-77.00375845550963, 38.89219466787653]}},\n", 701 | " {'type': 'Feature',\n", 702 | " 'properties': {'OBJECTID': 44,\n", 703 | " 'ADDRESS': '802 MASSACHUSETTS AVENUE NE',\n", 704 | " 'NAME': 'SHOOK MUSEUM FOUNDATION',\n", 705 | " 'ADDRESS_ID': 79669,\n", 706 | " 'LEGALNAME': 'GREENPEACE FUND',\n", 707 | " 'ALTNAME': ' ',\n", 708 | " 'WEBURL': 'SHOOKMUSEUM.ORG'},\n", 709 | " 'geometry': {'type': 'Point',\n", 710 | " 'coordinates': [-76.9944246526475, 38.891834530779185]}},\n", 711 | " {'type': 'Feature',\n", 712 | " 'properties': {'OBJECTID': 45,\n", 713 | " 'ADDRESS': '1400 CONSTITUTION AVENUE NW',\n", 714 | " 'NAME': 'SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF NATURAL HISTORY',\n", 715 | " 'ADDRESS_ID': 310702,\n", 716 | " 'LEGALNAME': \"B'NAI B'RITH KLUTZNICK MUSEUM\",\n", 717 | " 'ALTNAME': 'SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF NATURAL HISTORY',\n", 718 | " 'WEBURL': 'http://www.mnh.si.edu/'},\n", 719 | " 'geometry': {'type': 'Point',\n", 720 | " 'coordinates': [-77.02591603234607, 38.89121850995097]}},\n", 721 | " {'type': 'Feature',\n", 722 | " 'properties': {'OBJECTID': 46,\n", 723 | " 'ADDRESS': '500 HOWARD PLACE NW',\n", 724 | " 'NAME': 'HOWARD UNIVERSITY MUSEUM',\n", 725 | " 'ADDRESS_ID': 243398,\n", 726 | " 'LEGALNAME': 'COLLECTONS STRIES AMRCN MSLIMS',\n", 727 | " 'ALTNAME': ' ',\n", 728 | " 'WEBURL': 'http://www.coas.howard.edu/msrc/museum.html'},\n", 729 | " 'geometry': {'type': 'Point',\n", 730 | " 'coordinates': [-77.0196991986925, 38.922360224748935]}},\n", 731 | " {'type': 'Feature',\n", 732 | " 'properties': {'OBJECTID': 47,\n", 733 | " 'ADDRESS': '8TH STREET NW AND F ST NW',\n", 734 | " 'NAME': 'NATIONAL PORTRAIT GALLERY',\n", 735 | " 'ADDRESS_ID': 294248,\n", 736 | " 'LEGALNAME': 'BOHEMIA ARTS',\n", 737 | " 'ALTNAME': 'NATIONAL PORTRAIT GALLERY',\n", 738 | " 'WEBURL': 'HTTP://WWW.NPG.SI.EDU'},\n", 739 | " 'geometry': {'type': 'Point',\n", 740 | " 'coordinates': [-77.02295571583119, 38.89815890118559]}},\n", 741 | " {'type': 'Feature',\n", 742 | " 'properties': {'OBJECTID': 48,\n", 743 | " 'ADDRESS': '14TH STREET NW AND CONSTITUTION AVENUE NW',\n", 744 | " 'NAME': 'NATIONAL MUSEUM OF AFRICAN AMERICAN HISTORY AND CULTURE',\n", 745 | " 'ADDRESS_ID': 903110,\n", 746 | " 'LEGALNAME': 'AMERICANS FOR BATTLEFIELD PRESERVATION',\n", 747 | " 'ALTNAME': 'NATIONAL MUSEUM OF AFRICAN AMERICAN HISTORY AND CULTURE',\n", 748 | " 'WEBURL': 'HTTP://WWW.NMAAHC.SI.EDU/'},\n", 749 | " 'geometry': {'type': 'Point',\n", 750 | " 'coordinates': [-77.03271597832732, 38.89119983415094]}},\n", 751 | " {'type': 'Feature',\n", 752 | " 'properties': {'OBJECTID': 49,\n", 753 | " 'ADDRESS': '4TH STREET SW AND INDEPENDENCE AVENUE SW',\n", 754 | " 'NAME': 'NATIONAL MUSEUM OF AMERICAN INDIAN',\n", 755 | " 'ADDRESS_ID': 294429,\n", 756 | " 'LEGALNAME': 'BLAIR HOUSE RESTORATION FUND',\n", 757 | " 'ALTNAME': ' ',\n", 758 | " 'WEBURL': 'WWW.NMAI.SI.EDU'},\n", 759 | " 'geometry': {'type': 'Point',\n", 760 | " 'coordinates': [-77.01672595283219, 38.88826561652]}},\n", 761 | " {'type': 'Feature',\n", 762 | " 'properties': {'OBJECTID': 50,\n", 763 | " 'ADDRESS': '6TH STREET SW AND INDEPENDENCE AVENUE SW',\n", 764 | " 'NAME': 'NATIONAL AIR AND SPACE MUSEUM',\n", 765 | " 'ADDRESS_ID': 301565,\n", 766 | " 'LEGALNAME': 'BETHUNE MEMORIAL MUSEUM',\n", 767 | " 'ALTNAME': 'NATIONAL AIR AND SPACE MUSEUM',\n", 768 | " 'WEBURL': 'HTTP://WWW.NASM.SI.EDU/'},\n", 769 | " 'geometry': {'type': 'Point',\n", 770 | " 'coordinates': [-77.01979999825605, 38.888161175521944]}},\n", 771 | " {'type': 'Feature',\n", 772 | " 'properties': {'OBJECTID': 51,\n", 773 | " 'ADDRESS': '7THB STREET AND INDEPENDENCE AVENUE SW',\n", 774 | " 'NAME': 'HIRSHHORN MUSEUM AND SCULPTURE GARDEN',\n", 775 | " 'ADDRESS_ID': 294428,\n", 776 | " 'LEGALNAME': 'D.C. OFFICE OF PUBLIC RECORDS AND ARCHIVES',\n", 777 | " 'ALTNAME': 'HIRSHHORN MUSEUM AND SCULPTURE GARDEN',\n", 778 | " 'WEBURL': 'HTTP://HIRSHHORN.SI.EDU/'},\n", 779 | " 'geometry': {'type': 'Point',\n", 780 | " 'coordinates': [-77.02294902891254, 38.88843565656003]}},\n", 781 | " {'type': 'Feature',\n", 782 | " 'properties': {'OBJECTID': 52,\n", 783 | " 'ADDRESS': 'MADISON DRIVE NW AND 12TH STREET NW',\n", 784 | " 'NAME': 'SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF AMERICAN HISTORY',\n", 785 | " 'ADDRESS_ID': 293200,\n", 786 | " 'LEGALNAME': None,\n", 787 | " 'ALTNAME': 'SMITHSONIAN INSTITUTION, NATIONAL MUSEUM OF AMERICAN HISTORY',\n", 788 | " 'WEBURL': 'HTTP://AMERICANHISTORY.SI.EDU'},\n", 789 | " 'geometry': {'type': 'Point',\n", 790 | " 'coordinates': [-77.03005156534492, 38.89123181993075]}},\n", 791 | " {'type': 'Feature',\n", 792 | " 'properties': {'OBJECTID': 53,\n", 793 | " 'ADDRESS': '4TH STREET NW AND MADISON DRIVE NW',\n", 794 | " 'NAME': 'NATIONAL GALLERY OF ART - EAST BUILDING',\n", 795 | " 'ADDRESS_ID': 293209,\n", 796 | " 'LEGALNAME': None,\n", 797 | " 'ALTNAME': None,\n", 798 | " 'WEBURL': 'http://www.nga.gov/content/ngaweb/visit/maps-and-information/east-building.html'},\n", 799 | " 'geometry': {'type': 'Point',\n", 800 | " 'coordinates': [-77.01668919569053, 38.89125721273486]}},\n", 801 | " {'type': 'Feature',\n", 802 | " 'properties': {'OBJECTID': 54,\n", 803 | " 'ADDRESS': '4TH STREET NW AND MADISON DRIVE NW',\n", 804 | " 'NAME': 'NATIONAL GALLERY OF ART - WEST BUILDING',\n", 805 | " 'ADDRESS_ID': 293249,\n", 806 | " 'LEGALNAME': None,\n", 807 | " 'ALTNAME': None,\n", 808 | " 'WEBURL': 'http://www.nga.gov/content/ngaweb/visit/maps-and-information/west-building.html'},\n", 809 | " 'geometry': {'type': 'Point',\n", 810 | " 'coordinates': [-77.01989150273015, 38.891313914429645]}},\n", 811 | " {'type': 'Feature',\n", 812 | " 'properties': {'OBJECTID': 55,\n", 813 | " 'ADDRESS': '1000 JEFFERSON DRIVE SW',\n", 814 | " 'NAME': 'SMITHSONIAN INSTITUTION - CASTLE',\n", 815 | " 'ADDRESS_ID': 293187,\n", 816 | " 'LEGALNAME': None,\n", 817 | " 'ALTNAME': None,\n", 818 | " 'WEBURL': 'http://www.si.edu/Museums/smithsonian-institution-building'},\n", 819 | " 'geometry': {'type': 'Point',\n", 820 | " 'coordinates': [-77.02597189316775, 38.88879577572046]}},\n", 821 | " {'type': 'Feature',\n", 822 | " 'properties': {'OBJECTID': 56,\n", 823 | " 'ADDRESS': '1050 INDEPENDENCE AVENUE SW',\n", 824 | " 'NAME': 'SACKLER GALLERY',\n", 825 | " 'ADDRESS_ID': 293191,\n", 826 | " 'LEGALNAME': 'ARTHUR M. SACKLER GALLERY',\n", 827 | " 'ALTNAME': None,\n", 828 | " 'WEBURL': 'http://www.asia.si.edu/'},\n", 829 | " 'geometry': {'type': 'Point',\n", 830 | " 'coordinates': [-77.02645343758842, 38.88796502751886]}},\n", 831 | " {'type': 'Feature',\n", 832 | " 'properties': {'OBJECTID': 57,\n", 833 | " 'ADDRESS': 'JEFFERSON DRIVE SW AND 12TH STREET SW',\n", 834 | " 'NAME': 'FREER GALLERY',\n", 835 | " 'ADDRESS_ID': 294417,\n", 836 | " 'LEGALNAME': 'FREER GALLERY OF ART',\n", 837 | " 'ALTNAME': None,\n", 838 | " 'WEBURL': 'http://www.asia.si.edu/'},\n", 839 | " 'geometry': {'type': 'Point',\n", 840 | " 'coordinates': [-77.02736845485786, 38.8882746680144]}}]}" 841 | ] 842 | }, 843 | "execution_count": 3, 844 | "metadata": {}, 845 | "output_type": "execute_result" 846 | } 847 | ], 848 | "source": [ 849 | "s" 850 | ] 851 | } 852 | ], 853 | "metadata": { 854 | "kernelspec": { 855 | "display_name": "Python 3", 856 | "language": "python", 857 | "name": "python3" 858 | }, 859 | "language_info": { 860 | "codemirror_mode": { 861 | "name": "ipython", 862 | "version": 3 863 | }, 864 | "file_extension": ".py", 865 | "mimetype": "text/x-python", 866 | "name": "python", 867 | "nbconvert_exporter": "python", 868 | "pygments_lexer": "ipython3", 869 | "version": "3.6.5" 870 | } 871 | }, 872 | "nbformat": 4, 873 | "nbformat_minor": 2 874 | } 875 | -------------------------------------------------------------------------------- /notebooks/Fasta.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": { 7 | "collapsed": true 8 | }, 9 | "outputs": [], 10 | "source": [ 11 | "from IPython.display import display\n", 12 | "class Fasta:\n", 13 | " def __init__(self, data):\n", 14 | " self.data = data\n", 15 | " def _ipython_display_(self):\n", 16 | " bundle = {\n", 17 | " 'application/vnd.fasta.fasta': self.data,\n", 18 | " 'text/plain': data\n", 19 | " }\n", 20 | " display(bundle, raw=True)\n" 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": null, 26 | "metadata": {}, 27 | "outputs": [], 28 | "source": [ 29 | "with open('../data/zika_assembled_genomes.fasta') as f:\n", 30 | " data = f.read()\n", 31 | "Fasta(data)" 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": null, 37 | "metadata": { 38 | "collapsed": true 39 | }, 40 | "outputs": [], 41 | "source": [] 42 | } 43 | ], 44 | "metadata": { 45 | "kernelspec": { 46 | "display_name": "Python 3", 47 | "language": "python", 48 | "name": "python3" 49 | }, 50 | "language_info": { 51 | "codemirror_mode": { 52 | "name": "ipython", 53 | "version": 3 54 | }, 55 | "file_extension": ".py", 56 | "mimetype": "text/x-python", 57 | "name": "python", 58 | "nbconvert_exporter": "python", 59 | "pygments_lexer": "ipython3", 60 | "version": "3.6.5" 61 | } 62 | }, 63 | "nbformat": 4, 64 | "nbformat_minor": 2 65 | } 66 | -------------------------------------------------------------------------------- /notebooks/Lorenz.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# The Lorenz Differential Equations" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Before we start, we import some preliminary libraries. We will also import (below) the accompanying `lorenz.py` file, which contains the actual solver and plotting routine." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 1, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "%matplotlib inline\n", 24 | "from ipywidgets import interactive, fixed" 25 | ] 26 | }, 27 | { 28 | "cell_type": "markdown", 29 | "metadata": {}, 30 | "source": [ 31 | "We explore the Lorenz system of differential equations:\n", 32 | "\n", 33 | "$$\n", 34 | "\\begin{aligned}\n", 35 | "\\dot{x} & = \\sigma(y-x) \\\\\n", 36 | "\\dot{y} & = \\rho x - y - xz \\\\\n", 37 | "\\dot{z} & = -\\beta z + xy\n", 38 | "\\end{aligned}\n", 39 | "$$\n", 40 | "\n", 41 | "Let's change (\\\\(\\sigma\\\\), \\\\(\\beta\\\\), \\\\(\\rho\\\\)) with ipywidgets and examine the trajectories." 42 | ] 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 2, 47 | "metadata": {}, 48 | "outputs": [ 49 | { 50 | "data": { 51 | "application/vnd.jupyter.widget-view+json": { 52 | "model_id": "c117838837384853ac94223a50ae967d", 53 | "version_major": 2, 54 | "version_minor": 0 55 | }, 56 | "text/plain": [ 57 | "interactive(children=(FloatSlider(value=10.0, description='sigma', max=50.0), FloatSlider(value=2.666666666666…" 58 | ] 59 | }, 60 | "metadata": {}, 61 | "output_type": "display_data" 62 | } 63 | ], 64 | "source": [ 65 | "from lorenz import solve_lorenz\n", 66 | "w=interactive(solve_lorenz,sigma=(0.0,50.0),rho=(0.0,50.0))\n", 67 | "w" 68 | ] 69 | }, 70 | { 71 | "cell_type": "markdown", 72 | "metadata": {}, 73 | "source": [ 74 | "For the default set of parameters, we see the trajectories swirling around two points, called attractors. " 75 | ] 76 | }, 77 | { 78 | "cell_type": "markdown", 79 | "metadata": {}, 80 | "source": [ 81 | "The object returned by `interactive` is a `Widget` object and it has attributes that contain the current result and arguments:" 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": 3, 87 | "metadata": { 88 | "collapsed": true 89 | }, 90 | "outputs": [], 91 | "source": [ 92 | "t, x_t = w.result" 93 | ] 94 | }, 95 | { 96 | "cell_type": "code", 97 | "execution_count": 4, 98 | "metadata": {}, 99 | "outputs": [ 100 | { 101 | "data": { 102 | "text/plain": [ 103 | "{'sigma': 25.3, 'beta': 2.6666666666666665, 'rho': 28.0}" 104 | ] 105 | }, 106 | "execution_count": 4, 107 | "metadata": {}, 108 | "output_type": "execute_result" 109 | } 110 | ], 111 | "source": [ 112 | "w.kwargs" 113 | ] 114 | }, 115 | { 116 | "cell_type": "markdown", 117 | "metadata": {}, 118 | "source": [ 119 | "After interacting with the system, we can take the result and perform further computations. In this case, we compute the average positions in \\\\(x\\\\), \\\\(y\\\\) and \\\\(z\\\\)." 120 | ] 121 | }, 122 | { 123 | "cell_type": "code", 124 | "execution_count": 5, 125 | "metadata": { 126 | "collapsed": true 127 | }, 128 | "outputs": [], 129 | "source": [ 130 | "xyz_avg = x_t.mean(axis=1)" 131 | ] 132 | }, 133 | { 134 | "cell_type": "code", 135 | "execution_count": 6, 136 | "metadata": {}, 137 | "outputs": [ 138 | { 139 | "data": { 140 | "text/plain": [ 141 | "(30, 3)" 142 | ] 143 | }, 144 | "execution_count": 6, 145 | "metadata": {}, 146 | "output_type": "execute_result" 147 | } 148 | ], 149 | "source": [ 150 | "xyz_avg.shape" 151 | ] 152 | }, 153 | { 154 | "cell_type": "markdown", 155 | "metadata": {}, 156 | "source": [ 157 | "Creating histograms of the average positions (across different trajectories) show that, on average, the trajectories swirl about the attractors." 158 | ] 159 | }, 160 | { 161 | "cell_type": "code", 162 | "execution_count": 7, 163 | "metadata": {}, 164 | "outputs": [], 165 | "source": [ 166 | "from matplotlib import pyplot as plt" 167 | ] 168 | }, 169 | { 170 | "cell_type": "code", 171 | "execution_count": 8, 172 | "metadata": {}, 173 | "outputs": [ 174 | { 175 | "data": { 176 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEH1JREFUeJzt3XuQZGV9xvHv4y4oIkhKRqMs60ipRAW5OBAt4g3UcDGoKZOAN7xUTXkjUGVKF62kKpZJiEYClpZmg6CWeAGExIAaSRQTUwLuchNYSRRRlossRgJC4gr+8kef1WGZmT6zTE/vu/v9VHXtdPfb5zwzO/30mfec052qQpLUjoeNO4AkaWEsbklqjMUtSY2xuCWpMRa3JDXG4pakxljcktQYi1uSGmNxS4ssyV8lOXHImMuSPGOpMmnbYnFrSSS5OMlPkzx83FlGKckE8Drg7za7/eYk+8+46W+A9y5lNm07LG6NXJJJ4LlAAUePYPnLF3uZD8HrgS9V1f9uuiHJ7sBjgXUzxn0ReGGSxy9tPG0LLG4thdcBlwCfAI7bdGOSVUnOnTkwyWlJPtR9/YQkX0iyIckPkvzxjHE3JnlXkquBe5Is75b3/SR3J7kuyStmjD8wyRXdfeck+XyS9824f851bS7J+5OcP+P6B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zNw33AO6rqacCzgbc1lv8EYN24Q2yh04CvVNVvAfsxou9juytu4C3AyVX1c4Cqun3MeRbqb4F3MstJUFuzqvpqVd3XXb2EwfkAW6um3+ahqm6tqsu7r+9mUB57jDdVP0lWAEcBp487y0Il2RV4HvBxgKraWFV3jmJd22NxPxV4bpJLk3wjyUHjDtRXkqOBm6vqqnFneYjeCHx53CHmMdvbPDRRfJtLMgkcAFw63iS9ncpgw+SX4w6yBfYCNgBndlM9pyfZeRQr6nPKe3OS/Avwm7Pc9R4G3/NvMPgT8iDg7CR71VZyXOSQ7O8GXrK0ifqbL3tV/WM35j0M/pQ/aymzLVCvt3nY2iV5FPAF4MSqumvceYZJ8lLg9qpam+QF486zBZYDBwLHV9WlSU4DVgF/OooVbXOq6kVz3ZfkLcB5XVFfluSXDN4UZsNS5ZvPXNmT7As8CbgqCQymGi5PcnBV3baEEec0388dIMlxwEuBw7aWF8o5NP82D0l2YFDaZ1XVeePO09MhwNFJjgQeAeya5NNV9Zox5+prPbC+qjb9dXMug+JedNvjVMk/AIcCJHkqsCMNvAtZVX2nqh5bVZNVNcngl+TAraW0h0lyOPAu4OiqunfceYZo+m0eMnhl/ziwrqpOGXeevqrqpKpa0f1+HwN8raHSpnsu3pRk7+6mw4DrRrGubXKLe4gzgDOSXANsBI7byrf+thUfBh4OXNT9xXBJVb15vJFmtw28zcMhwGuB7yS5srvt3VX1pTFm2l4cD5zVveDfALxhFCvxlHdJasz2OFUiSU2zuCWpMRa3JDXG4pakxljcktQYi1uSGmNxS1Jj/h9SWeb4Qy3j+gAAAABJRU5ErkJggg==\n", 177 | "text/plain": [ 178 | "
" 179 | ] 180 | }, 181 | "metadata": {}, 182 | "output_type": "display_data" 183 | } 184 | ], 185 | "source": [ 186 | "plt.hist(xyz_avg[:,0])\n", 187 | "plt.title('Average $x(t)$');" 188 | ] 189 | }, 190 | { 191 | "cell_type": "code", 192 | "execution_count": 9, 193 | "metadata": {}, 194 | "outputs": [ 195 | { 196 | "data": { 197 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4EDghKq6NMkpwErgw31OuE2pqpfP9VySdwLnDov6siQPMbigzfrFyrc5c2VP8gLgmcBVSWCw1HB5koOr6o5FjDinzX3dAZIcD7wGOHxr+UW5Gc1e5iHJDgxK+8yqOnfSeebhEODoJK8GngDsluSMqnrLhHN1sQ5YV1Ub/7o5h0Fx92Z7Wyr5R+AwgCTPAXakgauQVdUPq+rJVTVdVdMMvlEO3FpKe5wkRwDvB46uql9NOk8HTV7mIYPf6l8A1lbVX006z3xU1Qeqas/h9/cxwHcaKW2GP4e3JNln+NDhwHV9zrnNbXGPcRpwWpJrgA3A8Q1s/W0LPgs8Hrhw+BfDJVX1J5ONNLeGL/NwCPBW4IdJrhw+9sGq+sYEM20vTgDOHP6ivwl4e5+Tecq7JDVme1sqkaTmWdyS1BiLW5IaY3FLUmMsbklqjMUtSY2xuCWpMf8PImZgVJ0RSz8AAAAASUVORK5CYII=\n", 198 | "text/plain": [ 199 | "
" 200 | ] 201 | }, 202 | "metadata": {}, 203 | "output_type": "display_data" 204 | } 205 | ], 206 | "source": [ 207 | "plt.hist(xyz_avg[:,1])\n", 208 | "plt.title('Average $y(t)$');" 209 | ] 210 | } 211 | ], 212 | "metadata": { 213 | "kernelspec": { 214 | "display_name": "Python 3", 215 | "language": "python", 216 | "name": "python3" 217 | }, 218 | "language_info": { 219 | "codemirror_mode": { 220 | "name": "ipython", 221 | "version": 3 222 | }, 223 | "file_extension": ".py", 224 | "mimetype": "text/x-python", 225 | "name": "python", 226 | "nbconvert_exporter": "python", 227 | "pygments_lexer": "ipython3", 228 | "version": "3.6.5" 229 | } 230 | }, 231 | "nbformat": 4, 232 | "nbformat_minor": 2 233 | } 234 | -------------------------------------------------------------------------------- /notebooks/bqplot demo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import bqplot.pyplot as plt" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": 2, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "size = 100\n", 20 | "scale = 100.\n", 21 | "np.random.seed(0)\n", 22 | "x_data = np.arange(size)\n", 23 | "y_data = np.cumsum(np.random.randn(size) * scale)" 24 | ] 25 | }, 26 | { 27 | "cell_type": "code", 28 | "execution_count": 3, 29 | "metadata": {}, 30 | "outputs": [ 31 | { 32 | "name": "stderr", 33 | "output_type": "stream", 34 | "text": [ 35 | "/Users/bussonniermatthias/anaconda/envs/scipy18jlab/lib/python3.6/site-packages/bqplot/pyplot.py:603: FutureWarning: Conversion of the second argument of issubdtype from `str` to `str` is deprecated. In future, it will be treated as `np.str_ == np.dtype(str).type`.\n", 36 | " issubdtype(dtype, Scale.scale_types[key].dtype)\n" 37 | ] 38 | }, 39 | { 40 | "data": { 41 | "application/vnd.jupyter.widget-view+json": { 42 | "model_id": "21f2d6c2a3c14d5296cc8c8391d6124a", 43 | "version_major": 2, 44 | "version_minor": 0 45 | }, 46 | "text/plain": [ 47 | "Figure(axes=[Axis(scale=LinearScale()), Axis(orientation='vertical', scale=LinearScale())], fig_margin={'top':…" 48 | ] 49 | }, 50 | "metadata": {}, 51 | "output_type": "display_data" 52 | } 53 | ], 54 | "source": [ 55 | "fig = plt.figure(title='First Example')\n", 56 | "plt.plot(y_data)\n", 57 | "fig" 58 | ] 59 | }, 60 | { 61 | "cell_type": "code", 62 | "execution_count": 4, 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [ 66 | "dates = np.arange('2005-02', '2005-03', dtype='datetime64[D]')\n", 67 | "size = len(dates)\n", 68 | "prices = scale + 5 * np.cumsum(np.random.randn(size))" 69 | ] 70 | }, 71 | { 72 | "cell_type": "code", 73 | "execution_count": 5, 74 | "metadata": {}, 75 | "outputs": [], 76 | "source": [ 77 | "import ipyvolume.pylab as p3\n", 78 | "import numpy as np" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 6, 84 | "metadata": {}, 85 | "outputs": [ 86 | { 87 | "data": { 88 | "application/vnd.jupyter.widget-view+json": { 89 | "model_id": "8dcdd5d482f14e5987931fd81b090ab6", 90 | "version_major": 2, 91 | "version_minor": 0 92 | }, 93 | "text/plain": [ 94 | "VBox(children=(Figure(camera_center=[0.0, 0.0, 0.0], height=500, matrix_projection=[0.0, 0.0, 0.0, 0.0, 0.0, 0…" 95 | ] 96 | }, 97 | "metadata": {}, 98 | "output_type": "display_data" 99 | }, 100 | { 101 | "data": { 102 | "application/vnd.jupyter.widget-view+json": { 103 | "model_id": "3496c5ad11f84073b93997326848a292", 104 | "version_major": 2, 105 | "version_minor": 0 106 | }, 107 | "text/plain": [ 108 | "Mesh(texture=None, triangles=array([[ 0, 40, 41],\n", 109 | " [ 0, 41, 1],\n", 110 | " [ 1, 41, 42],\n", 111 | "…" 112 | ] 113 | }, 114 | "metadata": {}, 115 | "output_type": "display_data" 116 | } 117 | ], 118 | "source": [ 119 | "p3.examples.klein_bottle()\n" 120 | ] 121 | }, 122 | { 123 | "cell_type": "code", 124 | "execution_count": 7, 125 | "metadata": {}, 126 | "outputs": [ 127 | { 128 | "name": "stderr", 129 | "output_type": "stream", 130 | "text": [ 131 | "/Users/bussonniermatthias/anaconda/envs/scipy18jlab/lib/python3.6/site-packages/bqplot/pyplot.py:603: FutureWarning: Conversion of the second argument of issubdtype from `str` to `str` is deprecated. In future, it will be treated as `np.str_ == np.dtype(str).type`.\n", 132 | " issubdtype(dtype, Scale.scale_types[key].dtype)\n" 133 | ] 134 | }, 135 | { 136 | "data": { 137 | "application/vnd.jupyter.widget-view+json": { 138 | "model_id": "ec940529bf8d411db95690aa0f7fa4cf", 139 | "version_major": 2, 140 | "version_minor": 0 141 | }, 142 | "text/plain": [ 143 | "Figure(axes=[Axis(label='Date', scale=DateScale(), tick_format='%m/%d'), Axis(label='Price', orientation='vert…" 144 | ] 145 | }, 146 | "metadata": {}, 147 | "output_type": "display_data" 148 | } 149 | ], 150 | "source": [ 151 | "fig = plt.figure(title='Changing Styles', background_style={'fill': 'lightgreen'},\n", 152 | " title_style={'font-size': '20px','fill': 'DarkOrange'})\n", 153 | "axes_options = {'x': {'label': 'Date', 'tick_format': '%m/%d'},\n", 154 | " 'y': {'label': 'Price', 'tick_format': '0.0f'}}\n", 155 | "plt.plot(dates, prices, 'b', axes_options=axes_options) # third argument is the marker string\n", 156 | "fig" 157 | ] 158 | }, 159 | { 160 | "cell_type": "code", 161 | "execution_count": null, 162 | "metadata": {}, 163 | "outputs": [], 164 | "source": [] 165 | } 166 | ], 167 | "metadata": { 168 | "kernelspec": { 169 | "display_name": "Python 3", 170 | "language": "python", 171 | "name": "python3" 172 | }, 173 | "language_info": { 174 | "codemirror_mode": { 175 | "name": "ipython", 176 | "version": 3 177 | }, 178 | "file_extension": ".py", 179 | "mimetype": "text/x-python", 180 | "name": "python", 181 | "nbconvert_exporter": "python", 182 | "pygments_lexer": "ipython3", 183 | "version": "3.6.5" 184 | } 185 | }, 186 | "nbformat": 4, 187 | "nbformat_minor": 2 188 | } 189 | -------------------------------------------------------------------------------- /notebooks/lorenz.py: -------------------------------------------------------------------------------- 1 | from matplotlib import pyplot as plt 2 | from mpl_toolkits.mplot3d import Axes3D 3 | import numpy as np 4 | from scipy import integrate 5 | 6 | def solve_lorenz(sigma=10.0, beta=8./3, rho=28.0): 7 | """Plot a solution to the Lorenz differential equations.""" 8 | 9 | max_time = 4.0 10 | N = 30 11 | 12 | fig = plt.figure() 13 | ax = fig.add_axes([0, 0, 1, 1], projection='3d') 14 | ax.axis('off') 15 | 16 | # prepare the axes limits 17 | ax.set_xlim((-25, 25)) 18 | ax.set_ylim((-35, 35)) 19 | ax.set_zlim((5, 55)) 20 | 21 | def lorenz_deriv(x_y_z, t0, sigma=sigma, beta=beta, rho=rho): 22 | """Compute the time-derivative of a Lorenz system.""" 23 | x, y, z = x_y_z 24 | return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z] 25 | 26 | # Choose random starting points, uniformly distributed from -15 to 15 27 | np.random.seed(1) 28 | x0 = -15 + 30 * np.random.random((N, 3)) 29 | 30 | # Solve for the trajectories 31 | t = np.linspace(0, max_time, int(250*max_time)) 32 | x_t = np.asarray([integrate.odeint(lorenz_deriv, x0i, t) 33 | for x0i in x0]) 34 | 35 | # choose a different color for each trajectory 36 | colors = plt.cm.viridis(np.linspace(0, 1, N)) 37 | 38 | for i in range(N): 39 | x, y, z = x_t[i,:,:].T 40 | lines = ax.plot(x, y, z, '-', c=colors[i]) 41 | plt.setp(lines, linewidth=2) 42 | angle = 104 43 | ax.view_init(30, angle) 44 | plt.show() 45 | 46 | return t, x_t -------------------------------------------------------------------------------- /outline.md: -------------------------------------------------------------------------------- 1 | # Outline 2 | 3 | **These notes are for the presenters.** 4 | 5 | For the last two years the Jupyter team has been working on the new Jupyter 6 | frontend: JupyterLab. While JupyterLab does of course allow the use of Jupyter 7 | Notebooks, it goes beyond the classic Jupyter Notebook by providing a flexible 8 | and extensible web application with a set of reusable components. Users can 9 | arrange multiple notebooks, text editors, terminals, output areas, and custom 10 | components using tabs and collapsible sidebars. These components are carefully 11 | designed to enable the user to use them together or separately (for example, a 12 | user can send code from a file to a console with a keystroke, or can pop out an 13 | output from a notebook to work with it alone). 14 | 15 | JupyterLab is based on a flexible application plugin system provided by 16 | PhosphorJS that makes it easy to customize existing components or extend it 17 | with new components. For example, users can install or write third-party 18 | plugins to view custom file formats, such as GeoJSON, interact with external 19 | services, such as Dask or Apache Spark, or display their data in effective and 20 | useful ways, such as interactive maps, tables, or plots. 21 | 22 | In this tutorial we’ll walk users thought the best way to make use of 23 | JupyterLab, how to transition from the “classic” Jupyter Notebook frontend to 24 | JupyterLab, and how to make the best use of the new powerful features of 25 | JupyterLab. 26 | 27 | 28 | You (should) be provided with red and green sticky notes. If you have any 29 | question and concern or need help, stick the red sticky note visible on back of 30 | your laptop's screen. A helper will come see you, or the speaker will take time 31 | to get questions. 32 | 33 | If all is fine, or we're too slow for you, stick the green sticky note to the 34 | back of your laptop screen. 35 | 36 | At each break, write a thing you understood of liked on the green sticky note, 37 | a thing you did not like or found hard on the red one. When exiting the room, 38 | stick them to the door frame. Make sure to get new sticky notes for the next 39 | section. 40 | 41 | This can serve as a quick read through summary of what we talked about (with 42 | links) and a rough timeline if you want to follow up on the video later. 43 | 44 | ## Overview of JupyterLab 45 | 46 | ### 8-8:10 (10 min) - introduction 47 | 48 | Today this tutorial will be presented to you by Jason Grout, and Matthias 49 | Bussonnier, two long standing members of the Jupyter Project. We have a number 50 | of helpers in the room. Attendees should have been given red/green 51 | sticky notes. 52 | 53 | By now you should have installed JupyterLab following the instructions in the 54 | readme. For this tutorial, we are standardizing on a conda-based python 55 | distribution (miniconda or Anaconda). We may not be able to help with 56 | installation issues if you are using a different python distribution. 57 | 58 | JupyterLab is in beta and that first time impression 59 | are critical to usability of JupyterLab. We will show you what can be done, but 60 | can still improve the usability quite a bit. When trying to do any task in the 61 | exercise try to think first: 62 | - How would I do that 63 | - Then try to do the task. 64 | - Note what was intuitive, and what surprised you. 65 | - Tell it to us (via post it or issues) 66 | - Feel free to interrupt with questions and clarification 67 | 68 | 69 | - There will likely be a binder available, but do not rely on the conference 70 | wifi. 71 | 72 | ### JASON 8:10-8:25 (15min) 73 | - Introduction to JupyterLab (slides) 74 | 75 | - Respond to FAQ: 76 | - Why JupyterLab ? 77 | - Can you get Lab and notebook at the same time: YES 78 | - No difference in file format; Notebooks files are the same 79 | 80 | ### JASON 8:25-8:45 (20 min): Tour of The User Interface 81 | - Following outline from https://github.com/jupyterlab/jupyterlab-demo/tree/master/narrative or https://gist.github.com/jasongrout/3039b5909734b1abf4544a8df68a8ace 82 | 83 | ### MATTHIAS 8:45-9:05 (20 min): Exercise 1 (and help installation issues if needed): 84 | 85 | Look into the Exercise 1 folder, and follow the instruction in `Exercise-1.md` 86 | 87 | ### 9:05-9:15 (10 min): break 10min + sticky notes 88 | 89 | Write one good thing on the green sticky note, one bad on the red one. 90 | 91 | ### 9:15-9:20 (5 min) : Q.A. 5 min 92 | 93 | ## Workflows around executing code 94 | 95 | ### MATTHIAS 9:20-9:30 (10 min): Minor Notebook UI interface difference - review from Exercise 1 96 | 97 | 1. Arranging tabs through dragging 98 | 2. How to author markdown and equations 99 | 3. Collapsible cells 100 | 4. drag cells, inside notebook and between views of files. 101 | 5. Enable scrolling on outputs 102 | 6. creating new view of outputs 103 | 7. javascript rendering restrictions (removed in the next beta) 104 | 105 | ### MATTHIAS 9:30-9:45 (15 min): Attaching kernels to multiple documents 106 | 107 | 1. Executing code in a markdown file using an attached console. 108 | 2. Developing libraries with notebook and Python files attached to same kernel 109 | 3. Reloading modules? 110 | 4. Create terminal, work with terminal next to code file and console. Maybe using ipython in terminal. 111 | 5. Attaching a code console to the same kernel as a notebook. 112 | 113 | 114 | ### MATTHIAS 9:45-10:10 (15 min) Exercise 2 115 | 116 | - binding multiple documents to the same kernel 117 | - New Console for Notebook 118 | - Markdown file + console workflow 119 | - Python code file + console workflow 120 | - Open a notebook in classic notebook, modify, save and reopen in Lab. 121 | 122 | ### 10:10-10:25 (15min) break 10 min + sticky notes + Q.A 5min 123 | 124 | 125 | ## Customizing JupyterLab 126 | 127 | ### MATTHIAS 10:25-10:35 (10min) 128 | 129 | 1. Changing editor settings 130 | 2. Changing theme 131 | 3. Json config system overview 132 | 4. Changing keyboard shortcuts 133 | 134 | ### Exercise 3 10:35-10:50 (15 min) 135 | 1. change a keyboard shortcut 136 | 1. Assign existing shortcut to new action. 137 | 2. Assign new Keyboard shortcut to an existing action. 138 | 2. add a keyboard shortcut (restart and run all) 139 | 3. change an editor setting 140 | 141 | ## Extensions (10:50-11:30, 35 min) 142 | 143 | 1. Everything is an extension - show the package.json 144 | 2. Installing/listing/enabling/disabling plugins. `jupyter lab build` 145 | 3. `--core-mode` 146 | 4. Exercise 5 - writing your own extension 147 | 148 | ## What's new (11:30-11:40) 149 | 150 | JupyterLab 0.33 prerelease out: 151 | - Workspaces 152 | - Extension manager 153 | - Console show outputs 154 | - Open in new browser tab 155 | - Longer tabs 156 | - Many, many upgrades 157 | 158 | Extensions in the works: 159 | - Keyboard shortcut editor 160 | - Status bar 161 | - Real-time collaboration 162 | 163 | 164 | ## Mention JupyterLab in a multiuser environment: point to jupyterlab docs 165 | ## Mention sprints! 166 | ## 11:40-12:00 QA, Question 167 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # SciPy 2018 JupyterLab tutorial. 2 | 3 | This repository contain material and instructions to follow the "Getting started with JupyterLab" tutorial during SciPy 2018. 4 | 5 | During the tutorial, feel free to get on the `jupyterlab` channel of https://scipy2018.slack.com/ for help and updates. 6 | 7 | # Installation 8 | 9 | Please read the following section and install the required software ahead of 10 | time. We may ask you to update versions of the software more closely to the 11 | tutorial date. 12 | 13 | Please do not rely on cloud hosting to follow this tutorial, as the network 14 | connection may be unreliable. If possible, come to the tutorial with a computer 15 | where you have administrative privileges. 16 | 17 | For this tutorial, we are standardizing on a conda-based python distribution 18 | (miniconda or Anaconda). We may not be able to help with installation issues if 19 | you are using a different python distribution. 20 | 21 | ## Software installation 22 | 23 | 1. Install either the full [anaconda 24 | distribution](https://www.anaconda.com/download/) (very large, includes lots 25 | of conda packages by default) or 26 | [miniconda](https://conda.io/miniconda.html) (much smaller, with only 27 | essential packages by default, but any conda package can be installed). 28 | 29 | 2. To get the tutorial materials, clone this repository. **Please plan to update the materials shortly before the tutorial.** 30 | 31 | ``` 32 | git clone https://github.com/jupyterlab/scipy2018-jupyterlab-tutorial 33 | ``` 34 | 35 | To update the materials: 36 | ``` 37 | cd scipy2018-jupyterlab-tutorial 38 | git pull 39 | ``` 40 | 41 | Feel free to open an issue or send a pull request to update these materials if things are unclear. 42 | 43 | 3. Set up your environment. 44 | 45 | Create a conda environment: 46 | 47 | ``` 48 | conda create -n scipy18jlab -c conda-forge --override-channels --yes python=3.6 pip cookiecutter=1.6 notebook=5.5 pandas=0.23 nodejs=9.11 jupyterlab bqplot ipyvolume pythreejs 49 | ``` 50 | 51 | (You could instead create the environment from the supplied environment file with `conda env create -f scipy2018-jupyterlab-tutorial/environment.yml`) 52 | 53 | Activate the conda environment: 54 | 55 | ``` 56 | conda activate scipy18jlab 57 | ``` 58 | 59 | Install extra JupyterLab extensions: 60 | 61 | ``` 62 | jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-threejs ipyvolume bqplot @jupyterlab/geojson-extension @jupyterlab/fasta-extension 63 | ``` 64 | 65 | If you open multiple terminal windows make sure to activate the environment in each of them. Your terminal prompt should be preceded by the name of the current environment, for example: 66 | ``` 67 | (scipy18jlab) ~/scipy2018-jupyterlab-tutorial $ 68 | ``` 69 | 70 | 71 | ## Starting JupyterLab 72 | 73 | Enter the following command in a new terminal window to start JupyterLab. 74 | 75 | ``` 76 | $ jupyter lab 77 | ``` 78 | 79 | ## Removing environment 80 | 81 | You can delete the environment by using the following in a terminal prompt. 82 | 83 | ``` 84 | conda env remove --name scipy18jlab --yes 85 | ``` 86 | 87 | This will **not** delete any data, but only the conda environement named `scipy18jlab` . 88 | 89 | # Optional packages 90 | 91 | We are demonstrating a few packages not installed in the above lists. These are 92 | optional, and not required for the exercises in this tutorial. 93 | 94 | To install these, first activate the tutorial environment: 95 | 96 | ``` 97 | conda activate scipy18jlab 98 | ``` 99 | 100 | Then install the python packages: 101 | ``` 102 | conda install -c conda-forge --override-channels --yes ipyleaflet ipympl 103 | pip install sidecar 104 | ``` 105 | 106 | and install the JupyterLab extensions: 107 | ``` 108 | jupyter labextension install jupyterlab-toc jupyter-leaflet @jupyter-widgets/jupyterlab-sidecar jupyterlab-drawio 109 | ``` 110 | 111 | # Troubleshooting 112 | 113 | If you experience an out-of-memory error, you can increase the memory available: 114 | ``` 115 | NODE_OPTIONS=--max_old_space_size=4096 jupyter lab build 116 | ``` 117 | or 118 | ``` 119 | NODE_OPTIONS=--max_old_space_size=4096 jupyter labextension install ... 120 | ``` 121 | This increases the available memory for the build process to 4Gb. 122 | -------------------------------------------------------------------------------- /scipy_cert/.gitignore: -------------------------------------------------------------------------------- 1 | *.bundle.* 2 | lib/ 3 | node_modules/ 4 | *.egg-info/ 5 | -------------------------------------------------------------------------------- /scipy_cert/README.md: -------------------------------------------------------------------------------- 1 | # Scipy Certificate 2 | 3 | SciPy Certificate extension 4 | 5 | 6 | ## Prerequisites 7 | 8 | * JupyterLab 9 | 10 | ## Installation 11 | 12 | ```bash 13 | jupyter labextension install scipy_cert 14 | ``` 15 | 16 | ## Development 17 | 18 | For a development install (requires npm version 4 or later), do the following in the repository directory: 19 | 20 | ```bash 21 | npm install 22 | jupyter labextension link . 23 | ``` 24 | 25 | To rebuild the package and the JupyterLab app: 26 | 27 | ```bash 28 | npm run build 29 | jupyter lab build 30 | ``` 31 | 32 | ## Example file. 33 | 34 | The extension renders file with `.json` or `.cert.json` extension, that have the `given` and `event` field. 35 | Example: 36 | 37 | ``` 38 | { 39 | "given": "John Hunter", 40 | "event": "SciPy 2012" 41 | } 42 | ``` 43 | -------------------------------------------------------------------------------- /scipy_cert/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scipy_cert", 3 | "version": "0.1.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@jupyterlab/rendermime-interfaces": { 8 | "version": "1.0.10", 9 | "resolved": "https://registry.npmjs.org/@jupyterlab/rendermime-interfaces/-/rendermime-interfaces-1.0.10.tgz", 10 | "integrity": "sha512-qApoEHdWmPtyBrvqQras478Nprgyw6Gk7PHT9c5W8lS4eJdNJKsi3zovkeRkUbcFdd2VBgDj/2fzxFMu6DnMUw==", 11 | "requires": { 12 | "@phosphor/coreutils": "1.3.0", 13 | "@phosphor/widgets": "1.5.0" 14 | } 15 | }, 16 | "@phosphor/algorithm": { 17 | "version": "1.1.2", 18 | "resolved": "https://registry.npmjs.org/@phosphor/algorithm/-/algorithm-1.1.2.tgz", 19 | "integrity": "sha1-/R3pEEyafzTpKGRYbd8ufy53eeg=" 20 | }, 21 | "@phosphor/collections": { 22 | "version": "1.1.2", 23 | "resolved": "https://registry.npmjs.org/@phosphor/collections/-/collections-1.1.2.tgz", 24 | "integrity": "sha1-xMC4uREpkF+zap8kPy273kYtq40=", 25 | "requires": { 26 | "@phosphor/algorithm": "1.1.2" 27 | } 28 | }, 29 | "@phosphor/commands": { 30 | "version": "1.4.0", 31 | "resolved": "https://registry.npmjs.org/@phosphor/commands/-/commands-1.4.0.tgz", 32 | "integrity": "sha1-fiNqTAFdrzepWG/eKRiMPawgFi8=", 33 | "requires": { 34 | "@phosphor/algorithm": "1.1.2", 35 | "@phosphor/coreutils": "1.3.0", 36 | "@phosphor/disposable": "1.1.2", 37 | "@phosphor/domutils": "1.1.2", 38 | "@phosphor/keyboard": "1.1.2", 39 | "@phosphor/signaling": "1.2.2" 40 | } 41 | }, 42 | "@phosphor/coreutils": { 43 | "version": "1.3.0", 44 | "resolved": "https://registry.npmjs.org/@phosphor/coreutils/-/coreutils-1.3.0.tgz", 45 | "integrity": "sha1-YyktOBwBLFqw0Blug87YKbfgSkI=" 46 | }, 47 | "@phosphor/disposable": { 48 | "version": "1.1.2", 49 | "resolved": "https://registry.npmjs.org/@phosphor/disposable/-/disposable-1.1.2.tgz", 50 | "integrity": "sha1-oZLdai5sadXQnTns8zTauTd4Bg4=", 51 | "requires": { 52 | "@phosphor/algorithm": "1.1.2" 53 | } 54 | }, 55 | "@phosphor/domutils": { 56 | "version": "1.1.2", 57 | "resolved": "https://registry.npmjs.org/@phosphor/domutils/-/domutils-1.1.2.tgz", 58 | "integrity": "sha1-4u/rBS85jEK5O4npurJq8VzABRQ=" 59 | }, 60 | "@phosphor/dragdrop": { 61 | "version": "1.3.0", 62 | "resolved": "https://registry.npmjs.org/@phosphor/dragdrop/-/dragdrop-1.3.0.tgz", 63 | "integrity": "sha1-fOatOdbKIW1ipW94EE0Cp3rmcwc=", 64 | "requires": { 65 | "@phosphor/coreutils": "1.3.0", 66 | "@phosphor/disposable": "1.1.2" 67 | } 68 | }, 69 | "@phosphor/keyboard": { 70 | "version": "1.1.2", 71 | "resolved": "https://registry.npmjs.org/@phosphor/keyboard/-/keyboard-1.1.2.tgz", 72 | "integrity": "sha1-PjIjRFF2QkCpjhSANNWoeXQi3R8=" 73 | }, 74 | "@phosphor/messaging": { 75 | "version": "1.2.2", 76 | "resolved": "https://registry.npmjs.org/@phosphor/messaging/-/messaging-1.2.2.tgz", 77 | "integrity": "sha1-fYlt3TeXuUo0dwje0T2leD23XBQ=", 78 | "requires": { 79 | "@phosphor/algorithm": "1.1.2", 80 | "@phosphor/collections": "1.1.2" 81 | } 82 | }, 83 | "@phosphor/properties": { 84 | "version": "1.1.2", 85 | "resolved": "https://registry.npmjs.org/@phosphor/properties/-/properties-1.1.2.tgz", 86 | "integrity": "sha1-eMx37/RSg52gIlXeSOgUlGzAmig=" 87 | }, 88 | "@phosphor/signaling": { 89 | "version": "1.2.2", 90 | "resolved": "https://registry.npmjs.org/@phosphor/signaling/-/signaling-1.2.2.tgz", 91 | "integrity": "sha1-P8+Xyojji/s1f+j+a/dRM0elFKk=", 92 | "requires": { 93 | "@phosphor/algorithm": "1.1.2" 94 | } 95 | }, 96 | "@phosphor/virtualdom": { 97 | "version": "1.1.2", 98 | "resolved": "https://registry.npmjs.org/@phosphor/virtualdom/-/virtualdom-1.1.2.tgz", 99 | "integrity": "sha1-zlXIbu8x5dDiax3JbqMr1oRFj0E=", 100 | "requires": { 101 | "@phosphor/algorithm": "1.1.2" 102 | } 103 | }, 104 | "@phosphor/widgets": { 105 | "version": "1.5.0", 106 | "resolved": "https://registry.npmjs.org/@phosphor/widgets/-/widgets-1.5.0.tgz", 107 | "integrity": "sha1-X5mOhvX9542KpE19wUdobKZhaB4=", 108 | "requires": { 109 | "@phosphor/algorithm": "1.1.2", 110 | "@phosphor/commands": "1.4.0", 111 | "@phosphor/coreutils": "1.3.0", 112 | "@phosphor/disposable": "1.1.2", 113 | "@phosphor/domutils": "1.1.2", 114 | "@phosphor/dragdrop": "1.3.0", 115 | "@phosphor/keyboard": "1.1.2", 116 | "@phosphor/messaging": "1.2.2", 117 | "@phosphor/properties": "1.1.2", 118 | "@phosphor/signaling": "1.2.2", 119 | "@phosphor/virtualdom": "1.1.2" 120 | } 121 | }, 122 | "balanced-match": { 123 | "version": "1.0.0", 124 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 125 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 126 | "dev": true 127 | }, 128 | "brace-expansion": { 129 | "version": "1.1.11", 130 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 131 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 132 | "dev": true, 133 | "requires": { 134 | "balanced-match": "1.0.0", 135 | "concat-map": "0.0.1" 136 | } 137 | }, 138 | "concat-map": { 139 | "version": "0.0.1", 140 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 141 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 142 | "dev": true 143 | }, 144 | "fs.realpath": { 145 | "version": "1.0.0", 146 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 147 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 148 | "dev": true 149 | }, 150 | "glob": { 151 | "version": "7.1.2", 152 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", 153 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", 154 | "dev": true, 155 | "requires": { 156 | "fs.realpath": "1.0.0", 157 | "inflight": "1.0.6", 158 | "inherits": "2.0.3", 159 | "minimatch": "3.0.4", 160 | "once": "1.4.0", 161 | "path-is-absolute": "1.0.1" 162 | } 163 | }, 164 | "inflight": { 165 | "version": "1.0.6", 166 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 167 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 168 | "dev": true, 169 | "requires": { 170 | "once": "1.4.0", 171 | "wrappy": "1.0.2" 172 | } 173 | }, 174 | "inherits": { 175 | "version": "2.0.3", 176 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 177 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 178 | "dev": true 179 | }, 180 | "minimatch": { 181 | "version": "3.0.4", 182 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 183 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 184 | "dev": true, 185 | "requires": { 186 | "brace-expansion": "1.1.11" 187 | } 188 | }, 189 | "once": { 190 | "version": "1.4.0", 191 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 192 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 193 | "dev": true, 194 | "requires": { 195 | "wrappy": "1.0.2" 196 | } 197 | }, 198 | "path-is-absolute": { 199 | "version": "1.0.1", 200 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 201 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 202 | "dev": true 203 | }, 204 | "rimraf": { 205 | "version": "2.6.2", 206 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", 207 | "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", 208 | "dev": true, 209 | "requires": { 210 | "glob": "7.1.2" 211 | } 212 | }, 213 | "typescript": { 214 | "version": "2.9.2", 215 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", 216 | "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", 217 | "dev": true 218 | }, 219 | "wrappy": { 220 | "version": "1.0.2", 221 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 222 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 223 | "dev": true 224 | } 225 | } 226 | } 227 | -------------------------------------------------------------------------------- /scipy_cert/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scipy_cert", 3 | "version": "0.1.0", 4 | "description": "A JupyterLab extension for rendering cert", 5 | "author": "matthias bussonnier ", 6 | "main": "lib/index.js", 7 | "keywords": [ 8 | "jupyter", 9 | "jupyterlab", 10 | "jupyterlab-extension" 11 | ], 12 | "files": [ 13 | "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}", 14 | "style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}", 15 | "style/*.css" 16 | ], 17 | "jupyterlab": { 18 | "mimeExtension": true 19 | }, 20 | "scripts": { 21 | "build": "tsc", 22 | "prepare": "npm run build", 23 | "watch": "tcs -w", 24 | "extension:install": "jupyter labextension install scipy_cert", 25 | "extension:uninstall": "jupyter labextension uninstall scipy_cert", 26 | "extension:enable": "jupyter labextension enable scipy_cert", 27 | "extension:disable": "jupyter labextension disable scipy_cert" 28 | }, 29 | "dependencies": { 30 | "@jupyterlab/rendermime-interfaces": "^1.0.0", 31 | "@phosphor/widgets": "^1.5.0" 32 | }, 33 | "devDependencies": { 34 | "rimraf": "^2.6.2", 35 | "typescript": "~2.9.2" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /scipy_cert/scipy2018.cert.json: -------------------------------------------------------------------------------- 1 | {"given": "My Name", "event": "Scipy 2018"} -------------------------------------------------------------------------------- /scipy_cert/src/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | IRenderMime 3 | } from '@jupyterlab/rendermime-interfaces'; 4 | 5 | import { 6 | JSONObject 7 | } from '@phosphor/coreutils'; 8 | 9 | import { 10 | Widget 11 | } from '@phosphor/widgets'; 12 | 13 | import '../style/index.css'; 14 | 15 | 16 | /** 17 | * The default mime type for the extension. 18 | */ 19 | const MIME_TYPE = 'application/vnd.scipy2018.certificate'; 20 | 21 | /** 22 | * The class name added to the extension. 23 | */ 24 | const CLASS_NAME = 'jp-OutputWidgetcert'; 25 | 26 | 27 | /** 28 | * A widget for rendering cert. 29 | */ 30 | export 31 | class OutputWidget extends Widget implements IRenderMime.IRenderer { 32 | /** 33 | * Construct a new output widget. 34 | */ 35 | constructor(options: IRenderMime.IRendererOptions) { 36 | super(); 37 | this._mimeType = options.mimeType; 38 | this.addClass(CLASS_NAME); 39 | } 40 | 41 | /** 42 | * Render cert into this widget's node. 43 | */ 44 | renderModel(model: IRenderMime.IMimeModel): Promise { 45 | let mod = model.data[this._mimeType] as JSONObject; 46 | let given = mod['given']; 47 | let ev = mod['event']; 48 | 49 | this.node.innerHTML = ` 50 |
51 |
52 |
Certificate
53 |
${given}
54 |
For mastery of JupyterLab
55 |
${ev}
56 |
57 |
58 |
59 |
60 |
61 | ` 62 | 63 | //JSON.stringify(model.data[this._mimeType]); 64 | return Promise.resolve(void 0); 65 | } 66 | 67 | private _mimeType: string; 68 | } 69 | 70 | 71 | /** 72 | * A mime renderer factory for cert data. 73 | */ 74 | export 75 | const rendererFactory: IRenderMime.IRendererFactory = { 76 | safe: true, 77 | mimeTypes: [MIME_TYPE], 78 | createRenderer: options => new OutputWidget(options) 79 | }; 80 | 81 | console.log('CERT EXt') 82 | const extension: IRenderMime.IExtension = { 83 | id: 'scipy_cert:plugin', 84 | rendererFactory, 85 | rank: 0, 86 | dataType: 'json', 87 | fileTypes: [{ 88 | name: 'jsoncert', 89 | mimeTypes: [MIME_TYPE], 90 | extensions: ['.json', '.cert.json'], 91 | }], 92 | documentWidgetFactoryOptions: { 93 | name: 'CertViewer', 94 | primaryFileType: 'jsoncert', 95 | fileTypes: ['jsoncert', 'json'], 96 | defaultFor: ['jsoncert'] 97 | } 98 | }; 99 | 100 | export default extension; 101 | 102 | -------------------------------------------------------------------------------- /scipy_cert/style/index.css: -------------------------------------------------------------------------------- 1 | 2 | .cert{ 3 | background-color: #07618B; 4 | width: 350px;height: 250px; 5 | margin-left: 35%;margin-top: 10%; 6 | position: relative; 7 | border-radius: 20px 20px 20px 20px; 8 | -webkit-box-shadow: 0px 5px 10px 0px; 9 | -moz-box-shadow: 0px 5px 10px 0px; 10 | box-shadow: 0px 5px 10px 0px; 11 | } 12 | 13 | .paper{ 14 | position: absolute; 15 | width: 300px; 16 | height: 200px; 17 | background: #E0E0E0; 18 | left: 25px; 19 | top: 25px; 20 | border-radius: 5px 5px 5px 5px; 21 | } 22 | 23 | .cert .medal { 24 | background: #C9992E; 25 | width: 20px; 26 | height: 20px; 27 | top: 30px; 28 | left: 30px; 29 | position: absolute; 30 | padding: 10px 10px 10px 10px; 31 | font-size: 2em; 32 | border-radius: 50%; 33 | z-index:30; 34 | } 35 | 36 | .ribbon1 { 37 | width: 15px; 38 | height: 40px; 39 | background-color: #9bdbf6; 40 | position: absolute; 41 | top: 50px; 42 | left: 35px; 43 | z-index: 1; 44 | -webkit-transform: rotate(30deg); 45 | border-right: 1px solid white; 46 | } 47 | .ribbon2 { 48 | width: 15px; 49 | height: 40px; 50 | background-color: #9bdbf6; 51 | position: absolute; 52 | top: 50px; 53 | left: 50px; 54 | z-index: 1; 55 | -webkit-transform: rotate(150deg); 56 | border-right: 1px solid white; 57 | } 58 | 59 | .title { 60 | background:#E0E0E0; 61 | font-weight: bold; 62 | text-align: center; 63 | margin-top: 20px; 64 | height: 30px; 65 | z-index:999; 66 | } 67 | 68 | .textX { 69 | z-index: 200; 70 | text-align: center; 71 | padding: 0px; 72 | text-align: center; 73 | margin-top: 20px; 74 | } 75 | 76 | .text2 { 77 | background-color: #E0E0E0; 78 | z-index: 200; 79 | padding: 0px 200px; 80 | text-align: center; 81 | margin-left: 50px; 82 | } 83 | 84 | .text3 { 85 | background-color: #B3B3B3; 86 | z-index: 200; 87 | padding: 0px 200px; 88 | text-align: center; 89 | margin-left: 50px; 90 | } 91 | 92 | -------------------------------------------------------------------------------- /scipy_cert/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "lib": ["es2015", "dom"], 5 | "module": "commonjs", 6 | "moduleResolution": "node", 7 | "noEmitOnError": true, 8 | "noUnusedLocals": true, 9 | "outDir": "./lib", 10 | "strict": true, 11 | "target": "es2015", 12 | "types": [] 13 | }, 14 | "include": ["src/*"] 15 | } 16 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | conda env create -f environment.yml 2 | 3 | conda activate scipy18jlab 4 | 5 | NODE_OPTIONS=--max_old_space_size=4096 jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-threejs ipyvolume bqplot @jupyterlab/geojson-extension @jupyterlab/fasta-extension 6 | 7 | # Optional extensions 8 | 9 | conda install -c conda-forge --override-channels --yes ipyleaflet ipympl 10 | pip install sidecar 11 | NODE_OPTIONS=--max_old_space_size=4096 jupyter labextension install jupyterlab-toc jupyter-leaflet @jupyter-widgets/jupyterlab-sidecar jupyterlab-drawio 12 | --------------------------------------------------------------------------------