diff --git a/StartHere.ipynb b/StartHere.ipynb index 1ddbea54f4..53df2c5fc0 100644 --- a/StartHere.ipynb +++ b/StartHere.ipynb @@ -12,59 +12,60 @@ "\n", "[The Jupyter documentation](http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Running%20Code.html) covers interacting with code cells, markdown, and notebooks. The tutorials below show the features of the BeakerX extension.\n", "\n", - "### Languages\n", + "BeakerX's plots and tables also feature an innovative approach to the [scroll wheel and zoom gestures](doc/python/ScrollZoom.ipynb).\n", + "\n", + "## Languages\n", "[Groovy](doc/groovy/Groovy.ipynb), [Java](doc/java/Java.ipynb), [Scala](doc/scala/Scala.ipynb), [Clojure](doc/clojure/Clojure.ipynb), [SQL](doc/sql/Sql.ipynb), [Kotlin](doc/kotlin/Kotlin.ipynb).\n", "\n", - "### Magics\n", + "## Magics\n", "[Timing](doc/groovy/TimingMagicCommands.ipynb), [Classpath and Imports](doc/groovy/ClasspathMagicCommands.ipynb), [Polyglot Magics](doc/groovy/PolyglotMagic.ipynb), [Defining New Magics](doc/groovy/LoadMagicCommand.ipynb).\n", "\n", - "### Options Panels\n", + "## Options Panels\n", "[Properties, Heap Size, and other JVM Options](doc/groovy/JavaArgs.ipynb), [UI Options](doc/groovy/UIOptions.ipynb).\n", "\n", - "### Autotranslation\n", + "## Autotranslation\n", "[Python](doc/python/AutoTranslation.ipynb), [Groovy](doc/groovy/AutoTranslation.ipynb).\n", "\n", - "### Groovy Plotting and Charting\n", - "[Example and Interaction](doc/groovy/Charting.ipynb), [Time Series and General APIs and Features](doc/groovy/PlotFeatures.ipynb), [Category Plots and Bar Charts](doc/groovy/CategoryPlot.ipynb), [Levels of Detail](doc/groovy/LevelsOfDetails.ipynb), [Histograms](doc/groovy/Histogram.ipynb), [Heatmaps](doc/groovy/Heatmap.ipynb), [Treemaps](doc/groovy/Treemap.ipynb), [Plot Actions](doc/groovy/PlotActions.ipynb), [Plot Seamless Updates](doc/groovy/PlotsPythonStyle.ipynb), [Second Y Axis](doc/groovy/2ndYaxis.ipynb), [3D Visualization and Maps](doc/groovy/3D.ipynb).\n", + "## Groovy Plotting and Charting\n", + "[Example and Interaction](doc/groovy/Charting.ipynb), [Time Series and General APIs and Features](doc/groovy/PlotFeatures.ipynb), [Category Plots and Bar Charts](doc/groovy/CategoryPlot.ipynb), [Levels of Detail](doc/groovy/LevelsOfDetails.ipynb), [Histograms](doc/groovy/Histogram.ipynb), [Heatmaps](doc/groovy/Heatmap.ipynb), [Treemaps](doc/groovy/Treemap.ipynb), [Plot Actions](doc/groovy/PlotActions.ipynb), [Plot Seamless Updates](doc/groovy/PlotsPythonStyle.ipynb), [3D Visualization and Maps](doc/groovy/3D.ipynb).\n", "\n", - "### Table Display\n", + "## Table Display\n", "[Groovy API including Actions](doc/groovy/TableAPI.ipynb), [64-Bit Integers and BigNums](doc/groovy/BigInts.ipynb), [Automatic Display of Simple Data Structures](doc/groovy/MapLikeTable.ipynb), [Handling of Large Tables](doc/groovy/BigTable.ipynb).\n", "\n", - "### BeakerX Plotting in Other Languages\n", + "## BeakerX Plotting in Other Languages\n", "[JavaScript](doc/python/PlotJSAPI.ipynb), [Python](doc/python/ChartingAPI.ipynb), [Scala](doc/scala/Plot.ipynb).\n", "\n", - "### Python\n", - "\n", + "## Python\n", "[Tables including pandas integration](doc/python/TableAPI.ipynb), [Time Series](doc/python/ChartingAPI.ipynb), [Heatmaps](doc/python/Heatmap.ipynb), [Category Plots](doc/python/CategoryPlot.ipynb), [Treemaps](doc/python/Treemap.ipynb), [Histograms](doc/python/Histogram.ipynb), [EasyForm](doc/python/EasyForm.ipynb), [Output Containers](doc/python/OutputContainers.ipynb), [Magics to access the JVM](doc/python/KernelMagics.ipynb).\n", "\n", - "### Scala\n", + "## Scala\n", "[Tables](doc/scala/TableAPI.ipynb), [Plotting](doc/scala/Plot.ipynb), [EasyForm](doc/scala/EasyForm.ipynb).\n", "\n", - "### Rich Outputs and Displayer Customization\n", + "## Rich Outputs and Displayer Customization\n", "\n", "[Media and MIME Outputs](doc/groovy/Mime.ipynb), [General Display](doc/groovy/GeneralDisplay.ipynb), \n", "[Display of Null](doc/groovy/showNullExecutionResult.ipynb), [Custom Displayers and `jvm-repr`](doc/groovy/JvmRepr.ipynb).\n", "\n", - "### Forms, Widgets, and Interaction\n", + "## Forms, Widgets, and Interaction\n", "[EasyForm](doc/groovy/EasyForm.ipynb), [Output Widget](doc/groovy/OutputWidget.ipynb), [Output Containers and Layout Managers](doc/groovy/OutputContainers.ipynb), [Groovy interface to Jupyter JS Widgets](doc/groovy/JavaWidgets.ipynb), [Interactive recomputation](doc/groovy/Interactive.ipynb).\n", "\n", - "### Automation\n", + "## Automation\n", "[Progress Reporting API](doc/groovy/ProgressUpdateReporting.ipynb), [Initialization Cells](doc/python/InitCells.ipynb), [Get Code](doc/groovy/CodeCell.ipynb), [Run Another Cell](doc/groovy/RunCells.ipynb).\n", "\n", - "### Tablesaw\n", + "## Tablesaw\n", "[Tablesaw](doc/groovy/Tablesaw.ipynb) Pandas for the JVM.\n", "\n", - "### Spark\n", + "## Spark\n", "[Plain Spark](doc/scala/Spark.ipynb) cluster computing using on Scala, [Spark Magic](doc/scala/SparkUI.ipynb) for deeper integration, and the [Flint](doc/scala/Flint.ipynb) time series library.\n", "\n", - "### More Integrations\n", + "## More Integrations\n", "[DataVec](doc/groovy/DataVec.ipynb) (DeepLearning4j), [STIL](doc/groovy/STIL.ipynb) (Starlink Tables Infrastructure Library).\n", "\n", - "## Learn More\n", + "# Learn More\n", "On the web at the homepage [BeakerX.com](http://beakerx.com), on [GitHub](https://github.com/twosigma/beakerx), and on [Two Sigma's Open Source site](http://opensource.twosigma.com/).\n", "\n", - "## Open Source\n", - "BeakerX's full source code and documentation are available on [GitHub](https://github.com/twosigma/beakerx) under the Apache 2.0 license." + "# Open Source\n", + "BeakerX's full source code and documentation are available on [GitHub](https://github.com/twosigma/beakerx) under the Apache 2.0 license.\n" ] } ], @@ -85,6 +86,19 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": false, + "sideBar": false, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": false, + "toc_window_display": false } }, "nbformat": 4, diff --git a/doc/python/ScrollZoom.ipynb b/doc/python/ScrollZoom.ipynb new file mode 100644 index 0000000000..9ad7241d14 --- /dev/null +++ b/doc/python/ScrollZoom.ipynb @@ -0,0 +1,138 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Scroll and Zoom\n", + "\n", + "BeakerX's table and plot widgets both support the scroll wheel.\n", + "For tables, the scroll wheel scrolls vertically.\n", + "For plots, the scroll wheel zooms.\n", + "However, for the notebook as a whole, the scroll wheel also has a meaning, to scroll the notebook.\n", + "So there's an ambiguity, and the UI needs a way to resolve it and decide where the scroll events go.\n", + "\n", + "BeakerX's approach starts with idea of *focus*, a widget that would be the target of any user commands.\n", + "And indeed, in BeakerX when you click on a table or a plot, it gets the focus.\n", + "This is represented by a green outline around the widget.\n", + "The outline is styled to match the blue one that Jupyter uses to indicate the current cell.\n", + "\n", + "The widget will keep the focus as long as the mouse remains over it. Feel free to interact with the widget, clicking, scrolling, and zooming away. When you are done and move the mouse elsewhere, the green outline will vanish. Focus as returned to the notebook, and the next scroll event will go to the page, and not to a widget.\n", + "\n", + "This **keyless blur** is a BeakerX innovation.\n", + "\n", + "Try it with the widgets below:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "from beakerx import *" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "741ea1cb230c45ebb009ec5a32adac0a", + "version_major": 2, + "version_minor": 0 + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "TableDisplay([{'y1':4, 'm3':2, 'z2':1}, {'m3':4, 'z2':2}])" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "f819252f96964dff8e12f5c49a247926", + "version_major": 2, + "version_minor": 0 + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "pd.read_csv('../resources/data/interest-rates.csv')" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "3ecf806f0084493dbd2de1354a3f748e", + "version_major": 2, + "version_minor": 0 + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "rng = pd.date_range('1/1/2011', periods=1000, freq='H')\n", + "ts = pd.Series(np.random.randn(len(rng)), index=rng)\n", + "df = pd.DataFrame(ts, columns=['mV'])\n", + "SimpleTimePlot(df, ['mV'])" + ] + } + ], + "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.5" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": false, + "sideBar": false, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": false, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}