Skip to content

Instantly share code, notes, and snippets.

@jakevdp
Created April 8, 2018 05:01
Show Gist options
  • Save jakevdp/d4a20a4a319780c1cc2af41ac919e7dd to your computer and use it in GitHub Desktop.
Save jakevdp/d4a20a4a319780c1cc2af41ac919e7dd to your computer and use it in GitHub Desktop.

Revisions

  1. jakevdp created this gist Apr 8, 2018.
    242 changes: 242 additions & 0 deletions Jupyter_vs_Mathematica.ipynb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,242 @@
    {
    "cells": [
    {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
    "# Jupyter vs Mathematica in Google Trends\n",
    "\n",
    "``trends_download.csv`` was downloaded from [Google Trends](https://trends.google.com/trends/explore?date=2014-01-01%202018-04-07&q=mathematica,jupyter)."
    ]
    },
    {
    "cell_type": "code",
    "execution_count": 1,
    "metadata": {},
    "outputs": [
    {
    "data": {
    "text/html": [
    "<div>\n",
    "<style scoped>\n",
    " .dataframe tbody tr th:only-of-type {\n",
    " vertical-align: middle;\n",
    " }\n",
    "\n",
    " .dataframe tbody tr th {\n",
    " vertical-align: top;\n",
    " }\n",
    "\n",
    " .dataframe thead th {\n",
    " text-align: right;\n",
    " }\n",
    "</style>\n",
    "<table border=\"1\" class=\"dataframe\">\n",
    " <thead>\n",
    " <tr style=\"text-align: right;\">\n",
    " <th></th>\n",
    " <th>Week</th>\n",
    " <th>Search Term</th>\n",
    " <th>Interest</th>\n",
    " </tr>\n",
    " </thead>\n",
    " <tbody>\n",
    " <tr>\n",
    " <th>0</th>\n",
    " <td>2014-01-05</td>\n",
    " <td>Mathematica</td>\n",
    " <td>64</td>\n",
    " </tr>\n",
    " <tr>\n",
    " <th>1</th>\n",
    " <td>2014-01-12</td>\n",
    " <td>Mathematica</td>\n",
    " <td>81</td>\n",
    " </tr>\n",
    " <tr>\n",
    " <th>2</th>\n",
    " <td>2014-01-19</td>\n",
    " <td>Mathematica</td>\n",
    " <td>87</td>\n",
    " </tr>\n",
    " <tr>\n",
    " <th>3</th>\n",
    " <td>2014-01-26</td>\n",
    " <td>Mathematica</td>\n",
    " <td>83</td>\n",
    " </tr>\n",
    " <tr>\n",
    " <th>4</th>\n",
    " <td>2014-02-02</td>\n",
    " <td>Mathematica</td>\n",
    " <td>91</td>\n",
    " </tr>\n",
    " </tbody>\n",
    "</table>\n",
    "</div>"
    ],
    "text/plain": [
    " Week Search Term Interest\n",
    "0 2014-01-05 Mathematica 64\n",
    "1 2014-01-12 Mathematica 81\n",
    "2 2014-01-19 Mathematica 87\n",
    "3 2014-01-26 Mathematica 83\n",
    "4 2014-02-02 Mathematica 91"
    ]
    },
    "execution_count": 1,
    "metadata": {},
    "output_type": "execute_result"
    }
    ],
    "source": [
    "import pandas as pd\n",
    "data = pd.read_csv('trends_download.csv', skiprows=2)\n",
    "data.columns = ['Week', 'Mathematica', 'Jupyter']\n",
    "data.Jupyter = data.Jupyter.str.replace('<1', '0').astype(int)\n",
    "data = data.melt('Week', value_name='Interest', var_name='Search Term')\n",
    "data.head()"
    ]
    },
    {
    "cell_type": "code",
    "execution_count": 2,
    "metadata": {},
    "outputs": [
    {
    "data": {
    "image/svg+xml": [
    "<svg class=\"marks\" width=\"955\" height=\"369\" viewBox=\"0 0 955 369\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><g transform=\"translate(52,29)\"><g class=\"mark-group role-frame root\"><g transform=\"translate(0,0)\"><path class=\"background\" d=\"M0.5,0.5h800v300h-800Z\" style=\"fill: none; stroke: #ddd;\"></path><g><g class=\"mark-group role-axis\"><g transform=\"translate(0.5,300.5)\"><path class=\"background\" d=\"M0,0h0v0h0Z\" style=\"pointer-events: none; fill: none;\"></path><g><g class=\"mark-rule role-axis-grid\" style=\"pointer-events: none;\"><line transform=\"translate(45,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(92,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(139,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(187,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(233,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(280,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(328,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(376,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(423,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(470,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(517,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(565,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(611,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(658,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(706,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(754,-300)\" x2=\"0\" y2=\"300\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line></g></g></g></g><g class=\"mark-group role-axis\"><g transform=\"translate(0.5,0.5)\"><path class=\"background\" d=\"M0,0h0v0h0Z\" style=\"pointer-events: none; fill: none;\"></path><g><g class=\"mark-rule role-axis-grid\" style=\"pointer-events: none;\"><line transform=\"translate(0,300)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,270)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,240)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,210)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,180)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,150)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,120)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,90)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,60)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,30)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,0)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #ddd; stroke-width: 1; opacity: 1;\"></line></g></g></g></g><g class=\"mark-group role-scope pathgroup\"><g transform=\"translate(0,0)\"><path class=\"background\" d=\"M0,0h800v300h-800Z\" style=\"fill: none;\"></path><g><g class=\"mark-line role-mark marks\"><path d=\"M800,126L796.3800904977376,153L792.7601809954751,111L789.1402714932127,135L785.5203619909502,138L781.9004524886877,120L778.2805429864253,120L774.6606334841629,129.00000000000003L771.0407239819004,117L767.420814479638,126L763.8009049773756,147L760.180995475113,153L756.5610859728506,162L752.9411764705882,198L749.3212669683257,201L745.7013574660633,165L742.0814479638009,114L738.4615384615385,108L734.841628959276,87L731.2217194570136,126L727.6018099547512,93.00000000000003L723.9819004524887,87L720.3619909502263,108L716.7420814479639,93.00000000000003L713.1221719457014,72L709.5022624434389,90L705.8823529411765,95.99999999999997L702.262443438914,120L698.6425339366516,102L695.0226244343892,123L691.4027149321267,138L687.7828054298643,159L684.1628959276018,162L680.5429864253393,180L676.9230769230769,180L673.3031674208145,174L669.683257918552,165L666.0633484162896,180L662.4434389140271,156L658.8235294117646,165L655.2036199095022,150L651.5837104072398,144L647.9638009049773,165L644.3438914027149,147L640.7239819004525,144L637.10407239819,129.00000000000003L633.4841628959276,114L629.8642533936652,102L626.2443438914028,90L622.6244343891403,84L619.0045248868779,81L615.3846153846155,84L611.7647058823529,87L608.1447963800905,78L604.5248868778281,75L600.9049773755656,90L597.2850678733032,93.00000000000003L593.6651583710408,84L590.0452488687783,75L586.4253393665158,84L582.8054298642534,75L579.1855203619909,81L575.5656108597285,111L571.9457013574661,102L568.3257918552036,144L564.7058823529412,171L561.0859728506787,189L557.4660633484162,147L553.8461538461538,108L550.2262443438914,63L546.606334841629,69L542.9864253393665,102L539.3665158371041,75L535.7466063348415,72L532.1266968325791,69L528.5067873303167,75L524.8868778280543,72L521.2669683257918,75L517.6470588235294,78L514.027149321267,81L510.4072398190045,81L506.78733031674204,90L503.1674208144796,99L499.5475113122172,117L495.92760180995475,135L492.3076923076923,159L488.6877828054299,153L485.0678733031674,171L481.447963800905,165L477.82805429864254,165L474.2081447963801,150L470.5882352941177,141L466.96832579185525,141L463.3484162895928,141L459.7285067873303,111L456.10859728506784,123L452.4886877828054,111L448.868778280543,108L445.24886877828055,90L441.6289592760181,84L438.0090497737557,95.99999999999997L434.3891402714932,75L430.7692307692308,54.00000000000003L427.14932126696834,60L423.5294117647059,75L419.9095022624435,81L416.28959276018105,93.00000000000003L412.6696832579186,72L409.0497737556561,69L405.42986425339365,42L401.8099547511312,60L398.1900452488688,69L394.57013574660635,69L390.95022624434387,69L387.33031674208144,81L383.710407239819,95.99999999999997L380.0904977375565,95.99999999999997L376.4705882352941,135L372.85067873303166,186L369.2307692307692,162L365.6108597285068,114L361.99095022624437,60L358.37104072398193,54.00000000000003L354.75113122171945,87L351.131221719457,54.00000000000003L347.5113122171946,56.99999999999997L343.89140271493216,48L340.27149321266967,45L336.65158371040724,45L333.0316742081448,48L329.4117647058823,42L325.7918552036199,60L322.17194570135746,54.00000000000003L318.552036199095,56.99999999999997L314.9321266968326,63L311.31221719457017,95.99999999999997L307.69230769230774,120L304.07239819004525,153L300.4524886877828,141L296.8325791855204,150L293.2126696832579,123L289.59276018099547,131.99999999999997L285.97285067873304,138L282.3529411764706,135L278.7330316742081,87L275.1131221719457,114L271.49321266968326,95.99999999999997L267.8733031674208,99L264.25339366515834,87L260.6334841628959,84L257.0135746606335,66L253.39366515837102,63L249.7737556561086,66L246.15384615384616,54.00000000000003L242.5339366515837,48L238.91402714932127,48L235.29411764705884,60L231.6742081447964,48L228.05429864253392,54.00000000000003L224.4343891402715,63L220.81447963800906,54.00000000000003L217.1945701357466,51L213.57466063348417,60L209.95475113122174,51L206.3348416289593,33L202.71493212669682,45L199.0950226244344,72L195.47511312217193,78L191.8552036199095,84L188.23529411764704,105L184.6153846153846,165L180.99547511312218,156L177.37556561085972,105L173.7556561085973,33L170.13574660633483,0L166.5158371040724,33L162.89592760180994,27L159.2760180995475,21L155.65610859728508,9L152.03619909502262,6L148.4162895927602,18L144.79638009049773,30L141.1764705882353,24L137.55656108597285,21L133.9366515837104,30L130.31674208144796,42L126.69683257918551,33L123.07692307692308,69L119.45701357466064,84L115.8371040723982,102L112.21719457013575,129.00000000000003L108.5972850678733,135L104.97737556561087,120L101.35746606334841,105L97.73755656108597,102L94.11764705882352,87L90.49773755656109,111L86.87782805429865,111L83.2579185520362,102L79.63800904977376,84L76.01809954751131,75L72.39819004524887,60L68.77828054298642,56.99999999999997L65.15837104072398,72L61.53846153846154,45L57.9185520361991,48L54.29864253393665,51L50.678733031674206,30L47.05882352941176,6L43.43891402714932,12L39.81900452488688,12L36.199095022624434,33L32.57918552036199,12L28.95927601809955,18L25.339366515837103,6L21.71945701357466,27L18.099547511312217,36L14.479638009049776,27L10.85972850678733,51L7.239819004524888,39L3.619909502262444,56.99999999999997L0,108\" style=\"fill: none; stroke: #f58518; stroke-width: 3;\"></path></g></g></g><g transform=\"translate(0,0)\"><path class=\"background\" d=\"M0,0h800v300h-800Z\" style=\"fill: none;\"></path><g><g class=\"mark-line role-mark marks\"><path d=\"M800,48L796.3800904977376,63L792.7601809954751,69L789.1402714932127,56.99999999999997L785.5203619909502,66L781.9004524886877,69L778.2805429864253,60L774.6606334841629,87L771.0407239819004,60L767.420814479638,63L763.8009049773756,87L760.180995475113,95.99999999999997L756.5610859728506,108L752.9411764705882,144L749.3212669683257,156L745.7013574660633,123L742.0814479638009,108L738.4615384615385,95.99999999999997L734.841628959276,93.00000000000003L731.2217194570136,117L727.6018099547512,93.00000000000003L723.9819004524887,95.99999999999997L720.3619909502263,102L716.7420814479639,90L713.1221719457014,108L709.5022624434389,102L705.8823529411765,120L702.262443438914,114L698.6425339366516,105L695.0226244343892,117L691.4027149321267,131.99999999999997L687.7828054298643,131.99999999999997L684.1628959276018,138L680.5429864253393,162L676.9230769230769,156L673.3031674208145,147L669.683257918552,144L666.0633484162896,138L662.4434389140271,141L658.8235294117646,165L655.2036199095022,159L651.5837104072398,150L647.9638009049773,150L644.3438914027149,162L640.7239819004525,162L637.10407239819,168L633.4841628959276,168L629.8642533936652,159L626.2443438914028,162L622.6244343891403,165L619.0045248868779,147L615.3846153846155,171L611.7647058823529,150L608.1447963800905,153L604.5248868778281,177L600.9049773755656,171L597.2850678733032,174L593.6651583710408,162L590.0452488687783,174L586.4253393665158,174L582.8054298642534,171L579.1855203619909,189L575.5656108597285,180L571.9457013574661,192L568.3257918552036,201L564.7058823529412,216L561.0859728506787,237L557.4660633484162,213L553.8461538461538,210L550.2262443438914,204L546.606334841629,213L542.9864253393665,210L539.3665158371041,210L535.7466063348415,216L532.1266968325791,213L528.5067873303167,213L524.8868778280543,219L521.2669683257918,216L517.6470588235294,216L514.027149321267,225L510.4072398190045,231L506.78733031674204,225L503.1674208144796,228L499.5475113122172,231L495.92760180995475,231L492.3076923076923,237L488.6877828054299,243L485.0678733031674,252L481.447963800905,243L477.82805429864254,243L474.2081447963801,228L470.5882352941177,243L466.96832579185525,246L463.3484162895928,240L459.7285067873303,246L456.10859728506784,237L452.4886877828054,240L448.868778280543,237L445.24886877828055,246L441.6289592760181,252L438.0090497737557,249L434.3891402714932,243L430.7692307692308,249L427.14932126696834,243L423.5294117647059,249L419.9095022624435,255L416.28959276018105,252L412.6696832579186,255L409.0497737556561,255L405.42986425339365,246L401.8099547511312,249L398.1900452488688,252L394.57013574660635,267L390.95022624434387,255L387.33031674208144,261L383.710407239819,264L380.0904977375565,267L376.4705882352941,267L372.85067873303166,273L369.2307692307692,276L365.6108597285068,267L361.99095022624437,276L358.37104072398193,276L354.75113122171945,273L351.131221719457,270L347.5113122171946,273L343.89140271493216,276L340.27149321266967,273L336.65158371040724,273L333.0316742081448,279L329.4117647058823,279L325.7918552036199,273L322.17194570135746,282L318.552036199095,288L314.9321266968326,282L311.31221719457017,285L307.69230769230774,285L304.07239819004525,285L300.4524886877828,288L296.8325791855204,291L293.2126696832579,288L289.59276018099547,288L285.97285067873304,291L282.3529411764706,288L278.7330316742081,291L275.1131221719457,291L271.49321266968326,288L267.8733031674208,291L264.25339366515834,291L260.6334841628959,297L257.0135746606335,294L253.39366515837102,291L249.7737556561086,291L246.15384615384616,294L242.5339366515837,291L238.91402714932127,294L235.29411764705884,294L231.6742081447964,297L228.05429864253392,294L224.4343891402715,291L220.81447963800906,294L217.1945701357466,297L213.57466063348417,300L209.95475113122174,297L206.3348416289593,297L202.71493212669682,300L199.0950226244344,297L195.47511312217193,300L191.8552036199095,300L188.23529411764704,300L184.6153846153846,300L180.99547511312218,300L177.37556561085972,300L173.7556561085973,300L170.13574660633483,297L166.5158371040724,300L162.89592760180994,300L159.2760180995475,300L155.65610859728508,300L152.03619909502262,300L148.4162895927602,300L144.79638009049773,300L141.1764705882353,300L137.55656108597285,300L133.9366515837104,300L130.31674208144796,300L126.69683257918551,300L123.07692307692308,300L119.45701357466064,300L115.8371040723982,300L112.21719457013575,300L108.5972850678733,300L104.97737556561087,300L101.35746606334841,300L97.73755656108597,300L94.11764705882352,300L90.49773755656109,300L86.87782805429865,300L83.2579185520362,300L79.63800904977376,300L76.01809954751131,300L72.39819004524887,300L68.77828054298642,300L65.15837104072398,300L61.53846153846154,300L57.9185520361991,300L54.29864253393665,300L50.678733031674206,300L47.05882352941176,300L43.43891402714932,300L39.81900452488688,300L36.199095022624434,300L32.57918552036199,300L28.95927601809955,300L25.339366515837103,300L21.71945701357466,300L18.099547511312217,300L14.479638009049776,300L10.85972850678733,300L7.239819004524888,300L3.619909502262444,300L0,300\" style=\"fill: none; stroke: #4c78a8; stroke-width: 3;\"></path></g></g></g></g><g class=\"mark-group role-legend\"><g transform=\"translate(821,0)\"><path class=\"background\" d=\"M0,0h77v43h-77Z\" style=\"pointer-events: none; fill: none;\"></path><g><g class=\"mark-group role-legend-entry\"><g transform=\"translate(0,16)\"><path class=\"background\" d=\"M0,0h0v0h0Z\" style=\"pointer-events: none; fill: none;\"></path><g><g class=\"mark-symbol role-legend-symbol\" style=\"pointer-events: none;\"><path transform=\"translate(5,5)\" d=\"M5,0A5,5,0,1,1,-5,0A5,5,0,1,1,5,0\" style=\"fill: none; stroke: #4c78a8; stroke-width: 1.5; opacity: 1;\"></path><path transform=\"translate(5,20)\" d=\"M5,0A5,5,0,1,1,-5,0A5,5,0,1,1,5,0\" style=\"fill: none; stroke: #f58518; stroke-width: 1.5; opacity: 1;\"></path></g><g class=\"mark-text role-legend-label\" style=\"pointer-events: none;\"><text text-anchor=\"start\" transform=\"translate(18,8)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Jupyter</text><text text-anchor=\"start\" transform=\"translate(18,23)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Mathematica</text></g></g></g></g><g class=\"mark-text role-legend-title\" style=\"pointer-events: none;\"><text text-anchor=\"start\" transform=\"translate(0,9)\" style=\"font: bold 11px sans-serif; fill: #000; opacity: 1;\">Search Term</text></g></g></g></g><g class=\"mark-text role-title\" style=\"pointer-events: none;\"><text text-anchor=\"middle\" transform=\"translate(400,-13)\" style=\"font: bold 13px sans-serif; fill: #000; opacity: 1;\">Google Trends Data</text></g><g class=\"mark-group role-axis\"><g transform=\"translate(0.5,300.5)\"><path class=\"background\" d=\"M0,0h0v0h0Z\" style=\"pointer-events: none; fill: none;\"></path><g><g class=\"mark-rule role-axis-tick\" style=\"pointer-events: none;\"><line transform=\"translate(45,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(92,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(139,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(187,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(233,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(280,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(328,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(376,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(423,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(470,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(517,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(565,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(611,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(658,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(706,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(754,0)\" x2=\"0\" y2=\"5\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line></g><g class=\"mark-text role-axis-label\" style=\"pointer-events: none;\"><text text-anchor=\"middle\" transform=\"translate(44.624003447532864,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Apr 01, 2014</text><text text-anchor=\"middle\" transform=\"translate(91.68282697694463,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jul 01, 2014</text><text text-anchor=\"middle\" transform=\"translate(139.25878043525103,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Oct 01, 2014</text><text text-anchor=\"middle\" transform=\"translate(186.85628097392802,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jan 01, 2015</text><text text-anchor=\"middle\" transform=\"translate(233.37642749407456,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Apr 01, 2015</text><text text-anchor=\"middle\" transform=\"translate(280.4352510234863,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jul 01, 2015</text><text text-anchor=\"middle\" transform=\"translate(328.01120448179273,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Oct 01, 2015</text><text text-anchor=\"middle\" transform=\"translate(375.6087050204697,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jan 01, 2016</text><text text-anchor=\"middle\" transform=\"translate(422.6459814695109,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Apr 01, 2016</text><text text-anchor=\"middle\" transform=\"translate(469.70480499892267,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jul 01, 2016</text><text text-anchor=\"middle\" transform=\"translate(517.2807584572291,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Oct 01, 2016</text><text text-anchor=\"middle\" transform=\"translate(564.8782589959061,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jan 01, 2017</text><text text-anchor=\"middle\" transform=\"translate(611.3984055160525,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Apr 01, 2017</text><text text-anchor=\"middle\" transform=\"translate(658.4572290454643,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jul 01, 2017</text><text text-anchor=\"middle\" transform=\"translate(706.0331825037707,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">Oct 01, 2017</text><text text-anchor=\"middle\" transform=\"translate(753.6306830424477,15)\" style=\"font: 10px sans-serif; fill: #000; opacity: 0;\">Jan 01, 2018</text></g><g class=\"mark-rule role-axis-domain\" style=\"pointer-events: none;\"><line transform=\"translate(0,0)\" x2=\"800\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line></g><g class=\"mark-text role-axis-title\" style=\"pointer-events: none;\"><text text-anchor=\"middle\" transform=\"translate(400,31)\" style=\"font: bold 11px sans-serif; fill: #000; opacity: 1;\">Week</text></g></g></g></g><g class=\"mark-group role-axis\"><g transform=\"translate(0.5,0.5)\"><path class=\"background\" d=\"M0,0h0v0h0Z\" style=\"pointer-events: none; fill: none;\"></path><g><g class=\"mark-rule role-axis-tick\" style=\"pointer-events: none;\"><line transform=\"translate(0,300)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,270)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,240)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,210)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,180)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,150)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,120)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,90)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,60)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,30)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line><line transform=\"translate(0,0)\" x2=\"-5\" y2=\"0\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line></g><g class=\"mark-text role-axis-label\" style=\"pointer-events: none;\"><text text-anchor=\"end\" transform=\"translate(-7,303)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">0</text><text text-anchor=\"end\" transform=\"translate(-7,273)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">10</text><text text-anchor=\"end\" transform=\"translate(-7,243)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">20</text><text text-anchor=\"end\" transform=\"translate(-7,213)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">30</text><text text-anchor=\"end\" transform=\"translate(-7,183)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">40</text><text text-anchor=\"end\" transform=\"translate(-7,153)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">50</text><text text-anchor=\"end\" transform=\"translate(-7,123)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">60</text><text text-anchor=\"end\" transform=\"translate(-7,93)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">70</text><text text-anchor=\"end\" transform=\"translate(-7,63)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">80</text><text text-anchor=\"end\" transform=\"translate(-7,33)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">90</text><text text-anchor=\"end\" transform=\"translate(-7,3)\" style=\"font: 10px sans-serif; fill: #000; opacity: 1;\">100</text></g><g class=\"mark-rule role-axis-domain\" style=\"pointer-events: none;\"><line transform=\"translate(0,300)\" x2=\"0\" y2=\"-300\" style=\"fill: none; stroke: #888; stroke-width: 1; opacity: 1;\"></line></g><g class=\"mark-text role-axis-title\" style=\"pointer-events: none;\"><text text-anchor=\"middle\" transform=\"translate(-34,150) rotate(-90) translate(0,-2)\" style=\"font: bold 11px sans-serif; fill: #000; opacity: 1;\">Interest</text></g></g></g></g></g></g></g></g></svg>"
    ],
    "text/plain": [
    "Chart({\n",
    " data: Week Search Term Interest\n",
    " 0 2014-01-05 Mathematica 64\n",
    " 1 2014-01-12 Mathematica 81\n",
    " 2 2014-01-19 Mathematica 87\n",
    " 3 2014-01-26 Mathematica 83\n",
    " 4 2014-02-02 Mathematica 91\n",
    " 5 2014-02-09 Mathematica 88\n",
    " 6 2014-02-16 Mathematica 91\n",
    " 7 2014-02-23 Mathematica 98\n",
    " 8 2014-03-02 Mathematica 94\n",
    " 9 2014-03-09 Mathematica 96\n",
    " 10 2014-03-16 Mathematica 89\n",
    " 11 2014-03-23 Mathematica 96\n",
    " 12 2014-03-30 Mathematica 96\n",
    " 13 2014-04-06 Mathematica 98\n",
    " 14 2014-04-13 Mathematica 90\n",
    " 15 2014-04-20 Mathematica 83\n",
    " 16 2014-04-27 Mathematica 84\n",
    " 17 2014-05-04 Mathematica 85\n",
    " 18 2014-05-11 Mathematica 76\n",
    " 19 2014-05-18 Mathematica 81\n",
    " 20 2014-05-25 Mathematica 80\n",
    " 21 2014-06-01 Mathematica 75\n",
    " 22 2014-06-08 Mathematica 72\n",
    " 23 2014-06-15 Mathematica 66\n",
    " 24 2014-06-22 Mathematica 63\n",
    " 25 2014-06-29 Mathematica 63\n",
    " 26 2014-07-06 Mathematica 71\n",
    " 27 2014-07-13 Mathematica 66\n",
    " 28 2014-07-20 Mathematica 65\n",
    " 29 2014-07-27 Mathematica 60\n",
    " .. ... ... ...\n",
    " 414 2017-09-10 Jupyter 61\n",
    " 415 2017-09-17 Jupyter 65\n",
    " 416 2017-09-24 Jupyter 62\n",
    " 417 2017-10-01 Jupyter 60\n",
    " 418 2017-10-08 Jupyter 66\n",
    " 419 2017-10-15 Jupyter 64\n",
    " 420 2017-10-22 Jupyter 70\n",
    " 421 2017-10-29 Jupyter 66\n",
    " 422 2017-11-05 Jupyter 68\n",
    " 423 2017-11-12 Jupyter 69\n",
    " 424 2017-11-19 Jupyter 61\n",
    " 425 2017-11-26 Jupyter 69\n",
    " 426 2017-12-03 Jupyter 68\n",
    " 427 2017-12-10 Jupyter 64\n",
    " 428 2017-12-17 Jupyter 59\n",
    " 429 2017-12-24 Jupyter 48\n",
    " 430 2017-12-31 Jupyter 52\n",
    " 431 2018-01-07 Jupyter 64\n",
    " 432 2018-01-14 Jupyter 68\n",
    " 433 2018-01-21 Jupyter 71\n",
    " 434 2018-01-28 Jupyter 79\n",
    " 435 2018-02-04 Jupyter 80\n",
    " 436 2018-02-11 Jupyter 71\n",
    " 437 2018-02-18 Jupyter 80\n",
    " 438 2018-02-25 Jupyter 77\n",
    " 439 2018-03-04 Jupyter 78\n",
    " 440 2018-03-11 Jupyter 81\n",
    " 441 2018-03-18 Jupyter 77\n",
    " 442 2018-03-25 Jupyter 79\n",
    " 443 2018-04-01 Jupyter 84\n",
    " \n",
    " [444 rows x 3 columns],\n",
    " mark: MarkDef({\n",
    " type: 'line',\n",
    " strokeWidth: 3\n",
    " }),\n",
    " encoding: EncodingWithFacet({\n",
    " color: Color({\n",
    " shorthand: 'Search Term'\n",
    " }),\n",
    " x: X({\n",
    " shorthand: 'Week:T'\n",
    " }),\n",
    " y: Y({\n",
    " shorthand: 'Interest'\n",
    " })\n",
    " }),\n",
    " height: 300,\n",
    " title: 'Google Trends Data',\n",
    " width: 800\n",
    "})"
    ]
    },
    "execution_count": 2,
    "metadata": {},
    "output_type": "execute_result"
    }
    ],
    "source": [
    "import altair as alt\n",
    "\n",
    "# SVG renderer will embed SVG plot in the notebook\n",
    "alt.renderers.enable('svg')\n",
    "\n",
    "alt.Chart(data).mark_line(strokeWidth=3).encode(\n",
    " x='Week:T',\n",
    " y='Interest',\n",
    " color='Search Term'\n",
    ").properties(\n",
    " width=800,\n",
    " height=300,\n",
    " title='Google Trends Data'\n",
    ")"
    ]
    }
    ],
    "metadata": {
    "kernelspec": {
    "display_name": "Python 3",
    "language": "python",
    "name": "python3"
    },
    "language_info": {
    "codemirror_mode": {
    "name": "ipython",
    "version": 3
    },
    "file_extension": ".py",
    "mimetype": "text/x-python",
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
    "version": "3.6.3"
    }
    },
    "nbformat": 4,
    "nbformat_minor": 2
    }
    225 changes: 225 additions & 0 deletions trends_download.csv
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,225 @@
    Category: All categories

    Week,mathematica: (Worldwide),jupyter: (Worldwide)
    2014-01-05,64,0
    2014-01-12,81,0
    2014-01-19,87,0
    2014-01-26,83,0
    2014-02-02,91,0
    2014-02-09,88,0
    2014-02-16,91,0
    2014-02-23,98,0
    2014-03-02,94,0
    2014-03-09,96,0
    2014-03-16,89,0
    2014-03-23,96,0
    2014-03-30,96,0
    2014-04-06,98,0
    2014-04-13,90,0
    2014-04-20,83,0
    2014-04-27,84,0
    2014-05-04,85,0
    2014-05-11,76,0
    2014-05-18,81,<1
    2014-05-25,80,0
    2014-06-01,75,0
    2014-06-08,72,0
    2014-06-15,66,0
    2014-06-22,63,0
    2014-06-29,63,0
    2014-07-06,71,<1
    2014-07-13,66,0
    2014-07-20,65,<1
    2014-07-27,60,0
    2014-08-03,55,0
    2014-08-10,57,<1
    2014-08-17,66,<1
    2014-08-24,72,<1
    2014-08-31,77,0
    2014-09-07,89,<1
    2014-09-14,86,<1
    2014-09-21,90,<1
    2014-09-28,93,<1
    2014-10-05,92,<1
    2014-10-12,90,0
    2014-10-19,94,0
    2014-10-26,98,<1
    2014-11-02,97,<1
    2014-11-09,93,<1
    2014-11-16,91,<1
    2014-11-23,89,<1
    2014-11-30,100,1
    2014-12-07,89,0
    2014-12-14,65,<1
    2014-12-21,48,0
    2014-12-28,45,<1
    2015-01-04,65,<1
    2015-01-11,72,<1
    2015-01-18,74,<1
    2015-01-25,76,1
    2015-02-01,85,<1
    2015-02-08,89,1
    2015-02-15,83,1
    2015-02-22,80,<1
    2015-03-01,83,1
    2015-03-08,82,2
    2015-03-15,79,3
    2015-03-22,82,2
    2015-03-29,84,1
    2015-04-05,80,2
    2015-04-12,84,2
    2015-04-19,84,3
    2015-04-26,82,2
    2015-05-03,78,3
    2015-05-10,79,3
    2015-05-17,78,2
    2015-05-24,72,1
    2015-05-31,71,3
    2015-06-07,67,3
    2015-06-14,68,4
    2015-06-21,62,3
    2015-06-28,71,3
    2015-07-05,55,4
    2015-07-12,54,3
    2015-07-19,56,4
    2015-07-26,59,4
    2015-08-02,50,3
    2015-08-09,53,4
    2015-08-16,49,5
    2015-08-23,60,5
    2015-08-30,68,5
    2015-09-06,79,6
    2015-09-13,81,4
    2015-09-20,82,6
    2015-09-27,80,9
    2015-10-04,86,7
    2015-10-11,84,7
    2015-10-18,85,9
    2015-10-25,85,9
    2015-11-01,84,8
    2015-11-08,81,9
    2015-11-15,82,10
    2015-11-22,71,9
    2015-11-29,82,8
    2015-12-06,80,8
    2015-12-13,62,11
    2015-12-20,46,8
    2015-12-27,38,9
    2016-01-03,55,11
    2016-01-10,68,11
    2016-01-17,68,12
    2016-01-24,73,13
    2016-01-31,77,15
    2016-02-07,77,11
    2016-02-14,77,16
    2016-02-21,80,17
    2016-02-28,86,18
    2016-03-06,77,15
    2016-03-13,76,15
    2016-03-20,69,16
    2016-03-27,73,15
    2016-04-03,75,17
    2016-04-10,80,19
    2016-04-17,82,17
    2016-04-24,75,19
    2016-05-01,68,17
    2016-05-08,72,16
    2016-05-15,70,18
    2016-05-22,64,21
    2016-05-29,63,20
    2016-06-05,59,21
    2016-06-12,63,18
    2016-06-19,53,20
    2016-06-26,53,18
    2016-07-03,53,19
    2016-07-10,50,24
    2016-07-17,45,19
    2016-07-24,45,19
    2016-07-31,43,16
    2016-08-07,49,19
    2016-08-14,47,21
    2016-08-21,55,23
    2016-08-28,61,23
    2016-09-04,67,24
    2016-09-11,70,25
    2016-09-18,73,23
    2016-09-25,73,25
    2016-10-02,74,28
    2016-10-09,75,28
    2016-10-16,76,27
    2016-10-23,75,29
    2016-10-30,77,29
    2016-11-06,76,28
    2016-11-13,75,30
    2016-11-20,66,30
    2016-11-27,77,29
    2016-12-04,79,32
    2016-12-11,64,30
    2016-12-18,51,29
    2016-12-25,37,21
    2017-01-01,43,28
    2017-01-08,52,33
    2017-01-15,66,36
    2017-01-22,63,40
    2017-01-29,73,37
    2017-02-05,75,43
    2017-02-12,72,42
    2017-02-19,75,42
    2017-02-26,72,46
    2017-03-05,69,42
    2017-03-12,70,43
    2017-03-19,75,41
    2017-03-26,74,49
    2017-04-02,71,50
    2017-04-09,72,43
    2017-04-16,73,51
    2017-04-23,72,45
    2017-04-30,70,46
    2017-05-07,66,47
    2017-05-14,62,44
    2017-05-21,57,44
    2017-05-28,52,46
    2017-06-04,51,46
    2017-06-11,45,50
    2017-06-18,52,50
    2017-06-25,50,47
    2017-07-02,45,45
    2017-07-09,48,53
    2017-07-16,40,54
    2017-07-23,45,52
    2017-07-30,42,51
    2017-08-06,40,48
    2017-08-13,40,46
    2017-08-20,46,54
    2017-08-27,47,56
    2017-09-03,54,56
    2017-09-10,59,61
    2017-09-17,66,65
    2017-09-24,60,62
    2017-10-01,68,60
    2017-10-08,70,66
    2017-10-15,76,64
    2017-10-22,69,70
    2017-10-29,64,66
    2017-11-05,71,68
    2017-11-12,69,69
    2017-11-19,58,61
    2017-11-26,71,69
    2017-12-03,64,68
    2017-12-10,62,64
    2017-12-17,45,59
    2017-12-24,33,48
    2017-12-31,34,52
    2018-01-07,46,64
    2018-01-14,49,68
    2018-01-21,51,71
    2018-01-28,58,79
    2018-02-04,61,80
    2018-02-11,57,71
    2018-02-18,60,80
    2018-02-25,60,77
    2018-03-04,54,78
    2018-03-11,55,81
    2018-03-18,63,77
    2018-03-25,49,79
    2018-04-01,58,84