@@ -516,7 +516,7 @@ def should_be_timeseries(self):
516
516
return fd .get ('include_time' )
517
517
518
518
def query_obj (self ):
519
- d = super (TableViz , self ).query_obj ()
519
+ d = super ().query_obj ()
520
520
fd = self .form_data
521
521
522
522
if fd .get ('all_columns' ) and (fd .get ('groupby' ) or fd .get ('metrics' )):
@@ -608,7 +608,7 @@ class TimeTableViz(BaseViz):
608
608
is_timeseries = True
609
609
610
610
def query_obj (self ):
611
- d = super (TimeTableViz , self ).query_obj ()
611
+ d = super ().query_obj ()
612
612
fd = self .form_data
613
613
614
614
if not fd .get ('metrics' ):
@@ -651,7 +651,7 @@ class PivotTableViz(BaseViz):
651
651
is_timeseries = False
652
652
653
653
def query_obj (self ):
654
- d = super (PivotTableViz , self ).query_obj ()
654
+ d = super ().query_obj ()
655
655
groupby = self .form_data .get ('groupby' )
656
656
columns = self .form_data .get ('columns' )
657
657
metrics = self .form_data .get ('metrics' )
@@ -745,7 +745,7 @@ class WordCloudViz(BaseViz):
745
745
is_timeseries = False
746
746
747
747
def query_obj (self ):
748
- d = super (WordCloudViz , self ).query_obj ()
748
+ d = super ().query_obj ()
749
749
d ['groupby' ] = [self .form_data .get ('series' )]
750
750
return d
751
751
@@ -830,7 +830,7 @@ def get_data(self, df):
830
830
}
831
831
832
832
def query_obj (self ):
833
- d = super (CalHeatmapViz , self ).query_obj ()
833
+ d = super ().query_obj ()
834
834
fd = self .form_data
835
835
d ['metrics' ] = fd .get ('metrics' )
836
836
return d
@@ -941,7 +941,7 @@ class BubbleViz(NVD3Viz):
941
941
942
942
def query_obj (self ):
943
943
form_data = self .form_data
944
- d = super (BubbleViz , self ).query_obj ()
944
+ d = super ().query_obj ()
945
945
d ['groupby' ] = [
946
946
form_data .get ('entity' ),
947
947
]
@@ -991,7 +991,7 @@ class BulletViz(NVD3Viz):
991
991
992
992
def query_obj (self ):
993
993
form_data = self .form_data
994
- d = super (BulletViz , self ).query_obj ()
994
+ d = super ().query_obj ()
995
995
self .metric = form_data .get ('metric' )
996
996
997
997
def as_strings (field ):
@@ -1039,7 +1039,7 @@ class BigNumberViz(BaseViz):
1039
1039
is_timeseries = True
1040
1040
1041
1041
def query_obj (self ):
1042
- d = super (BigNumberViz , self ).query_obj ()
1042
+ d = super ().query_obj ()
1043
1043
metric = self .form_data .get ('metric' )
1044
1044
if not metric :
1045
1045
raise Exception (_ ('Pick a metric!' ))
@@ -1058,7 +1058,7 @@ class BigNumberTotalViz(BaseViz):
1058
1058
is_timeseries = False
1059
1059
1060
1060
def query_obj (self ):
1061
- d = super (BigNumberTotalViz , self ).query_obj ()
1061
+ d = super ().query_obj ()
1062
1062
metric = self .form_data .get ('metric' )
1063
1063
if not metric :
1064
1064
raise Exception (_ ('Pick a metric!' ))
@@ -1299,7 +1299,7 @@ class NVD3DualLineViz(NVD3Viz):
1299
1299
is_timeseries = True
1300
1300
1301
1301
def query_obj (self ):
1302
- d = super (NVD3DualLineViz , self ).query_obj ()
1302
+ d = super ().query_obj ()
1303
1303
m1 = self .form_data .get ('metric' )
1304
1304
m2 = self .form_data .get ('metric_2' )
1305
1305
d ['metrics' ] = [m1 , m2 ]
@@ -1383,7 +1383,7 @@ class NVD3TimePivotViz(NVD3TimeSeriesViz):
1383
1383
verbose_name = _ ('Time Series - Period Pivot' )
1384
1384
1385
1385
def query_obj (self ):
1386
- d = super (NVD3TimePivotViz , self ).query_obj ()
1386
+ d = super ().query_obj ()
1387
1387
d ['metrics' ] = [self .form_data .get ('metric' )]
1388
1388
return d
1389
1389
@@ -1465,7 +1465,7 @@ class HistogramViz(BaseViz):
1465
1465
1466
1466
def query_obj (self ):
1467
1467
"""Returns the query object for this visualization"""
1468
- d = super (HistogramViz , self ).query_obj ()
1468
+ d = super ().query_obj ()
1469
1469
d ['row_limit' ] = self .form_data .get (
1470
1470
'row_limit' , int (config .get ('VIZ_ROW_LIMIT' )))
1471
1471
numeric_columns = self .form_data .get ('all_columns_x' )
@@ -1511,7 +1511,7 @@ class DistributionBarViz(DistributionPieViz):
1511
1511
is_timeseries = False
1512
1512
1513
1513
def query_obj (self ):
1514
- d = super (DistributionBarViz , self ).query_obj () # noqa
1514
+ d = super ().query_obj () # noqa
1515
1515
fd = self .form_data
1516
1516
if (
1517
1517
len (d ['groupby' ]) <
@@ -1592,7 +1592,7 @@ def get_data(self, df):
1592
1592
return json .loads (df .to_json (orient = 'values' ))
1593
1593
1594
1594
def query_obj (self ):
1595
- qry = super (SunburstViz , self ).query_obj ()
1595
+ qry = super ().query_obj ()
1596
1596
fd = self .form_data
1597
1597
qry ['metrics' ] = [fd ['metric' ]]
1598
1598
secondary_metric = fd .get ('secondary_metric' )
@@ -1611,7 +1611,7 @@ class SankeyViz(BaseViz):
1611
1611
credits = '<a href="https://www.npmjs.com/package/d3-sankey">d3-sankey on npm</a>'
1612
1612
1613
1613
def query_obj (self ):
1614
- qry = super (SankeyViz , self ).query_obj ()
1614
+ qry = super ().query_obj ()
1615
1615
if len (qry ['groupby' ]) != 2 :
1616
1616
raise Exception (_ ('Pick exactly 2 columns as [Source / Target]' ))
1617
1617
qry ['metrics' ] = [
@@ -1662,7 +1662,7 @@ class DirectedForceViz(BaseViz):
1662
1662
is_timeseries = False
1663
1663
1664
1664
def query_obj (self ):
1665
- qry = super (DirectedForceViz , self ).query_obj ()
1665
+ qry = super ().query_obj ()
1666
1666
if len (self .form_data ['groupby' ]) != 2 :
1667
1667
raise Exception (_ ("Pick exactly 2 columns to 'Group By'" ))
1668
1668
qry ['metrics' ] = [self .form_data ['metric' ]]
@@ -1683,7 +1683,7 @@ class ChordViz(BaseViz):
1683
1683
is_timeseries = False
1684
1684
1685
1685
def query_obj (self ):
1686
- qry = super (ChordViz , self ).query_obj ()
1686
+ qry = super ().query_obj ()
1687
1687
fd = self .form_data
1688
1688
qry ['groupby' ] = [fd .get ('groupby' ), fd .get ('columns' )]
1689
1689
qry ['metrics' ] = [utils .get_metric_name (fd .get ('metric' ))]
@@ -1716,7 +1716,7 @@ class CountryMapViz(BaseViz):
1716
1716
credits = 'From bl.ocks.org By john-guerra'
1717
1717
1718
1718
def query_obj (self ):
1719
- qry = super (CountryMapViz , self ).query_obj ()
1719
+ qry = super ().query_obj ()
1720
1720
qry ['metrics' ] = [
1721
1721
self .form_data ['metric' ]]
1722
1722
qry ['groupby' ] = [self .form_data ['entity' ]]
@@ -1744,7 +1744,7 @@ class WorldMapViz(BaseViz):
1744
1744
credits = 'datamaps on <a href="https://www.npmjs.com/package/datamaps">npm</a>'
1745
1745
1746
1746
def query_obj (self ):
1747
- qry = super (WorldMapViz , self ).query_obj ()
1747
+ qry = super ().query_obj ()
1748
1748
qry ['groupby' ] = [self .form_data ['entity' ]]
1749
1749
return qry
1750
1750
@@ -1802,7 +1802,7 @@ def query_obj(self):
1802
1802
return None
1803
1803
1804
1804
def run_extra_queries (self ):
1805
- qry = super (FilterBoxViz , self ).query_obj ()
1805
+ qry = super ().query_obj ()
1806
1806
filters = self .form_data .get ('filter_configs' ) or []
1807
1807
qry ['row_limit' ] = self .filter_row_limit
1808
1808
self .dataframes = {}
@@ -1880,7 +1880,7 @@ class ParallelCoordinatesViz(BaseViz):
1880
1880
is_timeseries = False
1881
1881
1882
1882
def query_obj (self ):
1883
- d = super (ParallelCoordinatesViz , self ).query_obj ()
1883
+ d = super ().query_obj ()
1884
1884
fd = self .form_data
1885
1885
d ['groupby' ] = [fd .get ('series' )]
1886
1886
return d
@@ -1901,7 +1901,7 @@ class HeatmapViz(BaseViz):
1901
1901
'bl.ocks.org</a>' )
1902
1902
1903
1903
def query_obj (self ):
1904
- d = super (HeatmapViz , self ).query_obj ()
1904
+ d = super ().query_obj ()
1905
1905
fd = self .form_data
1906
1906
d ['metrics' ] = [fd .get ('metric' )]
1907
1907
d ['groupby' ] = [fd .get ('all_columns_x' ), fd .get ('all_columns_y' )]
@@ -1967,7 +1967,7 @@ class MapboxViz(BaseViz):
1967
1967
'<a href=https://www.mapbox.com/mapbox-gl-js/api/>Mapbox GL JS</a>' )
1968
1968
1969
1969
def query_obj (self ):
1970
- d = super (MapboxViz , self ).query_obj ()
1970
+ d = super ().query_obj ()
1971
1971
fd = self .form_data
1972
1972
label_col = fd .get ('mapbox_label' )
1973
1973
@@ -2205,7 +2205,7 @@ def query_obj(self):
2205
2205
if fd .get ('filter_nulls' , True ):
2206
2206
self .add_null_filters ()
2207
2207
2208
- d = super (BaseDeckGLViz , self ).query_obj ()
2208
+ d = super ().query_obj ()
2209
2209
gb = []
2210
2210
2211
2211
for key in self .spatial_control_keys :
@@ -2271,7 +2271,7 @@ def query_obj(self):
2271
2271
fd .get ('time_grain_sqla' ) or fd .get ('granularity' ))
2272
2272
self .point_radius_fixed = (
2273
2273
fd .get ('point_radius_fixed' ) or {'type' : 'fix' , 'value' : 500 })
2274
- return super (DeckScatterViz , self ).query_obj ()
2274
+ return super ().query_obj ()
2275
2275
2276
2276
def get_metrics (self ):
2277
2277
self .metric = None
@@ -2298,7 +2298,7 @@ def get_data(self, df):
2298
2298
self .dim = self .form_data .get ('dimension' )
2299
2299
if self .point_radius_fixed .get ('type' ) != 'metric' :
2300
2300
self .fixed_value = self .point_radius_fixed .get ('value' )
2301
- return super (DeckScatterViz , self ).get_data (df )
2301
+ return super ().get_data (df )
2302
2302
2303
2303
2304
2304
class DeckScreengrid (BaseDeckGLViz ):
@@ -2313,7 +2313,7 @@ class DeckScreengrid(BaseDeckGLViz):
2313
2313
def query_obj (self ):
2314
2314
fd = self .form_data
2315
2315
self .is_timeseries = fd .get ('time_grain_sqla' ) or fd .get ('granularity' )
2316
- return super (DeckScreengrid , self ).query_obj ()
2316
+ return super ().query_obj ()
2317
2317
2318
2318
def get_properties (self , d ):
2319
2319
return {
@@ -2324,7 +2324,7 @@ def get_properties(self, d):
2324
2324
2325
2325
def get_data (self , df ):
2326
2326
self .metric_label = utils .get_metric_name (self .metric )
2327
- return super (DeckScreengrid , self ).get_data (df )
2327
+ return super ().get_data (df )
2328
2328
2329
2329
2330
2330
class DeckGrid (BaseDeckGLViz ):
@@ -2343,7 +2343,7 @@ def get_properties(self, d):
2343
2343
2344
2344
def get_data (self , df ):
2345
2345
self .metric_label = utils .get_metric_name (self .metric )
2346
- return super (DeckGrid , self ).get_data (df )
2346
+ return super ().get_data (df )
2347
2347
2348
2348
2349
2349
def geohash_to_json (geohash_code ):
@@ -2374,7 +2374,7 @@ class DeckPathViz(BaseDeckGLViz):
2374
2374
def query_obj (self ):
2375
2375
fd = self .form_data
2376
2376
self .is_timeseries = fd .get ('time_grain_sqla' ) or fd .get ('granularity' )
2377
- d = super (DeckPathViz , self ).query_obj ()
2377
+ d = super ().query_obj ()
2378
2378
self .metric = fd .get ('metric' )
2379
2379
line_col = fd .get ('line_column' )
2380
2380
if d ['metrics' ]:
@@ -2401,7 +2401,7 @@ def get_properties(self, d):
2401
2401
2402
2402
def get_data (self , df ):
2403
2403
self .metric_label = utils .get_metric_name (self .metric )
2404
- return super (DeckPathViz , self ).get_data (df )
2404
+ return super ().get_data (df )
2405
2405
2406
2406
2407
2407
class DeckPolygon (DeckPathViz ):
@@ -2416,7 +2416,7 @@ def query_obj(self):
2416
2416
fd = self .form_data
2417
2417
self .elevation = (
2418
2418
fd .get ('point_radius_fixed' ) or {'type' : 'fix' , 'value' : 500 })
2419
- return super (DeckPolygon , self ).query_obj ()
2419
+ return super ().query_obj ()
2420
2420
2421
2421
def get_metrics (self ):
2422
2422
metrics = [self .form_data .get ('metric' )]
@@ -2425,7 +2425,7 @@ def get_metrics(self):
2425
2425
return [metric for metric in metrics if metric ]
2426
2426
2427
2427
def get_properties (self , d ):
2428
- super (DeckPolygon , self ).get_properties (d )
2428
+ super ().get_properties (d )
2429
2429
fd = self .form_data
2430
2430
elevation = fd ['point_radius_fixed' ]['value' ]
2431
2431
type_ = fd ['point_radius_fixed' ]['type' ]
@@ -2460,7 +2460,7 @@ class DeckGeoJson(BaseDeckGLViz):
2460
2460
verbose_name = _ ('Deck.gl - GeoJSON' )
2461
2461
2462
2462
def query_obj (self ):
2463
- d = super (DeckGeoJson , self ).query_obj ()
2463
+ d = super ().query_obj ()
2464
2464
d ['columns' ] += [self .form_data .get ('geojson' )]
2465
2465
d ['metrics' ] = []
2466
2466
d ['groupby' ] = []
@@ -2484,7 +2484,7 @@ def query_obj(self):
2484
2484
fd = self .form_data
2485
2485
self .is_timeseries = bool (
2486
2486
fd .get ('time_grain_sqla' ) or fd .get ('granularity' ))
2487
- return super (DeckArc , self ).query_obj ()
2487
+ return super ().query_obj ()
2488
2488
2489
2489
def get_properties (self , d ):
2490
2490
dim = self .form_data .get ('dimension' )
@@ -2496,7 +2496,7 @@ def get_properties(self, d):
2496
2496
}
2497
2497
2498
2498
def get_data (self , df ):
2499
- d = super (DeckArc , self ).get_data (df )
2499
+ d = super ().get_data (df )
2500
2500
2501
2501
return {
2502
2502
'features' : d ['features' ],
@@ -2514,7 +2514,7 @@ class EventFlowViz(BaseViz):
2514
2514
is_timeseries = True
2515
2515
2516
2516
def query_obj (self ):
2517
- query = super (EventFlowViz , self ).query_obj ()
2517
+ query = super ().query_obj ()
2518
2518
form_data = self .form_data
2519
2519
2520
2520
event_key = form_data .get ('all_columns_x' )
@@ -2603,7 +2603,7 @@ class RoseViz(NVD3TimeSeriesViz):
2603
2603
is_timeseries = True
2604
2604
2605
2605
def get_data (self , df ):
2606
- data = super (RoseViz , self ).get_data (df )
2606
+ data = super ().get_data (df )
2607
2607
result = {}
2608
2608
for datum in data :
2609
2609
key = datum ['key' ]
@@ -2631,7 +2631,7 @@ class PartitionViz(NVD3TimeSeriesViz):
2631
2631
verbose_name = _ ('Partition Diagram' )
2632
2632
2633
2633
def query_obj (self ):
2634
- query_obj = super (PartitionViz , self ).query_obj ()
2634
+ query_obj = super ().query_obj ()
2635
2635
time_op = self .form_data .get ('time_series_option' , 'not_time' )
2636
2636
# Return time series data if the user specifies so
2637
2637
query_obj ['is_timeseries' ] = time_op != 'not_time'
0 commit comments