|
398 | 398 | "\n", |
399 | 399 | "dj.Diagram(schema)" |
400 | 400 | ] |
| 401 | + }, |
| 402 | + { |
| 403 | + "cell_type": "code", |
| 404 | + "execution_count": 5, |
| 405 | + "metadata": {}, |
| 406 | + "outputs": [ |
| 407 | + { |
| 408 | + "data": { |
| 409 | + "text/html": [ |
| 410 | + "\n", |
| 411 | + " \n", |
| 412 | + " <style type=\"text/css\">\n", |
| 413 | + " .Table{\n", |
| 414 | + " border-collapse:collapse;\n", |
| 415 | + " }\n", |
| 416 | + " .Table th{\n", |
| 417 | + " background: #A0A0A0; color: #ffffff; padding:4px; border:#f0e0e0 1px solid;\n", |
| 418 | + " font-weight: normal; font-family: monospace; font-size: 100%;\n", |
| 419 | + " }\n", |
| 420 | + " .Table td{\n", |
| 421 | + " padding:4px; border:#f0e0e0 1px solid; font-size:100%;\n", |
| 422 | + " }\n", |
| 423 | + " .Table tr:nth-child(odd){\n", |
| 424 | + " background: #ffffff;\n", |
| 425 | + " color: #000000;\n", |
| 426 | + " }\n", |
| 427 | + " .Table tr:nth-child(even){\n", |
| 428 | + " background: #f3f1ff;\n", |
| 429 | + " color: #000000;\n", |
| 430 | + " }\n", |
| 431 | + " /* Tooltip container */\n", |
| 432 | + " .djtooltip {\n", |
| 433 | + " }\n", |
| 434 | + " /* Tooltip text */\n", |
| 435 | + " .djtooltip .djtooltiptext {\n", |
| 436 | + " visibility: hidden;\n", |
| 437 | + " width: 120px;\n", |
| 438 | + " background-color: black;\n", |
| 439 | + " color: #fff;\n", |
| 440 | + " text-align: center;\n", |
| 441 | + " padding: 5px 0;\n", |
| 442 | + " border-radius: 6px;\n", |
| 443 | + " /* Position the tooltip text - see examples below! */\n", |
| 444 | + " position: absolute;\n", |
| 445 | + " z-index: 1;\n", |
| 446 | + " }\n", |
| 447 | + " #primary {\n", |
| 448 | + " font-weight: bold;\n", |
| 449 | + " color: black;\n", |
| 450 | + " }\n", |
| 451 | + " #nonprimary {\n", |
| 452 | + " font-weight: normal;\n", |
| 453 | + " color: white;\n", |
| 454 | + " }\n", |
| 455 | + "\n", |
| 456 | + " /* Show the tooltip text when you mouse over the tooltip container */\n", |
| 457 | + " .djtooltip:hover .djtooltiptext {\n", |
| 458 | + " visibility: visible;\n", |
| 459 | + " }\n", |
| 460 | + " </style>\n", |
| 461 | + " \n", |
| 462 | + " <b></b>\n", |
| 463 | + " <div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n", |
| 464 | + " <table border=\"1\" class=\"Table\">\n", |
| 465 | + " <thead> <tr style=\"text-align: right;\"> <th> <div class=\"djtooltip\">\n", |
| 466 | + " <p id=\"primary\">country_id</p>\n", |
| 467 | + " <span class=\"djtooltiptext\"></span>\n", |
| 468 | + " </div></th><th><div class=\"djtooltip\">\n", |
| 469 | + " <p id=\"primary\">year</p>\n", |
| 470 | + " <span class=\"djtooltiptext\"></span>\n", |
| 471 | + " </div></th><th><div class=\"djtooltip\">\n", |
| 472 | + " <p id=\"nonprimary\">population</p>\n", |
| 473 | + " <span class=\"djtooltiptext\"></span>\n", |
| 474 | + " </div></th><th><div class=\"djtooltip\">\n", |
| 475 | + " <p id=\"nonprimary\">gdp</p>\n", |
| 476 | + " <span class=\"djtooltiptext\"></span>\n", |
| 477 | + " </div> </th> </tr> </thead>\n", |
| 478 | + " <tbody> <tr> <td>1</td>\n", |
| 479 | + "<td>1986</td>\n", |
| 480 | + "<td>62644</td>\n", |
| 481 | + "<td>405463417</td></tr><tr><td>1</td>\n", |
| 482 | + "<td>1987</td>\n", |
| 483 | + "<td>61833</td>\n", |
| 484 | + "<td>487602457</td></tr><tr><td>1</td>\n", |
| 485 | + "<td>1988</td>\n", |
| 486 | + "<td>61079</td>\n", |
| 487 | + "<td>596423607</td></tr><tr><td>1</td>\n", |
| 488 | + "<td>1989</td>\n", |
| 489 | + "<td>61032</td>\n", |
| 490 | + "<td>695304363</td></tr><tr><td>1</td>\n", |
| 491 | + "<td>1990</td>\n", |
| 492 | + "<td>62149</td>\n", |
| 493 | + "<td>764887117</td></tr><tr><td>1</td>\n", |
| 494 | + "<td>1991</td>\n", |
| 495 | + "<td>64622</td>\n", |
| 496 | + "<td>872138730</td></tr><tr><td>1</td>\n", |
| 497 | + "<td>1992</td>\n", |
| 498 | + "<td>68235</td>\n", |
| 499 | + "<td>958463200</td></tr><tr><td>1</td>\n", |
| 500 | + "<td>1993</td>\n", |
| 501 | + "<td>72504</td>\n", |
| 502 | + "<td>1082979708</td></tr><tr><td>1</td>\n", |
| 503 | + "<td>1994</td>\n", |
| 504 | + "<td>76700</td>\n", |
| 505 | + "<td>1245688253</td></tr><tr><td>1</td>\n", |
| 506 | + "<td>1995</td>\n", |
| 507 | + "<td>80324</td>\n", |
| 508 | + "<td>1320474860</td></tr><tr><td>1</td>\n", |
| 509 | + "<td>1996</td>\n", |
| 510 | + "<td>83200</td>\n", |
| 511 | + "<td>1379960894</td></tr><tr><td>1</td>\n", |
| 512 | + "<td>1997</td>\n", |
| 513 | + "<td>85451</td>\n", |
| 514 | + "<td>1531944134</td> </tr> </tbody>\n", |
| 515 | + " </table>\n", |
| 516 | + " <p>...</p>\n", |
| 517 | + " <p>Total: 9514</p></div>\n", |
| 518 | + " " |
| 519 | + ], |
| 520 | + "text/plain": [ |
| 521 | + "*country_id *year population gdp \n", |
| 522 | + "+------------+ +------+ +------------+ +------------+\n", |
| 523 | + "1 1986 62644 405463417 \n", |
| 524 | + "1 1987 61833 487602457 \n", |
| 525 | + "1 1988 61079 596423607 \n", |
| 526 | + "1 1989 61032 695304363 \n", |
| 527 | + "1 1990 62149 764887117 \n", |
| 528 | + "1 1991 64622 872138730 \n", |
| 529 | + "1 1992 68235 958463200 \n", |
| 530 | + "1 1993 72504 1082979708 \n", |
| 531 | + "1 1994 76700 1245688253 \n", |
| 532 | + "1 1995 80324 1320474860 \n", |
| 533 | + "1 1996 83200 1379960894 \n", |
| 534 | + "1 1997 85451 1531944134 \n", |
| 535 | + " ...\n", |
| 536 | + " (Total: 9514)" |
| 537 | + ] |
| 538 | + }, |
| 539 | + "execution_count": 5, |
| 540 | + "metadata": {}, |
| 541 | + "output_type": "execute_result" |
| 542 | + } |
| 543 | + ], |
| 544 | + "source": [ |
| 545 | + "CountryStats()" |
| 546 | + ] |
| 547 | + }, |
| 548 | + { |
| 549 | + "cell_type": "code", |
| 550 | + "execution_count": null, |
| 551 | + "metadata": {}, |
| 552 | + "outputs": [], |
| 553 | + "source": [] |
401 | 554 | } |
402 | 555 | ], |
403 | 556 | "metadata": { |
|
0 commit comments