diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0e15f15..a7aae4b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -19,7 +19,7 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v1
- name: Setup conda
- uses: goanpeca/setup-miniconda@v1
+ uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ibis-vega-transform
environment-file: binder/environment.yml
diff --git a/README.md b/README.md
index fd38c4b..904e925 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,8 @@ source = pd.DataFrame({
'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]
})
-connection = ibis.pandas.connect({'source': source })
+# or ibis.pandas if ibis version < 1.4
+connection = ibis.backends.pandas.connect({'source': source })
table = connection.table('source')
alt.Chart(table).mark_bar().encode(
@@ -44,7 +45,6 @@ Importing `ibis_vega_transform` sets the `altair` renderer and data transformer
Now, whenever you pass an `ibis` expression to a chart constructor, it will use the custom ibis renderer, which pushes all data aggregates to ibis, instead of in the browser.
-
You can also set a debug flag, to have it instead pull in the first N rows of the ibis expression and use the default renderer. This is useful to see how the default pipeline would have rendered your chart. If you are getting some error, I reccomend setting this first to see if the error was on the Altair side or on the `ibis-vega-transform` side. If the fallback chart rendered correctly, it means the error is in this codebase. If it's wrong, then the error is in your code or in altair or in Vega.
```python
diff --git a/binder/environment.yml b/binder/environment.yml
index bb15d1a..529b7c5 100644
--- a/binder/environment.yml
+++ b/binder/environment.yml
@@ -4,8 +4,13 @@ channels:
dependencies:
- jaeger
- jupyterlab>=2
- - pymapd
- - python>=3.7
+ # force the pandas used by pymapd
+ - pandas <0.26,>=0.25
+ # use the latest version of pymapd to keep compatibility with ibis
+ # - pymapd >=0.24
+ # ibis doesn't support python 3.6 anymore
+ # ibis.omniscidb doesn't support 3.8 yet
+ - python 3.7
- nodejs>=12
- notebook
- tornado
diff --git a/config/jest/jest-puppeteer.config.js b/config/jest/jest-puppeteer.config.js
index 66abaf3..b7392ee 100644
--- a/config/jest/jest-puppeteer.config.js
+++ b/config/jest/jest-puppeteer.config.js
@@ -5,13 +5,17 @@
* Distributed under the terms of the 3-Clause BSD License.
*/
+let os = require('os');
+
const portNumber = 8080;
let browserExecutablePath = '';
// Use Chrome if running test suit locally
if (process.env.CI !== 'true') {
- browserExecutablePath =
- '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
+ if (os.type() === 'Darwin') {
+ browserExecutablePath =
+ '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
+ }
}
const config = {
diff --git a/examples/Geocharts.ipynb b/examples/Geocharts.ipynb
index 5bd62c5..a528d7a 100644
--- a/examples/Geocharts.ipynb
+++ b/examples/Geocharts.ipynb
@@ -121,9 +121,14 @@
},
"outputs": [],
"source": [
- "import ibis\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
"\n",
- "omnisci_cli = ibis.omniscidb.connect(\n",
+ "omnisci_cli = ibis_omniscidb.connect(\n",
" host='metis.mapd.com', user='mapd', password='HyperInteractive',\n",
" port=443, database='mapd', protocol= 'https'\n",
")\n",
diff --git a/examples/Talk.ipynb b/examples/Talk.ipynb
index f219ba2..011ba3e 100644
--- a/examples/Talk.ipynb
+++ b/examples/Talk.ipynb
@@ -16,10 +16,15 @@
"source": [
"import altair as alt\n",
"import ibis_vega_transform\n",
- "import ibis.omniscidb\n",
"\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
"\n",
- "conn = ibis.omniscidb.connect(\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='metis.mapd.com', user='demouser', password='HyperInteractive',\n",
" port=443, database='mapd', protocol= 'https'\n",
")"
diff --git a/examples/Talk/Untitled.ipynb b/examples/Talk/Untitled.ipynb
index 0ea6c9a..961e720 100644
--- a/examples/Talk/Untitled.ipynb
+++ b/examples/Talk/Untitled.ipynb
@@ -16,10 +16,16 @@
"source": [
"import altair as alt\n",
"import ibis_vega_transform\n",
- "import ibis.omniscidb\n",
+ "import ibis\n",
"\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
"\n",
- "conn = ibis.omniscidb.connect(\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='bewdy.mapd.com', user='mapd', password='HyperInteractive',\n",
" port=6274, database='mapd', protocol= 'binary'\n",
")"
@@ -829,7 +835,7 @@
},
"outputs": [],
"source": [
- "# conn = ibis.omniscidb.connect(\n",
+ "# conn = ibis_omniscidb.connect(\n",
"# host='localhost', password='HyperInteractive', user='admin',\n",
"# port=6274, protocol= 'binary'\n",
"# )"
diff --git a/examples/Talk/Untitled1.ipynb b/examples/Talk/Untitled1.ipynb
index 70e83b8..4e6c519 100644
--- a/examples/Talk/Untitled1.ipynb
+++ b/examples/Talk/Untitled1.ipynb
@@ -16,10 +16,15 @@
"source": [
"import altair as alt\n",
"import ibis_vega_transform\n",
- "import ibis.omniscidb\n",
"\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
"\n",
- "conn = ibis.omniscidb.connect(\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='bewdy.mapd.com', user='mapd', password='HyperInteractive',\n",
" port=6274, database='mapd', protocol= 'binary'\n",
")"
diff --git a/examples/Talk/Untitled2.ipynb b/examples/Talk/Untitled2.ipynb
index cb95ef0..e96aed3 100644
--- a/examples/Talk/Untitled2.ipynb
+++ b/examples/Talk/Untitled2.ipynb
@@ -16,10 +16,15 @@
"source": [
"import altair as alt\n",
"import ibis_vega_transform\n",
- "import ibis.omniscidb\n",
"\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
"\n",
- "conn = ibis.omniscidb.connect(\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='bewdy.mapd.com', user='mapd', password='HyperInteractive',\n",
" port=6274, database='mapd', protocol= 'binary'\n",
")"
diff --git a/examples/charting-example.ipynb b/examples/charting-example.ipynb
index 2737067..ffa8da3 100644
--- a/examples/charting-example.ipynb
+++ b/examples/charting-example.ipynb
@@ -20,24 +20,21 @@
},
{
"cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:27:13.775997Z",
- "iopub.status.busy": "2020-10-02T17:27:13.775769Z",
- "iopub.status.idle": "2020-10-02T17:27:14.716456Z",
- "shell.execute_reply": "2020-10-02T17:27:14.715792Z",
- "shell.execute_reply.started": "2020-10-02T17:27:13.775972Z"
- }
- },
+ "execution_count": null,
+ "metadata": {},
"outputs": [],
"source": [
"import altair as alt\n",
"import ibis_vega_transform\n",
- "import ibis.omniscidb\n",
"\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
"\n",
- "conn = ibis.omniscidb.connect(\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='metis.mapd.com', user='demouser', password='HyperInteractive',\n",
" port=443, database='mapd', protocol= 'https'\n",
")"
@@ -45,40 +42,9 @@
},
{
"cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:27:31.344804Z",
- "iopub.status.busy": "2020-10-02T17:27:31.344521Z",
- "iopub.status.idle": "2020-10-02T17:27:31.843225Z",
- "shell.execute_reply": "2020-10-02T17:27:31.842691Z",
- "shell.execute_reply.started": "2020-10-02T17:27:31.344770Z"
- }
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "['flights_donotmodify',\n",
- " 'contributions_donotmodify',\n",
- " 'tweets_nov_feb',\n",
- " 'zipcodes_orig',\n",
- " 'zipcodes',\n",
- " 'demo_vote_clean',\n",
- " 'us_faults',\n",
- " 'zipcodes_2017',\n",
- " 'us_county_level_tiger_edges_2018',\n",
- " 'ca_roads_tiger',\n",
- " 'input_node',\n",
- " 'uk_wells',\n",
- " 'RentalListings']"
- ]
- },
- "execution_count": 3,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"conn.list_tables()"
]
@@ -92,16 +58,8 @@
},
{
"cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:27:48.960263Z",
- "iopub.status.busy": "2020-10-02T17:27:48.960068Z",
- "iopub.status.idle": "2020-10-02T17:27:50.478390Z",
- "shell.execute_reply": "2020-10-02T17:27:50.477807Z",
- "shell.execute_reply.started": "2020-10-02T17:27:48.960242Z"
- }
- },
+ "execution_count": null,
+ "metadata": {},
"outputs": [],
"source": [
"t = conn.table(\"flights_donotmodify\")"
@@ -109,90 +67,9 @@
},
{
"cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": true,
- "execution": {
- "iopub.execute_input": "2020-10-02T17:27:55.509674Z",
- "iopub.status.busy": "2020-10-02T17:27:55.509430Z",
- "iopub.status.idle": "2020-10-02T17:27:55.516186Z",
- "shell.execute_reply": "2020-10-02T17:27:55.515520Z",
- "shell.execute_reply.started": "2020-10-02T17:27:55.509647Z"
- },
- "jupyter": {
- "outputs_hidden": true
- }
- },
- "outputs": [
- {
- "data": {
- "text/plain": [
- "DatabaseTable[table]\n",
- " name: flights_donotmodify\n",
- " schema:\n",
- " flight_year : int16\n",
- " flight_month : int16\n",
- " flight_dayofmonth : int16\n",
- " flight_dayofweek : int16\n",
- " deptime : int16\n",
- " crsdeptime : int16\n",
- " arrtime : int16\n",
- " crsarrtime : int16\n",
- " uniquecarrier : string\n",
- " flightnum : int16\n",
- " tailnum : string\n",
- " actualelapsedtime : int16\n",
- " crselapsedtime : int16\n",
- " airtime : int16\n",
- " arrdelay : int16\n",
- " depdelay : int16\n",
- " origin : string\n",
- " dest : string\n",
- " distance : int16\n",
- " taxiin : int16\n",
- " taxiout : int16\n",
- " cancelled : int16\n",
- " cancellationcode : string\n",
- " diverted : int16\n",
- " carrierdelay : int16\n",
- " weatherdelay : int16\n",
- " nasdelay : int16\n",
- " securitydelay : int16\n",
- " lateaircraftdelay : int16\n",
- " dep_timestamp : timestamp\n",
- " arr_timestamp : timestamp\n",
- " carrier_name : string\n",
- " plane_type : string\n",
- " plane_manufacturer : string\n",
- " plane_issue_date : date\n",
- " plane_model : string\n",
- " plane_status : string\n",
- " plane_aircraft_type : string\n",
- " plane_engine_type : string\n",
- " plane_year : int16\n",
- " origin_name : string\n",
- " origin_city : string\n",
- " origin_state : string\n",
- " origin_country : string\n",
- " origin_lat : float32\n",
- " origin_lon : float32\n",
- " dest_name : string\n",
- " dest_city : string\n",
- " dest_state : string\n",
- " dest_country : string\n",
- " dest_lat : float32\n",
- " dest_lon : float32\n",
- " origin_merc_x : float32\n",
- " origin_merc_y : float32\n",
- " dest_merc_x : float32\n",
- " dest_merc_y : float32"
- ]
- },
- "execution_count": 5,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"t"
]
@@ -206,312 +83,18 @@
},
{
"cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": true,
- "execution": {
- "iopub.execute_input": "2020-10-02T17:28:05.228983Z",
- "iopub.status.busy": "2020-10-02T17:28:05.228644Z",
- "iopub.status.idle": "2020-10-02T17:28:05.867488Z",
- "shell.execute_reply": "2020-10-02T17:28:05.866950Z",
- "shell.execute_reply.started": "2020-10-02T17:28:05.228918Z"
- },
- "jupyter": {
- "outputs_hidden": true
- }
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Table rows: 7009728\n",
- "\n",
- "Column Type Non-null #\n",
- "------ ---- ----------\n",
- "flight_yearint16 7009728 \n",
- "flight_monthint16 7009728 \n",
- "flight_dayofmonthint16 7009728 \n",
- "flight_dayofweekint16 7009728 \n",
- "deptime int16 6873482 \n",
- "crsdeptimeint16 7009728 \n",
- "arrtime int16 6858079 \n",
- "crsarrtimeint16 7009728 \n",
- "uniquecarrierString(nullable=True)7009728 \n",
- "flightnum int16 7009728 \n",
- "tailnum String(nullable=True)6926363 \n",
- "actualelapsedtimeint16 6855029 \n",
- "crselapsedtimeint16 7008884 \n",
- "airtime int16 6855029 \n",
- "arrdelay int16 6855029 \n",
- "depdelay int16 6873482 \n",
- "origin String(nullable=True)7009728 \n",
- "dest String(nullable=True)7009728 \n",
- "distance int16 7009728 \n",
- "taxiin int16 6858079 \n",
- "taxiout int16 6872670 \n",
- "cancelled int16 7009728 \n",
- "cancellationcodeString(nullable=True)137434 \n",
- "diverted int16 7009728 \n",
- "carrierdelayint16 1524735 \n",
- "weatherdelayint16 1524735 \n",
- "nasdelay int16 1524735 \n",
- "securitydelayint16 1524735 \n",
- "lateaircraftdelayint16 1524735 \n",
- "dep_timestampTimestamp(timezone=None, nullable=True)6873482 \n",
- "arr_timestampTimestamp(timezone=None, nullable=True)6858079 \n",
- "carrier_nameString(nullable=True)7009728 \n",
- "plane_typeString(nullable=True)6199619 \n",
- "plane_manufacturerString(nullable=True)6199619 \n",
- "plane_issue_datedate 6199385 \n",
- "plane_modelString(nullable=True)6199619 \n",
- "plane_statusString(nullable=True)6199619 \n",
- "plane_aircraft_typeString(nullable=True)6199619 \n",
- "plane_engine_typeString(nullable=True)6199619 \n",
- "plane_yearint16 5996236 \n",
- "origin_nameString(nullable=True)7009728 \n",
- "origin_cityString(nullable=True)7009728 \n",
- "origin_stateString(nullable=True)7009728 \n",
- "origin_countryString(nullable=True)7009728 \n",
- "origin_latfloat32 7009728 \n",
- "origin_lonfloat32 7009728 \n",
- "dest_name String(nullable=True)7009728 \n",
- "dest_city String(nullable=True)7009728 \n",
- "dest_stateString(nullable=True)7009728 \n",
- "dest_countryString(nullable=True)7009728 \n",
- "dest_lat float32 7009728 \n",
- "dest_lon float32 7009728 \n",
- "origin_merc_xfloat32 7009728 \n",
- "origin_merc_yfloat32 7009728 \n",
- "dest_merc_xfloat32 7009728 \n",
- "dest_merc_yfloat32 7009728 \n"
- ]
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"t.info()"
]
},
{
"cell_type": "code",
- "execution_count": 12,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:28:44.900924Z",
- "iopub.status.busy": "2020-10-02T17:28:44.900697Z",
- "iopub.status.idle": "2020-10-02T17:28:45.806880Z",
- "shell.execute_reply": "2020-10-02T17:28:45.806333Z",
- "shell.execute_reply.started": "2020-10-02T17:28:44.900899Z"
- }
- },
- "outputs": [
- {
- "data": {
- "text/html": [
- "
\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " flight_year | \n",
- " flight_month | \n",
- " flight_dayofmonth | \n",
- " flight_dayofweek | \n",
- " deptime | \n",
- " crsdeptime | \n",
- " arrtime | \n",
- " crsarrtime | \n",
- " uniquecarrier | \n",
- " flightnum | \n",
- " ... | \n",
- " dest_name | \n",
- " dest_city | \n",
- " dest_state | \n",
- " dest_country | \n",
- " dest_lat | \n",
- " dest_lon | \n",
- " origin_merc_x | \n",
- " origin_merc_y | \n",
- " dest_merc_x | \n",
- " dest_merc_y | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " 0 | \n",
- " 2008 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2 | \n",
- " 1922 | \n",
- " 1900 | \n",
- " 2046 | \n",
- " 2002 | \n",
- " XE | \n",
- " 2907 | \n",
- " ... | \n",
- " Lafayette Regional | \n",
- " Lafayette | \n",
- " LA | \n",
- " USA | \n",
- " 30.205280 | \n",
- " -91.987656 | \n",
- " -10613169.0 | \n",
- " 3501040.00 | \n",
- " -10240019.0 | \n",
- " 3529964.00 | \n",
- "
\n",
- " \n",
- " 1 | \n",
- " 2008 | \n",
- " 1 | \n",
- " 18 | \n",
- " 5 | \n",
- " 1044 | \n",
- " 1015 | \n",
- " 1205 | \n",
- " 1139 | \n",
- " XE | \n",
- " 2545 | \n",
- " ... | \n",
- " Newark Intl | \n",
- " Newark | \n",
- " NJ | \n",
- " USA | \n",
- " 40.692497 | \n",
- " -74.168663 | \n",
- " -7952336.5 | \n",
- " 5302010.00 | \n",
- " -8256417.5 | \n",
- " 4967090.50 | \n",
- "
\n",
- " \n",
- " 2 | \n",
- " 2008 | \n",
- " 1 | \n",
- " 5 | \n",
- " 6 | \n",
- " 1413 | \n",
- " 1405 | \n",
- " 1530 | \n",
- " 1524 | \n",
- " XE | \n",
- " 2155 | \n",
- " ... | \n",
- " George Bush Intercontinental | \n",
- " Houston | \n",
- " TX | \n",
- " USA | \n",
- " 29.980473 | \n",
- " -95.339722 | \n",
- " -10027202.0 | \n",
- " 3804225.75 | \n",
- " -10613169.0 | \n",
- " 3501040.00 | \n",
- "
\n",
- " \n",
- " 3 | \n",
- " 2008 | \n",
- " 1 | \n",
- " 10 | \n",
- " 4 | \n",
- " 1544 | \n",
- " 1539 | \n",
- " 1650 | \n",
- " 1643 | \n",
- " XE | \n",
- " 2169 | \n",
- " ... | \n",
- " Monroe Regional | \n",
- " Monroe | \n",
- " LA | \n",
- " USA | \n",
- " 32.510864 | \n",
- " -92.037689 | \n",
- " -10613169.0 | \n",
- " 3501040.00 | \n",
- " -10245589.0 | \n",
- " 3830558.00 | \n",
- "
\n",
- " \n",
- " 4 | \n",
- " 2008 | \n",
- " 1 | \n",
- " 6 | \n",
- " 7 | \n",
- " 1432 | \n",
- " 1435 | \n",
- " 1548 | \n",
- " 1554 | \n",
- " XE | \n",
- " 2849 | \n",
- " ... | \n",
- " Mobile Regional | \n",
- " Mobile | \n",
- " AL | \n",
- " USA | \n",
- " 30.691416 | \n",
- " -88.242836 | \n",
- " -10613169.0 | \n",
- " 3501040.00 | \n",
- " -9823147.0 | \n",
- " 3592738.25 | \n",
- "
\n",
- " \n",
- "
\n",
- "
5 rows × 56 columns
\n",
- "
"
- ],
- "text/plain": [
- " flight_year flight_month flight_dayofmonth flight_dayofweek deptime \\\n",
- "0 2008 1 1 2 1922 \n",
- "1 2008 1 18 5 1044 \n",
- "2 2008 1 5 6 1413 \n",
- "3 2008 1 10 4 1544 \n",
- "4 2008 1 6 7 1432 \n",
- "\n",
- " crsdeptime arrtime crsarrtime uniquecarrier flightnum ... \\\n",
- "0 1900 2046 2002 XE 2907 ... \n",
- "1 1015 1205 1139 XE 2545 ... \n",
- "2 1405 1530 1524 XE 2155 ... \n",
- "3 1539 1650 1643 XE 2169 ... \n",
- "4 1435 1548 1554 XE 2849 ... \n",
- "\n",
- " dest_name dest_city dest_state dest_country \\\n",
- "0 Lafayette Regional Lafayette LA USA \n",
- "1 Newark Intl Newark NJ USA \n",
- "2 George Bush Intercontinental Houston TX USA \n",
- "3 Monroe Regional Monroe LA USA \n",
- "4 Mobile Regional Mobile AL USA \n",
- "\n",
- " dest_lat dest_lon origin_merc_x origin_merc_y dest_merc_x dest_merc_y \n",
- "0 30.205280 -91.987656 -10613169.0 3501040.00 -10240019.0 3529964.00 \n",
- "1 40.692497 -74.168663 -7952336.5 5302010.00 -8256417.5 4967090.50 \n",
- "2 29.980473 -95.339722 -10027202.0 3804225.75 -10613169.0 3501040.00 \n",
- "3 32.510864 -92.037689 -10613169.0 3501040.00 -10245589.0 3830558.00 \n",
- "4 30.691416 -88.242836 -10613169.0 3501040.00 -9823147.0 3592738.25 \n",
- "\n",
- "[5 rows x 56 columns]"
- ]
- },
- "execution_count": 12,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"t.head().execute()"
]
@@ -527,16 +110,8 @@
},
{
"cell_type": "code",
- "execution_count": 13,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:29:36.679321Z",
- "iopub.status.busy": "2020-10-02T17:29:36.679069Z",
- "iopub.status.idle": "2020-10-02T17:29:36.683645Z",
- "shell.execute_reply": "2020-10-02T17:29:36.682781Z",
- "shell.execute_reply.started": "2020-10-02T17:29:36.679293Z"
- }
- },
+ "execution_count": null,
+ "metadata": {},
"outputs": [],
"source": [
"states = alt.selection_multi(fields=['origin_state'])"
@@ -544,16 +119,8 @@
},
{
"cell_type": "code",
- "execution_count": 15,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:36:32.533960Z",
- "iopub.status.busy": "2020-10-02T17:36:32.533718Z",
- "iopub.status.idle": "2020-10-02T17:36:32.537202Z",
- "shell.execute_reply": "2020-10-02T17:36:32.536423Z",
- "shell.execute_reply.started": "2020-10-02T17:36:32.533933Z"
- }
- },
+ "execution_count": null,
+ "metadata": {},
"outputs": [],
"source": [
"ibis_vega_transform.enable_debug()"
@@ -561,654 +128,9 @@
},
{
"cell_type": "code",
- "execution_count": 17,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:40:26.630436Z",
- "iopub.status.busy": "2020-10-02T17:40:26.630159Z",
- "iopub.status.idle": "2020-10-02T17:40:26.737219Z",
- "shell.execute_reply": "2020-10-02T17:40:26.735891Z",
- "shell.execute_reply.started": "2020-10-02T17:40:26.630400Z"
- }
- },
- "outputs": [
- {
- "data": {
- "application/json": {
- "query:initial": {
- "parameters": {},
- "sql": "SELECT *\nFROM flights_donotmodify",
- "transforms": [
- {
- "as": [
- "__count"
- ],
- "fields": [
- null
- ],
- "groupby": [
- "origin_state"
- ],
- "ops": [
- "count"
- ],
- "type": "aggregate"
- }
- ]
- },
- "query:result": {
- "sql": "SELECT \"origin_state\", count(*) AS __count\nFROM flights_donotmodify\nGROUP BY origin_state",
- "transforms": [
- {
- "as": [
- "__count"
- ],
- "fields": [
- null
- ],
- "groupby": [
- "origin_state"
- ],
- "ops": [
- "count"
- ],
- "type": "aggregate"
- }
- ],
- "values": [
- {
- "__count": 747650,
- "origin_state": "TX"
- },
- {
- "__count": 210702,
- "origin_state": "VA"
- },
- {
- "__count": 60057,
- "origin_state": "IN"
- },
- {
- "__count": 331333,
- "origin_state": "NY"
- },
- {
- "__count": 22798,
- "origin_state": "MS"
- },
- {
- "__count": 466998,
- "origin_state": "FL"
- },
- {
- "__count": 198742,
- "origin_state": "NV"
- },
- {
- "__count": 824597,
- "origin_state": "CA"
- },
- {
- "__count": 33668,
- "origin_state": "AR"
- },
- {
- "__count": 132190,
- "origin_state": "MO"
- },
- {
- "__count": 461237,
- "origin_state": "IL"
- },
- {
- "__count": 18588,
- "origin_state": "NH"
- },
- {
- "__count": 67181,
- "origin_state": "LA"
- },
- {
- "__count": 50980,
- "origin_state": "OK"
- },
- {
- "__count": 30044,
- "origin_state": "NE"
- },
- {
- "__count": 74207,
- "origin_state": "OR"
- },
- {
- "__count": 158485,
- "origin_state": "PA"
- },
- {
- "__count": 231811,
- "origin_state": "AZ"
- },
- {
- "__count": 22509,
- "origin_state": "RI"
- },
- {
- "__count": 211820,
- "origin_state": "NC"
- },
- {
- "__count": 124067,
- "origin_state": "KY"
- },
- {
- "__count": 127630,
- "origin_state": "WA"
- },
- {
- "__count": 143075,
- "origin_state": "UT"
- },
- {
- "__count": 42107,
- "origin_state": "NM"
- },
- {
- "__count": 29449,
- "origin_state": "CT"
- },
- {
- "__count": 46066,
- "origin_state": "AL"
- },
- {
- "__count": 159197,
- "origin_state": "TN"
- },
- {
- "__count": 27122,
- "origin_state": "ID"
- },
- {
- "__count": 104074,
- "origin_state": "MD"
- },
- {
- "__count": 126215,
- "origin_state": "OH"
- },
- {
- "__count": 280855,
- "origin_state": "CO"
- },
- {
- "__count": 203129,
- "origin_state": "MI"
- },
- {
- "__count": 138622,
- "origin_state": "NJ"
- },
- {
- "__count": 75253,
- "origin_state": "WI"
- },
- {
- "__count": 42537,
- "origin_state": "SC"
- },
- {
- "__count": 3757,
- "origin_state": "WV"
- },
- {
- "__count": 14050,
- "origin_state": "KS"
- },
- {
- "__count": 7005,
- "origin_state": "VT"
- },
- {
- "__count": 27814,
- "origin_state": "IA"
- },
- {
- "__count": 9776,
- "origin_state": "ME"
- },
- {
- "__count": 135801,
- "origin_state": "MN"
- },
- {
- "__count": 435781,
- "origin_state": "GA"
- },
- {
- "__count": 118372,
- "origin_state": "MA"
- },
- {
- "__count": 4775,
- "origin_state": "NA"
- },
- {
- "__count": 9663,
- "origin_state": "WY"
- },
- {
- "__count": 9994,
- "origin_state": "SD"
- },
- {
- "__count": 110161,
- "origin_state": "HI"
- },
- {
- "__count": 20280,
- "origin_state": "MT"
- },
- {
- "__count": 9180,
- "origin_state": "ND"
- },
- {
- "__count": 23950,
- "origin_state": "PR"
- },
- {
- "__count": 3408,
- "origin_state": "VI"
- },
- {
- "__count": 40966,
- "origin_state": "AK"
- }
- ]
- },
- "sql:initial": {
- "sql": "SELECT *\nFROM flights_donotmodify"
- },
- "vega-lite:initial": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector001",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": "bar",
- "selection": {
- "selector001": {
- "fields": [
- "origin_state"
- ],
- "type": "multi"
- }
- },
- "title": "Total Number of Flights by State"
- },
- "vega-spec:initial": {
- "$schema": "https://vega.github.io/schema/vega/v5.json",
- "axes": [
- {
- "aria": false,
- "domain": false,
- "grid": true,
- "gridScale": "y",
- "labels": false,
- "maxExtent": 0,
- "minExtent": 0,
- "orient": "bottom",
- "scale": "x",
- "tickCount": {
- "signal": "ceil(width/40)"
- },
- "ticks": false,
- "zindex": 0
- },
- {
- "grid": false,
- "labelFlush": true,
- "labelOverlap": true,
- "orient": "bottom",
- "scale": "x",
- "tickCount": {
- "signal": "ceil(width/40)"
- },
- "title": "Count of Records",
- "zindex": 0
- },
- {
- "grid": false,
- "orient": "left",
- "scale": "y",
- "title": "origin_state",
- "zindex": 0
- }
- ],
- "background": "white",
- "data": [
- {
- "name": "selector001_store"
- },
- {
- "name": "ibis:3877461541768115829"
- },
- {
- "name": "data_0",
- "source": "ibis:3877461541768115829",
- "transform": [
- {
- "as": [
- "__count"
- ],
- "fields": [
- null
- ],
- "groupby": [
- "origin_state"
- ],
- "ops": [
- "count"
- ],
- "type": "aggregate"
- }
- ]
- },
- {
- "name": "data_1",
- "source": "data_0",
- "transform": [
- {
- "expr": "isValid(datum[\"__count\"]) && isFinite(+datum[\"__count\"])",
- "type": "filter"
- }
- ]
- }
- ],
- "marks": [
- {
- "encode": {
- "update": {
- "ariaRoleDescription": {
- "value": "bar"
- },
- "description": {
- "signal": "\"Count of Records\" + \": \" + (format(datum[\"__count\"], \"\")) + \"; \" + \"origin_state\" + \": \" + (isValid(datum[\"origin_state\"]) ? datum[\"origin_state\"] : \"\"+datum[\"origin_state\"])"
- },
- "fill": [
- {
- "test": "!(length(data(\"selector001_store\"))) || (vlSelectionTest(\"selector001_store\", datum))",
- "value": "steelblue"
- },
- {
- "value": "grey"
- }
- ],
- "height": {
- "band": 1,
- "scale": "y"
- },
- "x": {
- "field": "__count",
- "scale": "x"
- },
- "x2": {
- "scale": "x",
- "value": 0
- },
- "y": {
- "field": "origin_state",
- "scale": "y"
- }
- }
- },
- "from": {
- "data": "data_1"
- },
- "interactive": true,
- "name": "marks",
- "style": [
- "bar"
- ],
- "type": "rect"
- }
- ],
- "padding": 5,
- "scales": [
- {
- "domain": {
- "data": "data_1",
- "field": "__count"
- },
- "name": "x",
- "nice": true,
- "range": [
- 0,
- {
- "signal": "width"
- }
- ],
- "type": "linear",
- "zero": true
- },
- {
- "domain": {
- "data": "data_0",
- "field": "origin_state",
- "sort": {
- "field": "__count",
- "op": "min",
- "order": "descending"
- }
- },
- "name": "y",
- "paddingInner": 0.1,
- "paddingOuter": 0.05,
- "range": {
- "step": {
- "signal": "y_step"
- }
- },
- "type": "band"
- }
- ],
- "signals": [
- {
- "name": "y_step",
- "value": 20
- },
- {
- "name": "height",
- "update": "bandspace(domain('y').length, 0.1, 0.05) * y_step"
- },
- {
- "name": "unit",
- "on": [
- {
- "events": "mousemove",
- "update": "isTuple(group()) ? group() : unit"
- }
- ],
- "value": {}
- },
- {
- "name": "selector001",
- "update": "vlSelectionResolve(\"selector001_store\", \"union\", true)"
- },
- {
- "name": "selector001_tuple",
- "on": [
- {
- "events": [
- {
- "source": "scope",
- "type": "click"
- }
- ],
- "force": true,
- "update": "datum && item().mark.marktype !== 'group' ? {unit: \"\", fields: selector001_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"origin_state\"]]} : null"
- },
- {
- "events": [
- {
- "source": "scope",
- "type": "dblclick"
- }
- ],
- "update": "null"
- }
- ]
- },
- {
- "name": "selector001_tuple_fields",
- "value": [
- {
- "field": "origin_state",
- "type": "E"
- }
- ]
- },
- {
- "name": "selector001_toggle",
- "on": [
- {
- "events": [
- {
- "source": "scope",
- "type": "click"
- }
- ],
- "update": "event.shiftKey"
- },
- {
- "events": [
- {
- "source": "scope",
- "type": "dblclick"
- }
- ],
- "update": "false"
- }
- ],
- "value": false
- },
- {
- "name": "selector001_modify",
- "on": [
- {
- "events": {
- "signal": "selector001_tuple"
- },
- "update": "modify(\"selector001_store\", selector001_toggle ? null : selector001_tuple, selector001_toggle ? null : true, selector001_toggle ? selector001_tuple : null)"
- }
- ]
- }
- ],
- "style": "cell",
- "title": {
- "frame": "group",
- "text": "Total Number of Flights by State"
- },
- "width": 400
- }
- },
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.vega.ibis.v5+json": {
- "span": {
- "uber-trace-id": "7f5ccee7fcba5197:8417f034cc296c0f:0:1"
- },
- "spec": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector001",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": "bar",
- "selection": {
- "selector001": {
- "fields": [
- "origin_state"
- ],
- "type": "multi"
- }
- },
- "title": "Total Number of Flights by State"
- }
- },
- "text/plain": [
- "alt.Chart(...)"
- ]
- },
- "execution_count": 17,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"flights_by_state = alt.Chart(\n",
" t,\n",
@@ -1235,16 +157,8 @@
},
{
"cell_type": "code",
- "execution_count": 18,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:42:08.539886Z",
- "iopub.status.busy": "2020-10-02T17:42:08.539652Z",
- "iopub.status.idle": "2020-10-02T17:42:08.542889Z",
- "shell.execute_reply": "2020-10-02T17:42:08.542262Z",
- "shell.execute_reply.started": "2020-10-02T17:42:08.539860Z"
- }
- },
+ "execution_count": null,
+ "metadata": {},
"outputs": [],
"source": [
"ibis_vega_transform.disable_debug()"
@@ -1252,82 +166,9 @@
},
{
"cell_type": "code",
- "execution_count": 19,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:42:10.722285Z",
- "iopub.status.busy": "2020-10-02T17:42:10.722048Z",
- "iopub.status.idle": "2020-10-02T17:42:10.835567Z",
- "shell.execute_reply": "2020-10-02T17:42:10.834645Z",
- "shell.execute_reply.started": "2020-10-02T17:42:10.722258Z"
- }
- },
- "outputs": [
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.vega.ibis.v5+json": {
- "span": {
- "uber-trace-id": "f18aa7cc067e7e40:bbdbc47aa2fc3474:0:1"
- },
- "spec": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": {
- "dx": 20,
- "type": "text"
- }
- }
- },
- "text/plain": [
- "alt.Chart(...)"
- ]
- },
- "execution_count": 19,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"flights_by_state_text = alt.Chart(t).mark_text(dx=20).encode(\n",
" x='count()',\n",
@@ -1346,16 +187,8 @@
},
{
"cell_type": "code",
- "execution_count": 20,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:42:36.004316Z",
- "iopub.status.busy": "2020-10-02T17:42:36.004113Z",
- "iopub.status.idle": "2020-10-02T17:42:36.007448Z",
- "shell.execute_reply": "2020-10-02T17:42:36.006748Z",
- "shell.execute_reply.started": "2020-10-02T17:42:36.004294Z"
- }
- },
+ "execution_count": null,
+ "metadata": {},
"outputs": [],
"source": [
"def create_flights_by_state(map_fn=lambda c: c):\n",
@@ -1364,107 +197,9 @@
},
{
"cell_type": "code",
- "execution_count": 21,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:42:36.687080Z",
- "iopub.status.busy": "2020-10-02T17:42:36.686868Z",
- "iopub.status.idle": "2020-10-02T17:42:36.700890Z",
- "shell.execute_reply": "2020-10-02T17:42:36.700320Z",
- "shell.execute_reply.started": "2020-10-02T17:42:36.687056Z"
- }
- },
- "outputs": [
- {
- "data": {
- "application/vnd.vega.ibis.v5+json": {
- "span": {
- "uber-trace-id": "23eeb0c33403768a:b12e5a9ba29706be:0:1"
- },
- "spec": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": {
- "dx": 20,
- "type": "text"
- }
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector001",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": "bar",
- "selection": {
- "selector001": {
- "fields": [
- "origin_state"
- ],
- "type": "multi"
- }
- },
- "title": "Total Number of Flights by State"
- }
- ]
- }
- },
- "text/plain": [
- "alt.LayerChart(...)"
- ]
- },
- "execution_count": 21,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"create_flights_by_state()"
]
@@ -1485,182 +220,9 @@
},
{
"cell_type": "code",
- "execution_count": 22,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:43:30.212445Z",
- "iopub.status.busy": "2020-10-02T17:43:30.212243Z",
- "iopub.status.idle": "2020-10-02T17:43:30.386925Z",
- "shell.execute_reply": "2020-10-02T17:43:30.385623Z",
- "shell.execute_reply.started": "2020-10-02T17:43:30.212422Z"
- }
- },
- "outputs": [
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.vega.ibis.v5+json": {
- "span": {
- "uber-trace-id": "e01714b33568fe01:d44893f617cbde18:0:1"
- },
- "spec": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector002",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "tooltip": [
- {
- "field": "carrier_name",
- "type": "nominal"
- },
- {
- "field": "depdelay",
- "type": "quantitative"
- },
- {
- "field": "arrdelay",
- "type": "quantitative"
- }
- ],
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": {
- "filled": true,
- "size": 200,
- "type": "point"
- },
- "selection": {
- "selector002": {
- "fields": [
- "carrier_name"
- ],
- "type": "multi"
- }
- },
- "title": "Carrier Departure Delay by Arrival Delay (Minutes)",
- "transform": [
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "field": "carrier_name",
- "type": "nominal"
- },
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": "text",
- "transform": [
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- }
- ]
- }
- },
- "text/plain": [
- "alt.LayerChart(...)"
- ]
- },
- "execution_count": 22,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"airlines = alt.selection_multi(fields=['carrier_name'])\n",
"\n",
@@ -1711,1403 +273,9 @@
},
{
"cell_type": "code",
- "execution_count": 25,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:45:57.494701Z",
- "iopub.status.busy": "2020-10-02T17:45:57.494512Z",
- "iopub.status.idle": "2020-10-02T17:45:57.688595Z",
- "shell.execute_reply": "2020-10-02T17:45:57.687870Z",
- "shell.execute_reply.started": "2020-10-02T17:45:57.494680Z"
- }
- },
- "outputs": [
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/json": {
- "query:initial": {
- "parameters": {
- ":selector002_store": [
- {
- "fields": [
- {
- "field": "carrier_name",
- "type": "E"
- }
- ],
- "unit": "concat_1_layer_0",
- "values": [
- "Northwest Airlines"
- ]
- }
- ]
- },
- "sql": "SELECT *\nFROM flights_donotmodify",
- "transforms": [
- {
- "expr": "!(length([{\"unit\": \"concat_1_layer_0\", \"fields\": [{\"type\": \"E\", \"field\": \"carrier_name\"}], \"values\": [\"Northwest Airlines\"]}])) || (vlSelectionTest([{\"unit\": \"concat_1_layer_0\", \"fields\": [{\"type\": \"E\", \"field\": \"carrier_name\"}], \"values\": [\"Northwest Airlines\"]}], datum))",
- "type": "filter"
- },
- {
- "as": [
- "__count"
- ],
- "fields": [
- null
- ],
- "groupby": [
- "origin_state"
- ],
- "ops": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "expr": "isValid(datum[\"__count\"]) && isFinite(+datum[\"__count\"])",
- "type": "filter"
- }
- ]
- },
- "query:result": {
- "sql": "SELECT t0.*\nFROM (\n SELECT \"origin_state\", count(*) AS __count\n FROM flights_donotmodify\n WHERE \"carrier_name\" = 'Northwest Airlines'\n GROUP BY origin_state\n) t0\nWHERE NOT (t0.\"__count\" IS NULL)",
- "transforms": [
- {
- "expr": "!(length([{\"unit\": \"concat_1_layer_0\", \"fields\": [{\"type\": \"E\", \"field\": \"carrier_name\"}], \"values\": [\"Northwest Airlines\"]}])) || (vlSelectionTest([{\"unit\": \"concat_1_layer_0\", \"fields\": [{\"type\": \"E\", \"field\": \"carrier_name\"}], \"values\": [\"Northwest Airlines\"]}], datum))",
- "type": "filter"
- },
- {
- "as": [
- "__count"
- ],
- "fields": [
- null
- ],
- "groupby": [
- "origin_state"
- ],
- "ops": [
- "count"
- ],
- "type": "aggregate"
- },
- {
- "expr": "isValid(datum[\"__count\"]) && isFinite(+datum[\"__count\"])",
- "type": "filter"
- }
- ],
- "values": [
- {
- "__count": 5076,
- "origin_state": "TX"
- },
- {
- "__count": 8360,
- "origin_state": "VA"
- },
- {
- "__count": 6754,
- "origin_state": "IN"
- },
- {
- "__count": 12495,
- "origin_state": "NY"
- },
- {
- "__count": 215,
- "origin_state": "MS"
- },
- {
- "__count": 17298,
- "origin_state": "FL"
- },
- {
- "__count": 4544,
- "origin_state": "NV"
- },
- {
- "__count": 15008,
- "origin_state": "CA"
- },
- {
- "__count": 856,
- "origin_state": "AR"
- },
- {
- "__count": 5671,
- "origin_state": "MO"
- },
- {
- "__count": 8333,
- "origin_state": "IL"
- },
- {
- "__count": 835,
- "origin_state": "NH"
- },
- {
- "__count": 1443,
- "origin_state": "LA"
- },
- {
- "__count": 67,
- "origin_state": "OK"
- },
- {
- "__count": 863,
- "origin_state": "NE"
- },
- {
- "__count": 2118,
- "origin_state": "OR"
- },
- {
- "__count": 5144,
- "origin_state": "PA"
- },
- {
- "__count": 4021,
- "origin_state": "AZ"
- },
- {
- "__count": 1111,
- "origin_state": "RI"
- },
- {
- "__count": 4362,
- "origin_state": "NC"
- },
- {
- "__count": 652,
- "origin_state": "KY"
- },
- {
- "__count": 5833,
- "origin_state": "WA"
- },
- {
- "__count": 1089,
- "origin_state": "UT"
- },
- {
- "__count": 677,
- "origin_state": "NM"
- },
- {
- "__count": 2183,
- "origin_state": "CT"
- },
- {
- "__count": 338,
- "origin_state": "AL"
- },
- {
- "__count": 23812,
- "origin_state": "TN"
- },
- {
- "__count": 807,
- "origin_state": "ID"
- },
- {
- "__count": 3061,
- "origin_state": "MD"
- },
- {
- "__count": 2715,
- "origin_state": "OH"
- },
- {
- "__count": 4242,
- "origin_state": "CO"
- },
- {
- "__count": 85323,
- "origin_state": "MI"
- },
- {
- "__count": 3518,
- "origin_state": "NJ"
- },
- {
- "__count": 9293,
- "origin_state": "WI"
- },
- {
- "__count": 112,
- "origin_state": "SC"
- },
- {
- "__count": 45,
- "origin_state": "IA"
- },
- {
- "__count": 80039,
- "origin_state": "MN"
- },
- {
- "__count": 3514,
- "origin_state": "GA"
- },
- {
- "__count": 3948,
- "origin_state": "MA"
- },
- {
- "__count": 117,
- "origin_state": "WY"
- },
- {
- "__count": 1850,
- "origin_state": "SD"
- },
- {
- "__count": 2899,
- "origin_state": "HI"
- },
- {
- "__count": 2072,
- "origin_state": "MT"
- },
- {
- "__count": 3572,
- "origin_state": "ND"
- },
- {
- "__count": 224,
- "origin_state": "PR"
- },
- {
- "__count": 16,
- "origin_state": "VI"
- },
- {
- "__count": 1127,
- "origin_state": "AK"
- }
- ]
- },
- "sql:initial": {
- "sql": "SELECT *\nFROM flights_donotmodify"
- },
- "vega-lite:initial": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "hconcat": [
- {
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": {
- "dx": 20,
- "type": "text"
- },
- "transform": [
- {
- "filter": {
- "selection": "selector002"
- }
- }
- ]
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector001",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": "bar",
- "selection": {
- "selector001": {
- "fields": [
- "origin_state"
- ],
- "type": "multi"
- }
- },
- "title": "Total Number of Flights by State",
- "transform": [
- {
- "filter": {
- "selection": "selector002"
- }
- }
- ]
- }
- ]
- },
- {
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector002",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "tooltip": [
- {
- "field": "carrier_name",
- "type": "nominal"
- },
- {
- "field": "depdelay",
- "type": "quantitative"
- },
- {
- "field": "arrdelay",
- "type": "quantitative"
- }
- ],
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": {
- "filled": true,
- "size": 200,
- "type": "point"
- },
- "selection": {
- "selector002": {
- "fields": [
- "carrier_name"
- ],
- "type": "multi"
- }
- },
- "title": "Carrier Departure Delay by Arrival Delay (Minutes)",
- "transform": [
- {
- "filter": {
- "selection": "selector001"
- }
- },
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "field": "carrier_name",
- "type": "nominal"
- },
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": "text",
- "transform": [
- {
- "filter": {
- "selection": "selector001"
- }
- },
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- "vega-spec:initial": {
- "$schema": "https://vega.github.io/schema/vega/v5.json",
- "background": "white",
- "data": [
- {
- "name": "selector001_store"
- },
- {
- "name": "selector002_store"
- },
- {
- "format": {},
- "name": "ibis:3877461541768115829"
- },
- {
- "name": "data_1",
- "source": "ibis:3877461541768115829",
- "transform": [
- {
- "expr": "!(length(data(\"selector002_store\"))) || (vlSelectionTest(\"selector002_store\", datum))",
- "type": "filter"
- },
- {
- "as": [
- "__count"
- ],
- "fields": [
- null
- ],
- "groupby": [
- "origin_state"
- ],
- "ops": [
- "count"
- ],
- "type": "aggregate"
- }
- ]
- },
- {
- "name": "data_2",
- "source": "data_1",
- "transform": [
- {
- "expr": "isValid(datum[\"__count\"]) && isFinite(+datum[\"__count\"])",
- "type": "filter"
- }
- ]
- },
- {
- "name": "data_3",
- "source": "ibis:3877461541768115829",
- "transform": [
- {
- "expr": "!(length(data(\"selector001_store\"))) || (vlSelectionTest(\"selector001_store\", datum))",
- "type": "filter"
- },
- {
- "as": [
- "depdelay",
- "arrdelay"
- ],
- "fields": [
- "depdelay",
- "arrdelay"
- ],
- "groupby": [
- "carrier_name"
- ],
- "ops": [
- "mean",
- "mean"
- ],
- "type": "aggregate"
- },
- {
- "expr": "isValid(datum[\"depdelay\"]) && isFinite(+datum[\"depdelay\"]) && isValid(datum[\"arrdelay\"]) && isFinite(+datum[\"arrdelay\"])",
- "type": "filter"
- }
- ]
- }
- ],
- "layout": {
- "align": "each",
- "bounds": "full",
- "padding": 20
- },
- "marks": [
- {
- "axes": [
- {
- "aria": false,
- "domain": false,
- "grid": true,
- "gridScale": "concat_0_y",
- "labels": false,
- "maxExtent": 0,
- "minExtent": 0,
- "orient": "bottom",
- "scale": "concat_0_x",
- "tickCount": {
- "signal": "ceil(childWidth/40)"
- },
- "ticks": false,
- "zindex": 0
- },
- {
- "grid": false,
- "labelFlush": true,
- "labelOverlap": true,
- "orient": "bottom",
- "scale": "concat_0_x",
- "tickCount": {
- "signal": "ceil(childWidth/40)"
- },
- "title": "Count of Records",
- "zindex": 0
- },
- {
- "grid": false,
- "orient": "left",
- "scale": "concat_0_y",
- "title": "origin_state",
- "zindex": 0
- }
- ],
- "encode": {
- "update": {
- "height": {
- "signal": "concat_0_height"
- },
- "width": {
- "signal": "childWidth"
- }
- }
- },
- "marks": [
- {
- "encode": {
- "update": {
- "align": {
- "value": "center"
- },
- "baseline": {
- "value": "middle"
- },
- "description": {
- "signal": "\"Count of Records\" + \": \" + (format(datum[\"__count\"], \"\")) + \"; \" + \"origin_state\" + \": \" + (isValid(datum[\"origin_state\"]) ? datum[\"origin_state\"] : \"\"+datum[\"origin_state\"])"
- },
- "dx": {
- "value": 20
- },
- "fill": {
- "value": "black"
- },
- "text": {
- "signal": "format(datum[\"__count\"], \"\")"
- },
- "x": {
- "field": "__count",
- "scale": "concat_0_x"
- },
- "y": {
- "band": 0.5,
- "field": "origin_state",
- "scale": "concat_0_y"
- }
- }
- },
- "from": {
- "data": "data_2"
- },
- "interactive": false,
- "name": "concat_0_layer_0_marks",
- "style": [
- "text"
- ],
- "type": "text"
- },
- {
- "encode": {
- "update": {
- "ariaRoleDescription": {
- "value": "bar"
- },
- "description": {
- "signal": "\"Count of Records\" + \": \" + (format(datum[\"__count\"], \"\")) + \"; \" + \"origin_state\" + \": \" + (isValid(datum[\"origin_state\"]) ? datum[\"origin_state\"] : \"\"+datum[\"origin_state\"])"
- },
- "fill": [
- {
- "test": "!(length(data(\"selector001_store\"))) || (vlSelectionTest(\"selector001_store\", datum))",
- "value": "steelblue"
- },
- {
- "value": "grey"
- }
- ],
- "height": {
- "band": 1,
- "scale": "concat_0_y"
- },
- "x": {
- "field": "__count",
- "scale": "concat_0_x"
- },
- "x2": {
- "scale": "concat_0_x",
- "value": 0
- },
- "y": {
- "field": "origin_state",
- "scale": "concat_0_y"
- }
- }
- },
- "from": {
- "data": "data_2"
- },
- "interactive": true,
- "name": "concat_0_layer_1_marks",
- "style": [
- "bar"
- ],
- "type": "rect"
- }
- ],
- "name": "concat_0_group",
- "signals": [
- {
- "name": "selector001_tuple",
- "on": [
- {
- "events": [
- {
- "source": "scope",
- "type": "click"
- }
- ],
- "force": true,
- "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_0_layer_1\", fields: selector001_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"origin_state\"]]} : null"
- },
- {
- "events": [
- {
- "source": "scope",
- "type": "dblclick"
- }
- ],
- "update": "null"
- }
- ]
- },
- {
- "name": "selector001_tuple_fields",
- "value": [
- {
- "field": "origin_state",
- "type": "E"
- }
- ]
- },
- {
- "name": "selector001_toggle",
- "on": [
- {
- "events": [
- {
- "source": "scope",
- "type": "click"
- }
- ],
- "update": "event.shiftKey"
- },
- {
- "events": [
- {
- "source": "scope",
- "type": "dblclick"
- }
- ],
- "update": "false"
- }
- ],
- "value": false
- },
- {
- "name": "selector001_modify",
- "on": [
- {
- "events": {
- "signal": "selector001_tuple"
- },
- "update": "modify(\"selector001_store\", selector001_toggle ? null : selector001_tuple, selector001_toggle ? null : true, selector001_toggle ? selector001_tuple : null)"
- }
- ]
- }
- ],
- "style": "cell",
- "title": {
- "frame": "group",
- "text": "Total Number of Flights by State"
- },
- "type": "group"
- },
- {
- "axes": [
- {
- "aria": false,
- "domain": false,
- "grid": true,
- "gridScale": "concat_1_y",
- "labels": false,
- "maxExtent": 0,
- "minExtent": 0,
- "orient": "bottom",
- "scale": "concat_1_x",
- "tickCount": {
- "signal": "ceil(childWidth/40)"
- },
- "ticks": false,
- "zindex": 0
- },
- {
- "aria": false,
- "domain": false,
- "grid": true,
- "gridScale": "concat_1_x",
- "labels": false,
- "maxExtent": 0,
- "minExtent": 0,
- "orient": "left",
- "scale": "concat_1_y",
- "tickCount": {
- "signal": "ceil(concat_1_height/40)"
- },
- "ticks": false,
- "zindex": 0
- },
- {
- "grid": false,
- "labelFlush": true,
- "labelOverlap": true,
- "orient": "bottom",
- "scale": "concat_1_x",
- "tickCount": {
- "signal": "ceil(childWidth/40)"
- },
- "title": "depdelay",
- "zindex": 0
- },
- {
- "grid": false,
- "labelOverlap": true,
- "orient": "left",
- "scale": "concat_1_y",
- "tickCount": {
- "signal": "ceil(concat_1_height/40)"
- },
- "title": "arrdelay",
- "zindex": 0
- }
- ],
- "encode": {
- "update": {
- "height": {
- "signal": "concat_1_height"
- },
- "width": {
- "signal": "childWidth"
- }
- }
- },
- "marks": [
- {
- "encode": {
- "update": {
- "ariaRoleDescription": {
- "value": "point"
- },
- "description": {
- "signal": "\"carrier_name\" + \": \" + (isValid(datum[\"carrier_name\"]) ? datum[\"carrier_name\"] : \"\"+datum[\"carrier_name\"]) + \"; \" + \"depdelay\" + \": \" + (format(datum[\"depdelay\"], \"\")) + \"; \" + \"arrdelay\" + \": \" + (format(datum[\"arrdelay\"], \"\"))"
- },
- "fill": [
- {
- "test": "!(length(data(\"selector002_store\"))) || (vlSelectionTest(\"selector002_store\", datum))",
- "value": "steelblue"
- },
- {
- "value": "grey"
- }
- ],
- "opacity": {
- "value": 0.7
- },
- "size": {
- "value": 200
- },
- "tooltip": {
- "signal": "{\"carrier_name\": isValid(datum[\"carrier_name\"]) ? datum[\"carrier_name\"] : \"\"+datum[\"carrier_name\"], \"depdelay\": format(datum[\"depdelay\"], \"\"), \"arrdelay\": format(datum[\"arrdelay\"], \"\")}"
- },
- "x": {
- "field": "depdelay",
- "scale": "concat_1_x"
- },
- "y": {
- "field": "arrdelay",
- "scale": "concat_1_y"
- }
- }
- },
- "from": {
- "data": "data_3"
- },
- "interactive": true,
- "name": "concat_1_layer_0_marks",
- "style": [
- "point"
- ],
- "type": "symbol"
- },
- {
- "encode": {
- "update": {
- "align": {
- "value": "center"
- },
- "baseline": {
- "value": "middle"
- },
- "description": {
- "signal": "\"carrier_name\" + \": \" + (isValid(datum[\"carrier_name\"]) ? datum[\"carrier_name\"] : \"\"+datum[\"carrier_name\"]) + \"; \" + \"depdelay\" + \": \" + (format(datum[\"depdelay\"], \"\")) + \"; \" + \"arrdelay\" + \": \" + (format(datum[\"arrdelay\"], \"\"))"
- },
- "fill": {
- "value": "black"
- },
- "text": {
- "signal": "isValid(datum[\"carrier_name\"]) ? datum[\"carrier_name\"] : \"\"+datum[\"carrier_name\"]"
- },
- "x": {
- "field": "depdelay",
- "scale": "concat_1_x"
- },
- "y": {
- "field": "arrdelay",
- "scale": "concat_1_y"
- }
- }
- },
- "from": {
- "data": "data_3"
- },
- "interactive": false,
- "name": "concat_1_layer_1_marks",
- "style": [
- "text"
- ],
- "type": "text"
- }
- ],
- "name": "concat_1_group",
- "signals": [
- {
- "name": "selector002_tuple",
- "on": [
- {
- "events": [
- {
- "source": "scope",
- "type": "click"
- }
- ],
- "force": true,
- "update": "datum && item().mark.marktype !== 'group' ? {unit: \"concat_1_layer_0\", fields: selector002_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"carrier_name\"]]} : null"
- },
- {
- "events": [
- {
- "source": "scope",
- "type": "dblclick"
- }
- ],
- "update": "null"
- }
- ]
- },
- {
- "name": "selector002_tuple_fields",
- "value": [
- {
- "field": "carrier_name",
- "type": "E"
- }
- ]
- },
- {
- "name": "selector002_toggle",
- "on": [
- {
- "events": [
- {
- "source": "scope",
- "type": "click"
- }
- ],
- "update": "event.shiftKey"
- },
- {
- "events": [
- {
- "source": "scope",
- "type": "dblclick"
- }
- ],
- "update": "false"
- }
- ],
- "value": false
- },
- {
- "name": "selector002_modify",
- "on": [
- {
- "events": {
- "signal": "selector002_tuple"
- },
- "update": "modify(\"selector002_store\", selector002_toggle ? null : selector002_tuple, selector002_toggle ? null : true, selector002_toggle ? selector002_tuple : null)"
- }
- ]
- }
- ],
- "style": "cell",
- "title": {
- "frame": "group",
- "text": "Carrier Departure Delay by Arrival Delay (Minutes)"
- },
- "type": "group"
- }
- ],
- "padding": 5,
- "scales": [
- {
- "domain": {
- "data": "data_2",
- "field": "__count"
- },
- "name": "concat_0_x",
- "nice": true,
- "range": [
- 0,
- {
- "signal": "childWidth"
- }
- ],
- "type": "linear",
- "zero": true
- },
- {
- "domain": {
- "data": "data_1",
- "field": "origin_state",
- "sort": {
- "field": "__count",
- "op": "min",
- "order": "descending"
- }
- },
- "name": "concat_0_y",
- "paddingInner": 0,
- "paddingOuter": 0,
- "range": {
- "step": {
- "signal": "concat_0_y_step"
- }
- },
- "type": "band"
- },
- {
- "domain": {
- "data": "data_3",
- "field": "depdelay"
- },
- "name": "concat_1_x",
- "nice": true,
- "range": [
- 0,
- {
- "signal": "childWidth"
- }
- ],
- "type": "linear",
- "zero": true
- },
- {
- "domain": {
- "data": "data_3",
- "field": "arrdelay"
- },
- "name": "concat_1_y",
- "nice": true,
- "range": [
- {
- "signal": "concat_1_height"
- },
- 0
- ],
- "type": "linear",
- "zero": true
- }
- ],
- "signals": [
- {
- "name": "childWidth",
- "value": 400
- },
- {
- "name": "concat_0_y_step",
- "value": 20
- },
- {
- "name": "concat_0_height",
- "update": "bandspace(domain('concat_0_y').length, 0, 0) * concat_0_y_step"
- },
- {
- "name": "concat_1_height",
- "value": 300
- },
- {
- "name": "unit",
- "on": [
- {
- "events": "mousemove",
- "update": "isTuple(group()) ? group() : unit"
- }
- ],
- "value": {}
- },
- {
- "name": "selector001",
- "update": "vlSelectionResolve(\"selector001_store\", \"union\", true)"
- },
- {
- "name": "selector002",
- "update": "vlSelectionResolve(\"selector002_store\", \"union\", true)"
- }
- ]
- }
- },
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.vega.ibis.v5+json": {
- "span": {
- "uber-trace-id": "d82e7d0edd0c6a86:9d53c8045fa24a17:0:1"
- },
- "spec": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "hconcat": [
- {
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": {
- "dx": 20,
- "type": "text"
- },
- "transform": [
- {
- "filter": {
- "selection": "selector002"
- }
- }
- ]
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector001",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "mark": "bar",
- "selection": {
- "selector001": {
- "fields": [
- "origin_state"
- ],
- "type": "multi"
- }
- },
- "title": "Total Number of Flights by State",
- "transform": [
- {
- "filter": {
- "selection": "selector002"
- }
- }
- ]
- }
- ]
- },
- {
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector002",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "tooltip": [
- {
- "field": "carrier_name",
- "type": "nominal"
- },
- {
- "field": "depdelay",
- "type": "quantitative"
- },
- {
- "field": "arrdelay",
- "type": "quantitative"
- }
- ],
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": {
- "filled": true,
- "size": 200,
- "type": "point"
- },
- "selection": {
- "selector002": {
- "fields": [
- "carrier_name"
- ],
- "type": "multi"
- }
- },
- "title": "Carrier Departure Delay by Arrival Delay (Minutes)",
- "transform": [
- {
- "filter": {
- "selection": "selector001"
- }
- },
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "field": "carrier_name",
- "type": "nominal"
- },
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": "text",
- "transform": [
- {
- "filter": {
- "selection": "selector001"
- }
- },
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- },
- "text/plain": [
- "alt.HConcatChart(...)"
- ]
- },
- "execution_count": 25,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"(\n",
" create_flights_by_state(lambda c: c.transform_filter(airlines)) |\n",
@@ -3117,16 +285,8 @@
},
{
"cell_type": "code",
- "execution_count": 27,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:47:21.045646Z",
- "iopub.status.busy": "2020-10-02T17:47:21.045392Z",
- "iopub.status.idle": "2020-10-02T17:47:21.049298Z",
- "shell.execute_reply": "2020-10-02T17:47:21.048379Z",
- "shell.execute_reply.started": "2020-10-02T17:47:21.045618Z"
- }
- },
+ "execution_count": null,
+ "metadata": {},
"outputs": [],
"source": [
"ibis_vega_transform.disable_debug()"
@@ -3148,92 +308,9 @@
},
{
"cell_type": "code",
- "execution_count": 28,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:47:24.093645Z",
- "iopub.status.busy": "2020-10-02T17:47:24.093297Z",
- "iopub.status.idle": "2020-10-02T17:47:24.159201Z",
- "shell.execute_reply": "2020-10-02T17:47:24.158505Z",
- "shell.execute_reply.started": "2020-10-02T17:47:24.093617Z"
- }
- },
- "outputs": [
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.vega.ibis.v5+json": {
- "span": {
- "uber-trace-id": "cf54ea46df2a794a:cb6fe2e287e15838:0:1"
- },
- "spec": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "x": {
- "field": "dep_timestamp",
- "timeUnit": "yearmonthdate",
- "type": "temporal"
- },
- "y": {
- "aggregate": "count",
- "scale": {
- "zero": false
- },
- "type": "quantitative"
- }
- },
- "mark": "line",
- "selection": {
- "selector003": {
- "encodings": [
- "x"
- ],
- "fields": [
- "dep_timestamp"
- ],
- "type": "interval"
- }
- },
- "title": "Number of Flights by Departure Time",
- "transform": [
- {
- "filter": "datum.dep_timestamp != null"
- }
- ]
- }
- },
- "text/plain": [
- "alt.Chart(...)"
- ]
- },
- "execution_count": 28,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"dates = alt.selection_interval(\n",
" fields=['dep_timestamp'],\n",
@@ -3279,384 +356,9 @@
},
{
"cell_type": "code",
- "execution_count": 29,
- "metadata": {
- "execution": {
- "iopub.execute_input": "2020-10-02T17:48:04.047385Z",
- "iopub.status.busy": "2020-10-02T17:48:04.047164Z",
- "iopub.status.idle": "2020-10-02T17:48:04.296447Z",
- "shell.execute_reply": "2020-10-02T17:48:04.295873Z",
- "shell.execute_reply.started": "2020-10-02T17:48:04.047361Z"
- }
- },
- "outputs": [
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/json": {},
- "text/plain": [
- ""
- ]
- },
- "metadata": {
- "application/json": {
- "expanded": false,
- "root": "ibis-vega-transform"
- }
- },
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.vega.ibis.v5+json": {
- "span": {
- "uber-trace-id": "135f07c1ead41c6a:6159ba222ace1d18:0:1"
- },
- "spec": {
- "$schema": "https://vega.github.io/schema/vega-lite/v4.0.2.json",
- "config": {
- "autosize": {
- "resize": true
- },
- "view": {
- "continuousHeight": 300,
- "continuousWidth": 400
- }
- },
- "vconcat": [
- {
- "hconcat": [
- {
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "height": 533.3333333333334,
- "mark": {
- "dx": 20,
- "type": "text"
- },
- "transform": [
- {
- "filter": {
- "and": [
- {
- "selection": "selector002"
- },
- {
- "selection": "selector003"
- }
- ]
- }
- }
- ],
- "width": 500
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector001",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "x": {
- "aggregate": "count",
- "type": "quantitative"
- },
- "y": {
- "field": "origin_state",
- "sort": {
- "encoding": "x",
- "order": "descending"
- },
- "type": "nominal"
- }
- },
- "height": 533.3333333333334,
- "mark": "bar",
- "selection": {
- "selector001": {
- "fields": [
- "origin_state"
- ],
- "type": "multi"
- }
- },
- "title": "Total Number of Flights by State",
- "transform": [
- {
- "filter": {
- "and": [
- {
- "selection": "selector002"
- },
- {
- "selection": "selector003"
- }
- ]
- }
- }
- ],
- "width": 500
- }
- ]
- },
- {
- "height": 533.3333333333334,
- "layer": [
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "color": {
- "condition": {
- "selection": "selector002",
- "value": "steelblue"
- },
- "value": "grey"
- },
- "tooltip": [
- {
- "field": "carrier_name",
- "type": "nominal"
- },
- {
- "field": "depdelay",
- "type": "quantitative"
- },
- {
- "field": "arrdelay",
- "type": "quantitative"
- }
- ],
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": {
- "filled": true,
- "size": 200,
- "type": "point"
- },
- "selection": {
- "selector002": {
- "fields": [
- "carrier_name"
- ],
- "type": "multi"
- }
- },
- "title": "Carrier Departure Delay by Arrival Delay (Minutes)",
- "transform": [
- {
- "filter": {
- "and": [
- {
- "selection": "selector003"
- },
- {
- "selection": "selector001"
- }
- ]
- }
- },
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "text": {
- "field": "carrier_name",
- "type": "nominal"
- },
- "x": {
- "field": "depdelay",
- "type": "quantitative"
- },
- "y": {
- "field": "arrdelay",
- "type": "quantitative"
- }
- },
- "mark": "text",
- "transform": [
- {
- "filter": {
- "and": [
- {
- "selection": "selector003"
- },
- {
- "selection": "selector001"
- }
- ]
- }
- },
- {
- "aggregate": [
- {
- "as": "depdelay",
- "field": "depdelay",
- "op": "mean"
- },
- {
- "as": "arrdelay",
- "field": "arrdelay",
- "op": "mean"
- }
- ],
- "groupby": [
- "carrier_name"
- ]
- }
- ]
- }
- ],
- "width": 500
- }
- ]
- },
- {
- "data": {
- "name": "ibis:3877461541768115829"
- },
- "encoding": {
- "x": {
- "field": "dep_timestamp",
- "timeUnit": "yearmonthdate",
- "type": "temporal"
- },
- "y": {
- "aggregate": "count",
- "scale": {
- "zero": false
- },
- "type": "quantitative"
- }
- },
- "height": 266.6666666666667,
- "mark": "line",
- "selection": {
- "selector003": {
- "encodings": [
- "x"
- ],
- "fields": [
- "dep_timestamp"
- ],
- "type": "interval"
- }
- },
- "title": "Number of Flights by Departure Time",
- "transform": [
- {
- "filter": {
- "and": [
- {
- "selection": "selector002"
- },
- {
- "selection": "selector001"
- }
- ]
- }
- },
- {
- "filter": "datum.dep_timestamp != null"
- }
- ],
- "width": 1050
- }
- ]
- }
- },
- "text/plain": [
- "alt.VConcatChart(...)"
- ]
- },
- "execution_count": 29,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
"source": [
"HEIGHT = 800\n",
"WIDTH = 1000\n",
diff --git a/examples/ibis-altair-extraction.ipynb b/examples/ibis-altair-extraction.ipynb
index de56b87..e164619 100644
--- a/examples/ibis-altair-extraction.ipynb
+++ b/examples/ibis-altair-extraction.ipynb
@@ -16,9 +16,15 @@
"outputs": [],
"source": [
"import altair as alt\n",
- "import ibis.omniscidb\n",
"import IPython.display\n",
- "import ibis_vega_transform"
+ "import ibis_vega_transform\n",
+ "\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb"
]
},
{
@@ -36,7 +42,7 @@
"metadata": {},
"outputs": [],
"source": [
- "conn = ibis.omniscidb.connect(\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='metis.mapd.com', user='demouser', password='HyperInteractive',\n",
" port=443, database='mapd', protocol= 'https'\n",
")\n",
@@ -205,7 +211,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.8"
+ "version": "3.7.6"
}
},
"nbformat": 4,
diff --git a/examples/interactive-slider.ipynb b/examples/interactive-slider.ipynb
index 737d114..d74c564 100644
--- a/examples/interactive-slider.ipynb
+++ b/examples/interactive-slider.ipynb
@@ -88,7 +88,16 @@
"source": [
"import ibis\n",
"\n",
- "connection = ibis.sqlite.connect(dbfile)\n",
+ "import warnings\n",
+ "try:\n",
+ " # ibis version >= 1.4\n",
+ " from ibis.backends import sqlite as ibis_sqlite\n",
+ "except ImportError as msg:\n",
+ " # ibis version < 1.4\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import sqlite as ibis_sqlite\n",
+ "\n",
+ "connection = ibis_sqlite.connect(dbfile)\n",
"connection.list_tables()"
]
},
diff --git a/examples/omnisci-vega-example.ipynb b/examples/omnisci-vega-example.ipynb
index bad8d04..f5b330a 100644
--- a/examples/omnisci-vega-example.ipynb
+++ b/examples/omnisci-vega-example.ipynb
@@ -17,9 +17,15 @@
"source": [
"import altair as alt\n",
"import ibis_vega_transform\n",
- "import ibis\n",
"\n",
- "conn = ibis.omniscidb.connect(\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
+ "\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='metis.mapd.com', user='demouser', password='HyperInteractive',\n",
" port=443, database='mapd', protocol= 'https'\n",
")\n",
@@ -93,7 +99,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.8"
+ "version": "3.7.6"
}
},
"nbformat": 4,
diff --git a/examples/performance-charts.ipynb b/examples/performance-charts.ipynb
index 1775f61..4a4fbcd 100644
--- a/examples/performance-charts.ipynb
+++ b/examples/performance-charts.ipynb
@@ -52,10 +52,15 @@
"source": [
"import altair as alt\n",
"import ibis_vega_transform\n",
- "import ibis.omniscidb\n",
"\n",
+ "import warnings\n",
+ "try:\n",
+ " from ibis.backends import omniscidb as ibis_omniscidb\n",
+ "except ImportError as msg:\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import omniscidb as ibis_omniscidb\n",
"\n",
- "conn = ibis.omniscidb.connect(\n",
+ "conn = ibis_omniscidb.connect(\n",
" host='metis.mapd.com', user='demouser', password='HyperInteractive',\n",
" port=443, database='mapd', protocol= 'https'\n",
")"
@@ -335,7 +340,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.7.8"
+ "version": "3.7.6"
}
},
"nbformat": 4,
diff --git a/examples/vega-compiler.ipynb b/examples/vega-compiler.ipynb
index 68bee2f..1ed94fb 100644
--- a/examples/vega-compiler.ipynb
+++ b/examples/vega-compiler.ipynb
@@ -10,7 +10,16 @@
"import ibis_vega_transform\n",
"\n",
"import ibis\n",
- "import pandas as pd"
+ "import pandas as pd\n",
+ "\n",
+ "import warnings\n",
+ "try:\n",
+ " # ibis version >= 1.4\n",
+ " from ibis.backends import pandas as ibis_pandas\n",
+ "except ImportError as msg:\n",
+ " # ibis version < 1.4\n",
+ " warnings.warn(str(msg))\n",
+ " from ibis import pandas as ibis_pandas"
]
},
{
@@ -30,7 +39,7 @@
" 'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],\n",
" 'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]\n",
"})\n",
- "connection = ibis.pandas.connect({'source': source })\n",
+ "connection = ibis_pandas.connect({'source': source })\n",
"table = connection.table('source')\n",
"\n",
"alt.Chart(table).mark_bar().encode(\n",
@@ -58,7 +67,7 @@
" 'c': ['first', 'first', 'first', 'second', 'second', 'second', 'third', 'third', 'third']\n",
"\n",
"})\n",
- "connection = ibis.pandas.connect({'source': source })\n",
+ "connection = ibis_pandas.connect({'source': source })\n",
"table = connection.table('source')\n",
"\n",
"\n",
@@ -103,7 +112,7 @@
" 'c': ['first', 'first', 'first', 'second', 'second', 'second', 'third', 'third', 'third']\n",
"\n",
"})\n",
- "connection = ibis.pandas.connect({'source': source })\n",
+ "connection = ibis_pandas.connect({'source': source })\n",
"table = connection.table('source')\n",
"\n",
"alt.Chart(table).mark_bar().encode(\n",
@@ -134,7 +143,7 @@
"\n",
"})\n",
"\n",
- "connection = ibis.pandas.connect({'source': source })\n",
+ "connection = ibis_pandas.connect({'source': source })\n",
"table = connection.table('source')\n",
"\n",
"\n",
diff --git a/ibis_vega_transform/compiler.py b/ibis_vega_transform/compiler.py
index 8c7feef..726e69e 100644
--- a/ibis_vega_transform/compiler.py
+++ b/ibis_vega_transform/compiler.py
@@ -149,14 +149,17 @@ def _extract_used_data(transforms) -> typing.Set[str]:
return {m.group(1) for m in re.finditer(r'data\("(.+?)"\)', str(transforms))}
-assert _extract_used_data(
- [
- {
- "type": "filter",
- "expr": '!(length(data("Filter_store"))) || (vlSelectionTest("Filter_store", datum))',
- }
- ]
-) == {"Filter_store"}
+assert (
+ _extract_used_data(
+ [
+ {
+ "type": "filter",
+ "expr": '!(length(data("Filter_store"))) || (vlSelectionTest("Filter_store", datum))',
+ }
+ ]
+ )
+ == {"Filter_store"}
+)
def _is_ibis(name: str) -> bool:
diff --git a/ibis_vega_transform/query.py b/ibis_vega_transform/query.py
index 0baf9cc..60e28e9 100644
--- a/ibis_vega_transform/query.py
+++ b/ibis_vega_transform/query.py
@@ -5,8 +5,17 @@
import re
import typing
import concurrent.futures
+import warnings
+
import ibis.client
-import ibis.omniscidb
+
+try:
+ # ibis version >= 1.4
+ from ibis.backends import omniscidb as ibis_omniscidb
+except ImportError as msg:
+ # ibis version < 1.4
+ warnings.warn(str(msg))
+ from ibis import omniscidb as ibis_omniscidb
import altair
import altair.vegalite.v3.display
@@ -33,9 +42,9 @@ def execute_new_client(expr):
Execute with new connection b/c connections are not threadsafe
"""
(backend,) = list(ibis.client.find_backends(expr))
- assert isinstance(backend, ibis.omniscidb.OmniSciDBClient)
+ assert isinstance(backend, ibis_omniscidb.OmniSciDBClient)
with tracer.start_span("ibis:execute:new-client") as execute_span:
- new_client = ibis.omniscidb.OmniSciDBClient(
+ new_client = ibis_omniscidb.OmniSciDBClient(
uri=backend.uri,
host=backend.host,
port=backend.port,
diff --git a/ibis_vega_transform/vegaexpr.py b/ibis_vega_transform/vegaexpr.py
index a238e28..f1a651d 100644
--- a/ibis_vega_transform/vegaexpr.py
+++ b/ibis_vega_transform/vegaexpr.py
@@ -105,8 +105,7 @@ def isBoolean(value: Any) -> bool:
def isDate(value: Any) -> bool:
- """Returns true if value is a Date object, false otherwise.
- """
+ """Returns true if value is a Date object, false otherwise."""
return isinstance(value, it.TemporalValue)
diff --git a/images/charting-example/0.svg b/images/charting-example/0.svg
index 5c055c2..23b0009 100644
--- a/images/charting-example/0.svg
+++ b/images/charting-example/0.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/images/charting-example/1.svg b/images/charting-example/1.svg
new file mode 100644
index 0000000..b8e5dcb
--- /dev/null
+++ b/images/charting-example/1.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/charting-example/2.svg b/images/charting-example/2.svg
new file mode 100644
index 0000000..d51f5b9
--- /dev/null
+++ b/images/charting-example/2.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/charting-example/3.svg b/images/charting-example/3.svg
new file mode 100644
index 0000000..3caebda
--- /dev/null
+++ b/images/charting-example/3.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/charting-example/4.svg b/images/charting-example/4.svg
new file mode 100644
index 0000000..7932df9
--- /dev/null
+++ b/images/charting-example/4.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/charting-example/5.svg b/images/charting-example/5.svg
new file mode 100644
index 0000000..eafbd41
--- /dev/null
+++ b/images/charting-example/5.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/charting-example/6.svg b/images/charting-example/6.svg
new file mode 100644
index 0000000..448bbd7
--- /dev/null
+++ b/images/charting-example/6.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/images/omnisci-vega-example/0.svg b/images/omnisci-vega-example/0.svg
index 36ea976..8a494a4 100644
--- a/images/omnisci-vega-example/0.svg
+++ b/images/omnisci-vega-example/0.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/images/performance-charts/0.svg b/images/performance-charts/0.svg
index 5c055c2..ce5f385 100644
--- a/images/performance-charts/0.svg
+++ b/images/performance-charts/0.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/package.json b/package.json
index be22400..b97630d 100644
--- a/package.json
+++ b/package.json
@@ -72,7 +72,7 @@
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.1.0",
"tslint-react": "^4.0.0",
- "typescript": "~3.7.4"
+ "typescript": "~3.8.3"
},
"sideEffects": [
"style/*.css"
diff --git a/setup.py b/setup.py
index dee1690..ba04516 100644
--- a/setup.py
+++ b/setup.py
@@ -60,7 +60,7 @@ def read(path, encoding="utf-8"):
"vega_datasets",
],
extras_require={"dev": ["black"]},
- python_requires=">=3.6",
+ python_requires=">=3.7",
include_package_data=True,
classifiers=[
'Operating System :: OS Independent',
diff --git a/src/renderer.ts b/src/renderer.ts
index 0697f11..ce1102f 100644
--- a/src/renderer.ts
+++ b/src/renderer.ts
@@ -100,8 +100,7 @@ export class IbisVegaRenderer extends Widget implements IRenderMime.IRenderer {
const res = await vegaEmbed(this.node, vSpec, {
actions: true,
defaultStyle: true,
- mode: 'vega',
-
+ mode: 'vega'
});
this._view = res.view;
diff --git a/test/ui/test.ts b/test/ui/test.ts
index 2990a3e..7191416 100644
--- a/test/ui/test.ts
+++ b/test/ui/test.ts
@@ -217,8 +217,8 @@ async function compareCharts(
describe('Test Ibis-Vega-Transform', () => {
it.each([
// File name, chart amount, timeout (ms)
- ['charting-example', 1, 60 * 1000],
- ['ibis-altair-extraction', 4, 30 * 1000],
+ ['charting-example', 7, 60 * 1000],
+ ['ibis-altair-extraction', 4, 40 * 1000],
['interactive-slider', 1, 10 * 1000],
['omnisci-vega-example', 1, 15 * 1000],
['performance-charts', 2, 15 * 1000],