From 3134f40eac32eaa7a302a69d0c1cf81fa9f114db Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Fri, 22 Sep 2017 15:42:52 +0000 Subject: [PATCH] Remove advanced use cases that no longer make sense --- .../analysis/analysis-layers-use-cases.js | 280 ------------------ 1 file changed, 280 deletions(-) diff --git a/test/acceptance/analysis/analysis-layers-use-cases.js b/test/acceptance/analysis/analysis-layers-use-cases.js index b08c264a..2f087626 100644 --- a/test/acceptance/analysis/analysis-layers-use-cases.js +++ b/test/acceptance/analysis/analysis-layers-use-cases.js @@ -261,287 +261,7 @@ describe('analysis-layers use cases', function () { pointInPolygonDef ] ) - }, - - { - skip: true, - desc: 'I. Distribution centers', - mapConfig: mapConfig( - // layers - [ - { - type: 'cartodb', - options: { - 'source': { id: 'b0' }, - 'cartocss': [ - '#distribution_centers {', - ' marker-fill-opacity: 1.0;', - ' marker-line-color: #FFF;', - ' marker-line-width: 0.5;', - ' marker-line-opacity: 0.7;', - ' marker-placement: point;', - ' marker-type: ellipse;', - ' marker-width: 8;', - ' marker-fill: blue;', - ' marker-allow-overlap: true;', - '}' - ].join('\n'), - 'cartocss_version': '2.3.0' - } - }, - { - type: 'cartodb', - options: { - 'source': { id: 'a0' }, - 'cartocss': [ - '#shops {', - ' marker-fill-opacity: 1.0;', - ' marker-line-color: #FFF;', - ' marker-line-width: 0.5;', - ' marker-line-opacity: 0.7;', - ' marker-placement: point;', - ' marker-type: ellipse;', - ' marker-width: 8;', - ' marker-fill: red;', - ' marker-allow-overlap: true;', - '}' - ].join('\n'), - 'cartocss_version': '2.3.0' - } - }, - { - type: 'cartodb', - options: { - 'source': { id: 'a1' }, - 'cartocss': [ - '#routing {', - ' line-color: ramp([routing_time], colorbrewer(Reds));', - ' line-width: ramp([routing_time], 2, 8);', - ' line-opacity: 1.0;', - '}' - ].join('\n'), - 'cartocss_version': '2.3.0' - } - } - ], - // dataviews - { - distribution_center_name_category: { - source: { id: 'b0' }, - type: 'aggregation', - options: { - column: 'name' - } - }, - time_histogram: { - source: { id: 'a1' }, - type: 'histogram', - options: { - column: 'routing_time' - } - }, - distance_histogram: { - source: { id: 'a1' }, - type: 'histogram', - options: { - column: 'routing_distance' - } - } - }, - // analysis - [ - { - id: 'a1', - type: 'routing-n-to-n', - params: { - // distanceColumn: 'routing_distance', - // timeColumn: 'routing_time', - originSource: { - id: 'b0', - type: 'source', - params: { - query: 'select * from distribution_centers' - } - }, - destinationSource: { - id: 'a0', - type: 'source', - params: { - query: 'select * from shops' - } - } - } - } - ] - ) - }, - - { - skip: true, - desc: 'II. Population analysis', - mapConfig: mapConfig( - // layers - [ - { - type: 'cartodb', - options: { - 'source': { id: 'a2' }, - 'cartocss': [ - '#count_in_polygon {', - ' polygon-opacity: 1.0', - ' line-color: #FFF;', - ' line-width: 0.5;', - ' line-opacity: 0.7', - ' polygon-fill: ramp([estimated_people], colorbrewer(Reds));', - '}' - ].join('\n'), - 'cartocss_version': '2.3.0' - } - }, - { - type: 'cartodb', - options: { - 'source': { id: 'a0' }, - 'cartocss': DEFAULT_MULTITYPE_STYLE, - 'cartocss_version': '2.3.0' - } - } - ], - // dataviews - { - total_population_formula: { - 'source': { id: 'a3' }, - type: 'formula', - options: { - column: 'total_population', - operation: 'sum' - } - }, - people_histogram: { // this injects a range filter at `a2` node output - 'source': { id: 'a2' }, - type: 'histogram', - options: { - column: 'estimated_people' - } - }, - subway_line_category: { // this injects a category filter at `a0` node output - 'source': { id: 'a0' }, - type: 'aggregation', - options: { - column: 'subway_line' - } - } - }, - // analysis - [ - { - id: 'a3', - // this will union the polygons, produce just one polygon, - // and calculate the total population for it - type: 'total-population', - params: { - columnName: 'total_population', - source: { - id: 'a2', - type: 'estimated-population', - params: { - columnName: 'estimated_people', - source: { - id: 'a1', - type: 'trade-area', - params: { - source: { - 'id': 'a0', - 'type': 'source', - 'params': { - query: 'select * from subway_stops' - } - }, - kind: 'walk', - time: 300 - } - } - } - } - } - } - ]) - }, - - { - skip: true, - desc: 'III. Point in polygon', - mapConfig: mapConfig( - // layers - [ - { - type: 'cartodb', - options: { - 'source': { id: 'a1' }, - 'cartocss': [ - '#count_in_polygon {', - ' polygon-opacity: 1.0', - ' line-color: #FFF;', - ' line-width: 0.5;', - ' line-opacity: 0.7', - ' polygon-fill: ramp([count_people], colorbrewer(Reds));', - '}' - ].join('\n'), - 'cartocss_version': '2.3.0' - } - } - ], - // dataviews - { - age_histogram: { - 'source': { id: 'a0' }, - type: 'histogram', - options: { - column: 'age' - } - }, - income_histogram: { - 'source': { id: 'a0' }, - type: 'histogram', - options: { - column: 'income' - } - }, - gender_category: { - 'source': { id: 'a0' }, - type: 'aggregation', - options: { - column: 'gender' - } - } - }, - // analysis - [ - { - 'id': 'a1', - 'type': 'count-in-polygon', - 'params': { - 'columnName': 'count_people', - 'pointsSource': { - 'id': 'a0', - 'type': 'source', - 'params': { - query: 'select the_geom, age, gender, income from people' - } - }, - 'polygonsSource': { - 'id': 'b0', - 'type': 'source', - 'params': { - query: 'select * from postal_codes' - } - } - } - } - ] - ) } - ]; useCases.forEach(function (useCase) {