diff --git a/docs/Winpython_checker.ipynb b/docs/Winpython_checker.ipynb index 143788f..fb436ee 100644 --- a/docs/Winpython_checker.ipynb +++ b/docs/Winpython_checker.ipynb @@ -10,23 +10,20 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "import warnings\n", "warnings.filterwarnings(\"ignore\", category=DeprecationWarning)\n", "warnings.filterwarnings(\"ignore\", category=UserWarning)\n", + "warnings.filterwarnings(\"ignore\", category=FutureWarning)\n", "# warnings.filterwarnings(\"ignore\") # would silence all warnings" ] }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "%matplotlib inline" @@ -49,9 +46,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking Numba JIT toolchain\n", @@ -120,9 +115,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Cython + Mingwpy compiler toolchain test\n", @@ -168,7 +161,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Graphics: Matplotlib, Pandas, Seaborn, bqplot, Bokeh, Holoviews" + "## Graphics: Matplotlib, Pandas, Seaborn, Holoviews, Bokeh, bqplot, ipyleaflet, plotnine" ] }, { @@ -215,6 +208,116 @@ "sns.pairplot(df, hue=\"species\", size=1.5)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# altair 1.3 example\n", + "import altair as at\n", + "at.Chart(df).mark_bar().encode(\n", + " x=at.X('sepal_length', bin=at.Bin(maxbins=50)),\n", + " y='count(*):Q',\n", + " color='species:N',\n", + " # column='species',\n", + ").configure_cell(width=200)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Holoviews\n", + "# for more example, see http://holoviews.org/Tutorials/index.html\n", + "import numpy as np\n", + "import holoviews as hv\n", + "hv.extension('matplotlib')\n", + "dots = np.linspace(-0.45, 0.45, 11)\n", + "fractal = hv.Image(image)\n", + "\n", + "layouts = {y: (fractal * hv.Points(fractal.sample([(i,y) for i in dots])) +\n", + " fractal.sample(y=y) )\n", + " for y in np.linspace(0, 0.45,11)}\n", + "\n", + "hv.HoloMap(layouts, kdims=['Y']).collate().cols(2)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Bokeh 0.12.5 \n", + "import numpy as np\n", + "from six.moves import zip\n", + "from bokeh.plotting import figure, show, output_notebook\n", + "N = 4000\n", + "x = np.random.random(size=N) * 100\n", + "y = np.random.random(size=N) * 100\n", + "radii = np.random.random(size=N) * 1.5\n", + "colors = [\"#%02x%02x%02x\" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)]\n", + "\n", + "output_notebook()\n", + "TOOLS=\"hover,crosshair,pan,wheel_zoom,box_zoom,reset,tap,save,box_select,poly_select,lasso_select\"\n", + "\n", + "p = figure(tools=TOOLS)\n", + "p.scatter(x,y, radius=radii, fill_color=colors, fill_alpha=0.6, line_color=None)\n", + "show(p)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Datashader (holoviews+Bokeh)\n", + "import numpy as np\n", + "import pandas as pd\n", + "import holoviews as hv\n", + "import datashader as ds\n", + "from holoviews.operation.datashader import aggregate, shade, datashade, dynspread\n", + "from bokeh.models import DatetimeTickFormatter\n", + "hv.extension('bokeh')\n", + "\n", + "def time_series(T = 1, N = 100, mu = 0.1, sigma = 0.1, S0 = 20): \n", + " \"\"\"Parameterized noisy time series\"\"\"\n", + " dt = float(T)/N\n", + " t = np.linspace(0, T, N)\n", + " W = np.random.standard_normal(size = N) \n", + " W = np.cumsum(W)*np.sqrt(dt) # standard brownian motion\n", + " X = (mu-0.5*sigma**2)*t + sigma*W \n", + " S = S0*np.exp(X) # geometric brownian motion\n", + " return S\n", + "\n", + "def apply_formatter(plot, element):\n", + " plot.handles['xaxis'].formatter = DatetimeTickFormatter()\n", + " \n", + "drange = pd.date_range(start=\"2014-01-01\", end=\"2016-01-01\", freq='1D') # or '1min'\n", + "dates = drange.values.astype('int64')/10**6 # Convert dates to ints\n", + "curve = hv.Curve((dates, time_series(N=len(dates), sigma = 1)))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%%opts RGB [finalize_hooks=[apply_formatter] width=800]\n", + "%%opts Overlay [finalize_hooks=[apply_formatter] width=800] \n", + "%%opts Scatter [tools=['hover', 'box_select']] (line_color=\"black\" fill_color=\"red\" size=10)\n", + "\n", + "from holoviews.operation.timeseries import rolling, rolling_outlier_std\n", + "smoothed = rolling(curve, rolling_window=50)\n", + "outliers = rolling_outlier_std(curve, rolling_window=50, sigma=2)\n", + "datashade(curve, cmap=[\"blue\"]) * dynspread(datashade(smoothed, cmap=[\"red\"]),max_px=1) * outliers" + ] + }, { "cell_type": "code", "execution_count": null, @@ -258,9 +361,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "dc.on_draw(handle_draw)\n", @@ -273,39 +374,11 @@ "metadata": {}, "outputs": [], "source": [ - "# Bokeh 0.12.5 \n", - "import numpy as np\n", - "from six.moves import zip\n", - "from bokeh.plotting import figure, show, output_notebook\n", - "N = 4000\n", - "x = np.random.random(size=N) * 100\n", - "y = np.random.random(size=N) * 100\n", - "radii = np.random.random(size=N) * 1.5\n", - "colors = [\"#%02x%02x%02x\" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)]\n", - "\n", - "output_notebook()\n", - "TOOLS=\"hover,crosshair,pan,wheel_zoom,box_zoom,reset,tap,save,box_select,poly_select,lasso_select\"\n", - "\n", - "p = figure(tools=TOOLS)\n", - "p.scatter(x,y, radius=radii, fill_color=colors, fill_alpha=0.6, line_color=None)\n", - "show(p)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [ - "# Holoviews \n", - "# for more example, see http://holoviews.org/Tutorials/index.html\n", - "import holoviews as hv\n", - "%load_ext holoviews.ipython\n", - "fractal = hv.Image(image)\n", - "\n", - "((fractal * hv.HLine(y=0.16)).hist() + fractal.sample(y=0.16))" + "# plotnine: giving a taste of ggplot of R langage (formerly we were using ggpy)\n", + "from plotnine import ggplot, aes, geom_blank, geom_point, stat_smooth, facet_wrap, theme_bw\n", + "from plotnine.data import mtcars\n", + "ggplot(mtcars, aes(x='hp', y='wt', color='mpg')) + geom_point() +\\\n", + "facet_wrap(\"~cyl\") + theme_bw()" ] }, { @@ -318,9 +391,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "import IPython;IPython.__version__" @@ -329,9 +400,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Audio Example : https://github.com/ipython/ipywidgets/blob/master/examples/Beat%20Frequencies.ipynb\n", @@ -355,9 +424,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Networks graph Example : https://github.com/ipython/ipywidgets/blob/master/examples/Exploring%20Graphs.ipynb\n", @@ -396,9 +463,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking nbconvert \n", @@ -408,9 +473,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "%%HTML\n", @@ -427,9 +490,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking statsmodels\n", @@ -459,9 +520,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# lmfit test (from http://nbviewer.ipython.org/github/lmfit/lmfit-py/blob/master/examples/lmfit-model.ipynb)\n", @@ -490,9 +549,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "#Pandas \n", @@ -519,9 +576,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "datas.query('Measure > 0').groupby(['Color','Year']).size().unstack()" @@ -537,9 +592,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking Web Scraping: beautifulsoup and requests \n", @@ -576,7 +629,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": true, "scrolled": true }, "outputs": [], @@ -624,9 +676,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Checking Theano\n", @@ -649,9 +699,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking sympy \n", @@ -671,9 +719,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking Ipython-sql, sqlparse, SQLalchemy\n", @@ -683,9 +729,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "%%sql sqlite:///.baresql.db\n", @@ -699,9 +743,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking baresql\n", @@ -719,9 +761,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Transfering Datas to sqlite, doing transformation in sql, going back to Pandas and Matplotlib\n", @@ -736,9 +776,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking db.py\n", @@ -750,9 +788,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "db.tables" @@ -761,9 +797,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# checking sqlite_bro: this should lanch a separate non-browser window with sqlite_bro's welcome\n", @@ -773,9 +807,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# pyodbc \n", @@ -791,9 +823,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# pythonnet\n", @@ -830,9 +860,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# optional scipy full test (takes up to 10 minutes)\n", @@ -842,11 +870,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], - "source": [] + "source": [ + "!pip list" + ] } ], "metadata": { @@ -865,7 +893,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.5.3" + "version": "3.6.3" }, "widgets": { "state": { @@ -902,5 +930,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 2 } diff --git a/docs/installing_R.ipynb b/docs/installing_R.ipynb index dfa69bc..73ae60b 100644 --- a/docs/installing_R.ipynb +++ b/docs/installing_R.ipynb @@ -7,62 +7,47 @@ "# Installating R on WinPython\n", "\n", "#### This procedure applys for Winpython (Version of December 2015 and after) \n", - "### 1 - Downloading and Installing R binary in the right place" + "### 1 - Downloading R binary" ] }, { "cell_type": "code", "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [], + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Le volume dans le lecteur C n'a pas de nom.\n", + " Le num‚ro de s‚rie du volume est 98F9-A53D\n", + "\n", + " R‚pertoire de C:\\WinPython\\basedir36\\buildQt5\\winpython-64bit-3.6.x.0\\tools\n", + "\n", + "01/01/2018 20:12 82ÿ374ÿ679 R-3.4.3-win.exe\n", + " 1 fichier(s) 82ÿ374ÿ679 octets\n", + " 0 R‚p(s) 27ÿ286ÿ278ÿ144 octets libres\n" + ] + } + ], "source": [ "import os\n", "import sys\n", - "import io" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "os.environ[\"tmp_Rdirectory\"]= \"R\" \n", - "os.environ[\"R_HOME\"] = os.environ[\"WINPYDIR\"]+ \"\\\\..\\\\tools\\\\R\\\\\" \n", - "os.environ[\"R_HOMEbin\"]=os.environ[\"R_HOME\"] + \"bin\" \n", - "# for installation we need this\n", - "os.environ[\"tmp_Rbase\"]=os.path.join(os.path.split(os.environ[\"WINPYDIR\"])[0] , 'tools','R' ) " - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "# downloading R-3.2.3 (65 380 480 Bytes, may takes a few minutes)\n", + "import io\n", + "\n", + "# downloading R may takes a few minutes (80Mo)\n", "try:\n", " import urllib.request as urllib2 # Python 3\n", "except:\n", " import urllib2 # Python 2\n", - "if 'amd64' in sys.version.lower():\n", - " r_comp ='/COMPONENTS=\"main,x64,translations'\n", - "else:\n", - " r_comp ='/COMPONENTS=\"main,i386,translations'\n", "\n", - "# specify R binary and hash\n", - "r_url = \"https://cran.r-project.org/bin/windows/base/R-3.3.1-win.exe\"\n", - "hashes=(\"104bfc769d27c3fd3c9294cc4f82e232\", \"b1102b40c08914bada8f3240197ac960070c7db2\" )\n", + "# specify R binary and (md5, sha1) hash\n", + "# R-3.4.3:\n", + "r_url = \"https://cran.r-project.org/bin/windows/base/R-3.4.3-win.exe\"\n", + "hashes=(\"0ff087acbae677d7255af19b0a9df27f\",\"aabf0b671ae1dca741c3df9dee976a7d4b584f80\")\n", "\n", "# specify target location\n", - "r_binary = os.path.basename(r_url)\n", - "r_installer = os.environ[\"WINPYDIR\"]+\"\\\\..\\\\tools\\\\\"+r_binary\n", + "r_installer = os.environ[\"WINPYDIR\"]+\"\\\\..\\\\tools\\\\\"+os.path.basename(r_url)\n", "os.environ[\"r_installer\"] = r_installer\n", "\n", "# Download\n", @@ -70,42 +55,24 @@ "with io.open(r_installer, 'wb') as f:\n", " f.write(g.read())\n", "g.close\n", - "g = None" + "g = None\n", + "\n", + "#checking it's there\n", + "!dir %r_installer%" ] }, { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Le volume dans le lecteur C n'a pas de nom.\n", - " Le num‚ro de s‚rie du volume est 98F9-A53D\n", - "\n", - " R‚pertoire de C:\\WinPython\\basedir35\\buildQt5\\winpython-64bit-3.5.2.3Qt5b2\\tools\n", - "\n", - "04/10/2016 19:52 73ÿ566ÿ547 R-3.3.1-win.exe\n", - " 1 fichier(s) 73ÿ566ÿ547 octets\n", - " 0 R‚p(s) 30ÿ744ÿ125ÿ440 octets libres\n" - ] - } - ], + "cell_type": "markdown", + "metadata": {}, "source": [ - "#checking it's there\n", - "!dir %r_installer%" + "\n", + "### 2 - checking and Installing R binary in the right place" ] }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, + "execution_count": 7, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -113,35 +80,58 @@ "text": [ " MD5 SHA-1 \n", "-------------------------------- ----------------------------------------\n", - "104bfc769d27c3fd3c9294cc4f82e232 b1102b40c08914bada8f3240197ac960070c7db2 C:\\WinPython\\basedir35\\buildQt5\\winpython-64bit-3.5.2.3Qt5b2\\scripts\\..\\python-3.5.2.amd64\\..\\tools\\R-3.3.1-win.exe\n" + "0ff087acbae677d7255af19b0a9df27f aabf0b671ae1dca741c3df9dee976a7d4b584f80 C:\\WinPython\\basedir36\\buildQt5\\winpython-64bit-3.6.x.0\\python-3.6.4.amd64\\..\\tools\\R-3.4.3-win.exe\n", + "looks good!\n" ] } ], "source": [ - "# checking it's the official R-3.2.3 \n", + "# checking it's the official R\n", "import hashlib\n", "def give_hash(of_file, with_this):\n", " with io.open(r_installer, 'rb') as f:\n", " return with_this(f.read()).hexdigest() \n", "print (\" \"*12+\"MD5\"+\" \"*(32-12-3)+\" \"+\" \"*15+\"SHA-1\"+\" \"*(40-15-5)+\"\\n\"+\"-\"*32+\" \"+\"-\"*40)\n", - "\n", "print (\"%s %s %s\" % (give_hash(r_installer, hashlib.md5) , give_hash(r_installer, hashlib.sha1),r_installer))\n", - "assert give_hash(r_installer, hashlib.md5) == hashes[0]\n", - "assert give_hash(r_installer, hashlib.sha1) == hashes[1]" + "if give_hash(r_installer, hashlib.md5) == hashes[0] and give_hash(r_installer, hashlib.sha1) == hashes[1]:\n", + " print(\"looks good!\")\n", + "else:\n", + " print(\"problem ! please check\")\n", + " assert give_hash(r_installer, hashlib.md5) == hashes[0]\n", + " assert give_hash(r_installer, hashlib.sha1) == hashes[1]" ] }, { "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "# preparing Dos variables\n", + "os.environ[\"R_HOME\"] = os.environ[\"WINPYDIR\"]+ \"\\\\..\\\\tools\\\\R\\\\\" \n", + "os.environ[\"R_HOMEbin\"]=os.environ[\"R_HOME\"] + \"bin\" \n", + "\n", + "# for installation we need this\n", + "os.environ[\"tmp_Rbase\"]=os.path.join(os.path.split(os.environ[\"WINPYDIR\"])[0] , 'tools','R' ) \n", + "if 'amd64' in sys.version.lower():\n", + " r_comp ='/COMPONENTS=\"main,x64,translations'\n", + "else:\n", + " r_comp ='/COMPONENTS=\"main,i386,translations'\n", + "os.environ[\"tmp_R_comp\"]=r_comp\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, "outputs": [], "source": [ - "# let's install it \n", + "# let's install it, if hashes do match\n", + "assert give_hash(r_installer, hashlib.md5) == hashes[0]\n", + "assert give_hash(r_installer, hashlib.sha1) == hashes[1]\n", "# If you are \"USB life style\", or multi-winpython\n", "# ==> CLICK the OPTION \"Don't create a StartMenuFolder' <== (when it will show up)\n", - "os.environ[\"tmp_R_comp\"]=r_comp\n", + "\n", "!start cmd /C %r_installer% /DIR=%tmp_Rbase% %tmp_R_comp%" ] }, @@ -171,15 +161,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### 2 - create a R_launcher and install irkernel" + "### 3 - create a R_launcher and install irkernel" ] }, { "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, + "execution_count": 10, + "metadata": {}, "outputs": [], "source": [ "import os\n", @@ -217,16 +205,14 @@ }, { "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, + "execution_count": 11, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "!start cmd /C %WINPYDIR%\\..\\scripts\\R_launcher.bat --no-restore --no-save C:\\WinPython\\basedir35\\buildQt5\\winpython-64bit-3.5.2.3Qt5b2\\scripts\\R_initialization.r\n" + "!start cmd /C %WINPYDIR%\\..\\scripts\\R_launcher.bat --no-restore --no-save C:\\WinPython\\basedir36\\buildQt5\\winpython-64bit-3.6.x.0\\scripts\\R_initialization.r\n" ] } ], @@ -237,10 +223,8 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, + "execution_count": 12, + "metadata": {}, "outputs": [], "source": [ "# Launch Rkernel setup\n", @@ -250,16 +234,14 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, + "execution_count": 13, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "patching C:\\WinPython\\basedir35\\buildQt5\\winpython-64bit-3.5.2.3Qt5b2\\settings\\kernels\\ir\\kernel.json from C:/WinPython/basedir35/buildQt5/winpython-64bit-3.5.2.3Qt5b2 to {prefix}/..\n" + "patching C:\\WinPython\\basedir36\\buildQt5\\winpython-64bit-3.6.x.0\\settings\\kernels\\ir\\kernel.json from C:/WinPython/basedir36/buildQt5/winpython-64bit-3.6.x.0 to {prefix}/..\n" ] } ], @@ -275,19 +257,15 @@ }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, + "metadata": {}, "source": [ - "### 3- Install a R package via a IPython Kernel" + "### 4- Install a R package via a IPython Kernel" ] }, { "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, + "execution_count": 14, + "metadata": {}, "outputs": [], "source": [ "%load_ext rpy2.ipython\n", @@ -301,15 +279,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### 4- Small demo via R magic" + "### 5- Small demo via R magic" ] }, { "cell_type": "code", - "execution_count": 10, - "metadata": { - "collapsed": false - }, + "execution_count": 15, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -326,10 +302,8 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": { - "collapsed": false - }, + "execution_count": 16, + "metadata": {}, "outputs": [], "source": [ "%%R\n", @@ -340,15 +314,26 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": { - "collapsed": false - }, + "execution_count": 17, + "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| alt | \n", "tz | \n", "dst | \n", + "tzone | \n", "dest | \n", "||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | \n", - "IAH | \n", - "George Bush Intercontinental | \n", - "29.984433 | \n", - "-95.341442 | \n", - "97 | \n", - "-6.0 | \n", + "ABQ | \n", + "Albuquerque International Sunport | \n", + "35.040222 | \n", + "-106.609194 | \n", + "5355 | \n", + "-7.0 | \n", "A | \n", - "IAH | \n", + "America/Denver | \n", + "ABQ | \n", "
| 2 | \n", - "MIA | \n", - "Miami Intl | \n", - "25.793250 | \n", - "-80.290556 | \n", - "8 | \n", + "ACK | \n", + "Nantucket Mem | \n", + "41.253053 | \n", + "-70.060181 | \n", + "48 | \n", "-5.0 | \n", "A | \n", - "MIA | \n", + "America/New_York | \n", + "ACK | \n", "|
| 3 | \n", - "ATL | \n", - "Hartsfield Jackson Atlanta Intl | \n", - "33.636719 | \n", - "-84.428067 | \n", - "1026 | \n", + "ALB | \n", + "Albany Intl | \n", + "42.748267 | \n", + "-73.801692 | \n", + "285 | \n", "-5.0 | \n", "A | \n", - "ATL | \n", + "America/New_York | \n", + "ALB | \n", "|
| 4 | \n", - "ORD | \n", - "Chicago Ohare Intl | \n", - "41.978603 | \n", - "-87.904842 | \n", - "668 | \n", - "-6.0 | \n", + "ANC | \n", + "Ted Stevens Anchorage Intl | \n", + "61.174361 | \n", + "-149.996361 | \n", + "152 | \n", + "-9.0 | \n", "A | \n", - "ORD | \n", + "America/Anchorage | \n", + "ANC | \n", "
| 5 | \n", - "FLL | \n", - "Fort Lauderdale Hollywood Intl | \n", - "26.072583 | \n", - "-80.152750 | \n", - "9 | \n", + "ATL | \n", + "Hartsfield Jackson Atlanta Intl | \n", + "33.636719 | \n", + "-84.428067 | \n", + "1026 | \n", "-5.0 | \n", "A | \n", - "FLL | \n", + "America/New_York | \n", + "ATL | \n", "|
| 6 | \n", - "IAD | \n", - "Washington Dulles Intl | \n", - "38.944533 | \n", - "-77.455811 | \n", - "313 | \n", - "-5.0 | \n", + "AUS | \n", + "Austin Bergstrom Intl | \n", + "30.194528 | \n", + "-97.669889 | \n", + "542 | \n", + "-6.0 | \n", "A | \n", - "IAD | \n", + "America/Chicago | \n", + "AUS | \n", "