From b49b40e3d0cebcec4c3e11014ca5c9ae92c86790 Mon Sep 17 00:00:00 2001 From: sidgupta Date: Sun, 17 Apr 2016 09:46:35 -0700 Subject: [PATCH 1/5] make viz types configurable --- caravel/config.py | 32 ++++++++++++++++++++++++++++++-- caravel/viz.py | 39 +++++++++++---------------------------- 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/caravel/config.py b/caravel/config.py index 93930cc1b2847..47af8a040aec2 100644 --- a/caravel/config.py +++ b/caravel/config.py @@ -23,7 +23,7 @@ ROW_LIMIT = 50000 WEBSERVER_THREADS = 8 -CARAVEL_WEBSERVER_PORT = 8088 +CARAVEL_WEBSERVER_PORT = 8001 CARAVEL_WEBSERVER_TIMEOUT = 60 CUSTOM_SECURITY_MANAGER = None @@ -33,7 +33,7 @@ SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h' # noqa # The SQLAlchemy connection string. -SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/caravel.db' +SQLALCHEMY_DATABASE_URI = 'sqlite:////Users/sidgupta/Desktop/caravelx.db' # SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp' # SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp' @@ -121,6 +121,34 @@ CACHE_DEFAULT_TIMEOUT = None CACHE_CONFIG = {'CACHE_TYPE': 'null'} + +VIZ_TYPES = { + 'TableViz': True, + 'PivotTableViz': True, + 'NVD3TimeSeriesViz': True, + 'NVD3CompareTimeSeriesViz': True, + 'NVD3TimeSeriesStackedViz': True, + 'NVD3TimeSeriesBarViz': True, + 'DistributionBarViz': True, + 'DistributionPieViz': True, + 'BubbleViz': True, + 'MarkupViz': True, + 'WordCloudViz': True, + 'BigNumberViz': True, + 'BigNumberTotalViz': True, + 'SunburstViz': True, + 'DirectedForceViz': True, + 'SankeyViz': True, + 'WorldMapViz': True, + 'FilterBoxViz': True, + 'IFrameViz': True, + 'ParallelCoordinatesViz': True, + 'HeatmapViz': True, + 'BoxPlotViz': True, + 'TreemapViz': True, +} + + try: from caravel_config import * # noqa except Exception: diff --git a/caravel/viz.py b/caravel/viz.py index 9d5f56fc4fbaf..a78523a606571 100644 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -14,7 +14,7 @@ import uuid from collections import OrderedDict, defaultdict from datetime import datetime, timedelta - +import collections import pandas as pd import numpy as np from flask import flash, request, Markup @@ -1514,30 +1514,13 @@ def get_data(self): return df.to_dict(orient="records") -viz_types_list = [ - TableViz, - PivotTableViz, - NVD3TimeSeriesViz, - NVD3CompareTimeSeriesViz, - NVD3TimeSeriesStackedViz, - NVD3TimeSeriesBarViz, - DistributionBarViz, - DistributionPieViz, - BubbleViz, - MarkupViz, - WordCloudViz, - BigNumberViz, - BigNumberTotalViz, - SunburstViz, - DirectedForceViz, - SankeyViz, - WorldMapViz, - FilterBoxViz, - IFrameViz, - ParallelCoordinatesViz, - HeatmapViz, - BoxPlotViz, - TreemapViz, -] - -viz_types = OrderedDict([(v.viz_type, v) for v in viz_types_list]) +viz_types = collections.OrderedDict() + +temp = config.get('VIZ_TYPES') + + +for key, value in temp.items(): + if value: + viz_types[key] = key + +print(viz_types) From 07c9310833e46e43371441cf46efd62e0c0a244c Mon Sep 17 00:00:00 2001 From: sidgupta Date: Sun, 17 Apr 2016 16:23:32 -0700 Subject: [PATCH 2/5] make visualizations configurable --- caravel/config.py | 54 +++++++++++++++++++++------------------ caravel/viz.py | 65 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 83 insertions(+), 36 deletions(-) diff --git a/caravel/config.py b/caravel/config.py index 47af8a040aec2..1617e27680447 100644 --- a/caravel/config.py +++ b/caravel/config.py @@ -23,7 +23,7 @@ ROW_LIMIT = 50000 WEBSERVER_THREADS = 8 -CARAVEL_WEBSERVER_PORT = 8001 +CARAVEL_WEBSERVER_PORT = 8088 CARAVEL_WEBSERVER_TIMEOUT = 60 CUSTOM_SECURITY_MANAGER = None @@ -33,7 +33,7 @@ SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h' # noqa # The SQLAlchemy connection string. -SQLALCHEMY_DATABASE_URI = 'sqlite:////Users/sidgupta/Desktop/caravelx.db' +SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/caravel.db' # SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp' # SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp' @@ -122,30 +122,34 @@ CACHE_CONFIG = {'CACHE_TYPE': 'null'} +# --------------------------------------------------- +# Enable different visualizations: True or False (refer viz.py) +# --------------------------------------------------- + VIZ_TYPES = { - 'TableViz': True, - 'PivotTableViz': True, - 'NVD3TimeSeriesViz': True, - 'NVD3CompareTimeSeriesViz': True, - 'NVD3TimeSeriesStackedViz': True, - 'NVD3TimeSeriesBarViz': True, - 'DistributionBarViz': True, - 'DistributionPieViz': True, - 'BubbleViz': True, - 'MarkupViz': True, - 'WordCloudViz': True, - 'BigNumberViz': True, - 'BigNumberTotalViz': True, - 'SunburstViz': True, - 'DirectedForceViz': True, - 'SankeyViz': True, - 'WorldMapViz': True, - 'FilterBoxViz': True, - 'IFrameViz': True, - 'ParallelCoordinatesViz': True, - 'HeatmapViz': True, - 'BoxPlotViz': True, - 'TreemapViz': True, + 'table': True, + 'pivot_table': False, + 'markup': False, + 'word_cloud': True, + 'treemap': True, + 'box_plot': True, + 'bubble': True, + 'big_number': True, + 'big_number_total': True, + 'line': True, + 'bar': True, + 'compare': True, + 'area': True, + 'pie': True, + 'dist_bar': True, + 'sunburst': True, + 'sankey': True, + 'directed_force': True, + 'world_map': True, + 'filter_box': True, + 'iframe': True, + 'para': True, + 'heatmap': True, } diff --git a/caravel/viz.py b/caravel/viz.py index a78523a606571..73a694d93ec73 100644 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -14,7 +14,6 @@ import uuid from collections import OrderedDict, defaultdict from datetime import datetime, timedelta -import collections import pandas as pd import numpy as np from flask import flash, request, Markup @@ -313,6 +312,7 @@ class TableViz(BaseViz): viz_type = "table" verbose_name = "Table View" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' fieldsets = ({ 'label': "Chart Options", @@ -371,6 +371,7 @@ class PivotTableViz(BaseViz): viz_type = "pivot_table" verbose_name = "Pivot Table" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = False fieldsets = ({ @@ -433,6 +434,7 @@ class MarkupViz(BaseViz): viz_type = "markup" verbose_name = "Markup Widget" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] fieldsets = ({ 'label': None, 'fields': ('markup_type', 'code') @@ -461,6 +463,7 @@ class WordCloudViz(BaseViz): viz_type = "word_cloud" verbose_name = "Word Cloud" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': None, @@ -493,6 +496,7 @@ class TreemapViz(BaseViz): viz_type = "treemap" verbose_name = "Treemap" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'd3.js' is_timeseries = False @@ -534,6 +538,7 @@ class BoxPlotViz(NVD3Viz): viz_type = "box_plot" verbose_name = "Box Plot" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] sort_series = False is_timeseries = True fieldsets = ({ @@ -641,6 +646,7 @@ class BubbleViz(NVD3Viz): viz_type = "bubble" verbose_name = "Bubble Chart" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': None, @@ -709,6 +715,7 @@ class BigNumberViz(BaseViz): viz_type = "big_number" verbose_name = "Big Number with Trendline" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = True fieldsets = ({ @@ -759,6 +766,7 @@ class BigNumberTotalViz(BaseViz): viz_type = "big_number_total" verbose_name = "Big Number" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = False fieldsets = ({ @@ -805,6 +813,7 @@ class NVD3TimeSeriesViz(NVD3Viz): viz_type = "line" verbose_name = "Time Series - Line Chart" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] sort_series = False is_timeseries = True fieldsets = ({ @@ -945,6 +954,7 @@ class NVD3TimeSeriesBarViz(NVD3TimeSeriesViz): viz_type = "bar" sort_series = True verbose_name = "Time Series - Bar Chart" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] fieldsets = [NVD3TimeSeriesViz.fieldsets[0]] + [{ 'label': 'Chart Options', 'fields': ( @@ -963,6 +973,7 @@ class NVD3CompareTimeSeriesViz(NVD3TimeSeriesViz): viz_type = 'compare' verbose_name = "Time Series - Percent Change" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] class NVD3TimeSeriesStackedViz(NVD3TimeSeriesViz): @@ -971,6 +982,7 @@ class NVD3TimeSeriesStackedViz(NVD3TimeSeriesViz): viz_type = "area" verbose_name = "Time Series - Stacked" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] sort_series = True fieldsets = [NVD3TimeSeriesViz.fieldsets[0]] + [{ 'label': 'Chart Options', @@ -990,6 +1002,7 @@ class DistributionPieViz(NVD3Viz): viz_type = "pie" verbose_name = "Distribution - NVD3 - Pie Chart" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': None, @@ -1026,6 +1039,7 @@ class DistributionBarViz(DistributionPieViz): viz_type = "dist_bar" verbose_name = "Distribution - Bar Chart" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': 'Chart Options', @@ -1106,6 +1120,7 @@ class SunburstViz(BaseViz): viz_type = "sunburst" verbose_name = "Sunburst" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = ( 'Kerry Rodden ' @@ -1172,6 +1187,7 @@ class SankeyViz(BaseViz): viz_type = "sankey" verbose_name = "Sankey" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = 'd3-sankey on npm' fieldsets = ({ @@ -1236,6 +1252,7 @@ class DirectedForceViz(BaseViz): viz_type = "directed_force" verbose_name = "Directed Force Layout" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'd3noob @bl.ocks.org' is_timeseries = False fieldsets = ({ @@ -1278,6 +1295,7 @@ class WorldMapViz(BaseViz): viz_type = "world_map" verbose_name = "World Map" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = 'datamaps on npm' fieldsets = ({ @@ -1352,6 +1370,7 @@ class FilterBoxViz(BaseViz): viz_type = "filter_box" verbose_name = "Filters" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = 'a Caravel original' fieldsets = ({ @@ -1400,6 +1419,7 @@ class IFrameViz(BaseViz): viz_type = "iframe" verbose_name = "iFrame" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = False fieldsets = ({ @@ -1418,6 +1438,7 @@ class ParallelCoordinatesViz(BaseViz): viz_type = "para" verbose_name = "Parallel Coordinates" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = ( '' 'Syntagmatic\'s library') @@ -1455,6 +1476,7 @@ class HeatmapViz(BaseViz): viz_type = "heatmap" verbose_name = "Heatmap" + enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = ( 'inspired from mbostock @' @@ -1514,13 +1536,34 @@ def get_data(self): return df.to_dict(orient="records") -viz_types = collections.OrderedDict() - -temp = config.get('VIZ_TYPES') - - -for key, value in temp.items(): - if value: - viz_types[key] = key - -print(viz_types) +viz_types_list = [ + TableViz, + PivotTableViz, + NVD3TimeSeriesViz, + NVD3CompareTimeSeriesViz, + NVD3TimeSeriesStackedViz, + NVD3TimeSeriesBarViz, + DistributionBarViz, + DistributionPieViz, + BubbleViz, + MarkupViz, + WordCloudViz, + BigNumberViz, + BigNumberTotalViz, + SunburstViz, + DirectedForceViz, + SankeyViz, + WorldMapViz, + FilterBoxViz, + IFrameViz, + ParallelCoordinatesViz, + HeatmapViz, + BoxPlotViz, + TreemapViz, +] + +viz_types = OrderedDict() + +for v in viz_types_list: + if v.enable_viz_type: + viz_types[v.viz_type] = v From 80901aca4108cd6f415ead31aa2b378f53021279 Mon Sep 17 00:00:00 2001 From: sidgupta Date: Sun, 17 Apr 2016 16:26:49 -0700 Subject: [PATCH 3/5] deault every viz is true --- caravel/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caravel/config.py b/caravel/config.py index 1617e27680447..609006703742f 100644 --- a/caravel/config.py +++ b/caravel/config.py @@ -128,8 +128,8 @@ VIZ_TYPES = { 'table': True, - 'pivot_table': False, - 'markup': False, + 'pivot_table': True, + 'markup': True, 'word_cloud': True, 'treemap': True, 'box_plot': True, From e6e4bbc567cf22ea521333a6ad6446dafdc9a885 Mon Sep 17 00:00:00 2001 From: sidgupta Date: Sun, 17 Apr 2016 21:06:59 -0700 Subject: [PATCH 4/5] add blacklist viz_type --- caravel/config.py | 31 ++++--------------------------- caravel/viz.py | 29 +---------------------------- 2 files changed, 5 insertions(+), 55 deletions(-) diff --git a/caravel/config.py b/caravel/config.py index 609006703742f..18c9d5c69f064 100644 --- a/caravel/config.py +++ b/caravel/config.py @@ -123,35 +123,12 @@ # --------------------------------------------------- -# Enable different visualizations: True or False (refer viz.py) +# List of viz_types not allowed in your environment +# For example: Blacklist pivot table and treemap: +# VIZ_TYPE_BLACKLIST = ['pivot_table', 'treemap'] # --------------------------------------------------- -VIZ_TYPES = { - 'table': True, - 'pivot_table': True, - 'markup': True, - 'word_cloud': True, - 'treemap': True, - 'box_plot': True, - 'bubble': True, - 'big_number': True, - 'big_number_total': True, - 'line': True, - 'bar': True, - 'compare': True, - 'area': True, - 'pie': True, - 'dist_bar': True, - 'sunburst': True, - 'sankey': True, - 'directed_force': True, - 'world_map': True, - 'filter_box': True, - 'iframe': True, - 'para': True, - 'heatmap': True, -} - +VIZ_TYPE_BLACKLIST = [] try: from caravel_config import * # noqa diff --git a/caravel/viz.py b/caravel/viz.py index 73a694d93ec73..a3303b1e04d74 100644 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -312,7 +312,6 @@ class TableViz(BaseViz): viz_type = "table" verbose_name = "Table View" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' fieldsets = ({ 'label': "Chart Options", @@ -371,7 +370,6 @@ class PivotTableViz(BaseViz): viz_type = "pivot_table" verbose_name = "Pivot Table" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = False fieldsets = ({ @@ -434,7 +432,6 @@ class MarkupViz(BaseViz): viz_type = "markup" verbose_name = "Markup Widget" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] fieldsets = ({ 'label': None, 'fields': ('markup_type', 'code') @@ -463,7 +460,6 @@ class WordCloudViz(BaseViz): viz_type = "word_cloud" verbose_name = "Word Cloud" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': None, @@ -496,7 +492,6 @@ class TreemapViz(BaseViz): viz_type = "treemap" verbose_name = "Treemap" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'd3.js' is_timeseries = False @@ -538,7 +533,6 @@ class BoxPlotViz(NVD3Viz): viz_type = "box_plot" verbose_name = "Box Plot" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] sort_series = False is_timeseries = True fieldsets = ({ @@ -646,7 +640,6 @@ class BubbleViz(NVD3Viz): viz_type = "bubble" verbose_name = "Bubble Chart" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': None, @@ -715,7 +708,6 @@ class BigNumberViz(BaseViz): viz_type = "big_number" verbose_name = "Big Number with Trendline" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = True fieldsets = ({ @@ -766,7 +758,6 @@ class BigNumberTotalViz(BaseViz): viz_type = "big_number_total" verbose_name = "Big Number" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = False fieldsets = ({ @@ -813,7 +804,6 @@ class NVD3TimeSeriesViz(NVD3Viz): viz_type = "line" verbose_name = "Time Series - Line Chart" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] sort_series = False is_timeseries = True fieldsets = ({ @@ -954,7 +944,6 @@ class NVD3TimeSeriesBarViz(NVD3TimeSeriesViz): viz_type = "bar" sort_series = True verbose_name = "Time Series - Bar Chart" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] fieldsets = [NVD3TimeSeriesViz.fieldsets[0]] + [{ 'label': 'Chart Options', 'fields': ( @@ -973,7 +962,6 @@ class NVD3CompareTimeSeriesViz(NVD3TimeSeriesViz): viz_type = 'compare' verbose_name = "Time Series - Percent Change" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] class NVD3TimeSeriesStackedViz(NVD3TimeSeriesViz): @@ -982,7 +970,6 @@ class NVD3TimeSeriesStackedViz(NVD3TimeSeriesViz): viz_type = "area" verbose_name = "Time Series - Stacked" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] sort_series = True fieldsets = [NVD3TimeSeriesViz.fieldsets[0]] + [{ 'label': 'Chart Options', @@ -1002,7 +989,6 @@ class DistributionPieViz(NVD3Viz): viz_type = "pie" verbose_name = "Distribution - NVD3 - Pie Chart" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': None, @@ -1039,7 +1025,6 @@ class DistributionBarViz(DistributionPieViz): viz_type = "dist_bar" verbose_name = "Distribution - Bar Chart" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False fieldsets = ({ 'label': 'Chart Options', @@ -1120,7 +1105,6 @@ class SunburstViz(BaseViz): viz_type = "sunburst" verbose_name = "Sunburst" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = ( 'Kerry Rodden ' @@ -1187,7 +1171,6 @@ class SankeyViz(BaseViz): viz_type = "sankey" verbose_name = "Sankey" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = 'd3-sankey on npm' fieldsets = ({ @@ -1252,7 +1235,6 @@ class DirectedForceViz(BaseViz): viz_type = "directed_force" verbose_name = "Directed Force Layout" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'd3noob @bl.ocks.org' is_timeseries = False fieldsets = ({ @@ -1295,7 +1277,6 @@ class WorldMapViz(BaseViz): viz_type = "world_map" verbose_name = "World Map" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = 'datamaps on npm' fieldsets = ({ @@ -1370,7 +1351,6 @@ class FilterBoxViz(BaseViz): viz_type = "filter_box" verbose_name = "Filters" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = 'a Caravel original' fieldsets = ({ @@ -1419,7 +1399,6 @@ class IFrameViz(BaseViz): viz_type = "iframe" verbose_name = "iFrame" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = 'a Caravel original' is_timeseries = False fieldsets = ({ @@ -1438,7 +1417,6 @@ class ParallelCoordinatesViz(BaseViz): viz_type = "para" verbose_name = "Parallel Coordinates" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] credits = ( '' 'Syntagmatic\'s library') @@ -1476,7 +1454,6 @@ class HeatmapViz(BaseViz): viz_type = "heatmap" verbose_name = "Heatmap" - enable_viz_type = config.get('VIZ_TYPES')[viz_type] is_timeseries = False credits = ( 'inspired from mbostock @' @@ -1562,8 +1539,4 @@ def get_data(self): TreemapViz, ] -viz_types = OrderedDict() - -for v in viz_types_list: - if v.enable_viz_type: - viz_types[v.viz_type] = v +viz_types = OrderedDict([(v.viz_type, v) for v in viz_types_list if v.viz_type not in config.get('VIZ_TYPE_BLACKLIST')]) From 27f9e6f5c22db7f18f0cce6df046b7c48ca00a30 Mon Sep 17 00:00:00 2001 From: sidgupta Date: Sun, 17 Apr 2016 21:10:00 -0700 Subject: [PATCH 5/5] fix build --- caravel/viz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/caravel/viz.py b/caravel/viz.py index a3303b1e04d74..2765244f9e037 100644 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -1539,4 +1539,5 @@ def get_data(self): TreemapViz, ] -viz_types = OrderedDict([(v.viz_type, v) for v in viz_types_list if v.viz_type not in config.get('VIZ_TYPE_BLACKLIST')]) +viz_types = OrderedDict([(v.viz_type, v) for v in viz_types_list + if v.viz_type not in config.get('VIZ_TYPE_BLACKLIST')])