View is a visualization of certain theme using a set of related indicators and groups of objects (markers or areas) displayed on a map. View also contains the definition of filters.
...
Code Block |
---|
{ "name": "catchment_area_view", "type": "view", "title": "Catchment Area Analysis", "description": "Identify areas with the biggest and smallest shares of your customers. Find out what turnover these customers generate. Evaluate store rankings and identify the pick-up partners used by customers from different regions. You can also compare the catchment areas for two different stores.", "content": { "icon": "performance_method", "order": 1, "dashboard": "/rest/projects/$projectId/md/dashboards?name=catchment_area_dashboard", "markerSelector": "/rest/projects/$projectId/md/markerSelectors?name=shops_marker_selector", "defaultGranularity": "/rest/projects/$projectId/md/datasets?name=ward", "defaultVisualized": "/rest/projects/$projectId/md/indicators?name=turnover_indicator", "filterGroup": [ { "type": "indicator", "indicator": "/rest/projects/$projectId/md/indicators?name=turnover_indicator" }, { "type": "indicator", "indicator": "/rest/projects/$projectId/md/indicators?name=customers_indicator" }, { "type": "indicator", "indicator": "/rest/projects/$projectId/md/indicators?name=purchases_customer_indicator" }, { "type": "globalDate", "property": "baskets.date_iso" }, { "type": "histogram", "property": "baskets.amount", "format": { "type": "number", "fraction": 0, "symbol": "£" } }, { "type": "multiSelect", "property": "baskets.on_off_name", "orderBy": [ { "property": "baskets.on_off_name", "direction": "asc" } ] }, { "type": "multiSelect", "property": "baskets.courier", "orderBy": [ { "property": "baskets.courier", "direction": "asc" } ] }, { "type": "multiSelect", "property": "clients.sex_name", "orderBy": [ { "property": "clients.sex_name", "direction": "asc" } ] }, { "type": "multiSelect", "property": "clients.age_name", "orderBy": [ { "property": "clients.age_cat", "direction": "asc" } ] }, { "type": "multiSelect", "property": "dim_dates_day_of_week.day_of_week_name_en", "orderBy": [ { "property": "dim_dates_day_of_week.order_en", "direction": "asc" } ] } ], "defaultActiveFilters": [ { "type": "globalDate", "property": "baskets.date_iso", "defaultValues": { "startDate": { "value": "2018-07-02" }, "endDate": { "value": "2018-07-08" } } } ], "mapOptions": { "center": { "lat": 52.478, "lng": -1.694 }, "zoom": 11, "minZoom": 2, "maxZoom": 18, "tileLayer": "mapbox" }, "mapContextMenu": { "items": [ { "type": "googleSatellite" }, { "type": "googleStreetView" } ] }, "exports": [ { "export": "/rest/projects/$projectId/md/exports?name=grid_export" }, { "export": "/rest/projects/$projectId/md/exports?name=customer_ids_export" }, { "export": "/rest/projects/$projectId/md/exports?name=transaction_ids_export" }, { "export": "/rest/projects/$projectId/md/exports?name=administrative_units_export" } ], "excludeDatasets": [ "gb2_district", "gb2_ward", "gb2_postcodes_dwh", "gb2_msoas_dwh", "gb2_lsoas_dwh" ] } } |
...
Code Block |
---|
{ "url": "/rest/projects/yufqzxkbiecj7jot/md/views/ktpu83s6lcmnks2c", "dumpTime": "2019-02-20T13:11:13Z", "version": "23", "content": { "name": "catchment_area_view", "type": "view", "title": "Catchment Area Analysis", "description": "Identify areas with the biggest and smallest shares of your customers. Find out what turnover these customers generate. Evaluate store rankings and identify the pick-up partners used by customers from different regions. You can also compare the catchment areas for two different stores.", "content": { "icon": "performance_method", "order": 1, "dashboard": "/rest/projects/$projectId/md/dashboards?name=catchment_area_dashboard", "markerSelector": "/rest/projects/$projectId/md/markerSelectors?name=shops_marker_selector", "defaultGranularity": "/rest/projects/$projectId/md/datasets?name=ward", "defaultVisualized": "/rest/projects/$projectId/md/indicators?name=turnover_indicator", "filterGroup": [ { "type": "indicator", "indicator": "/rest/projects/$projectId/md/indicators?name=turnover_indicator" }, { "type": "indicator", "indicator": "/rest/projects/$projectId/md/indicators?name=customers_indicator" }, { "type": "indicator", "indicator": "/rest/projects/$projectId/md/indicators?name=purchases_customer_indicator" }, { "type": "globalDate", "property": "baskets.date_iso" }, { "type": "histogram", "property": "baskets.amount", "format": { "type": "number", "fraction": 0, "symbol": "£" } }, { "type": "multiSelect", "property": "baskets.on_off_name", "orderBy": [ { "property": "baskets.on_off_name", "direction": "asc" } ] }, { "type": "multiSelect", "property": "baskets.courier", "orderBy": [ { "property": "baskets.courier", "direction": "asc" } ] }, { "type": "multiSelect", "property": "clients.sex_name", "orderBy": [ { "property": "clients.sex_name", "direction": "asc" } ] }, { "type": "multiSelect", "property": "clients.age_name", "orderBy": [ { "property": "clients.age_cat", "direction": "asc" } ] }, { "type": "multiSelect", "property": "dim_dates_day_of_week.day_of_week_name_en", "orderBy": [ { "property": "dim_dates_day_of_week.order_en", "direction": "asc" } ] } ], "defaultActiveFilters": [ { "type": "globalDate", "property": "baskets.date_iso", "defaultValues": { "startDate": { "value": "2018-07-02" }, "endDate": { "value": "2018-07-08" } } } ], "mapOptions": { "center": { "lat": 52.478, "lng": -1.694 }, "zoom": 11, "minZoom": 2, "maxZoom": 18, "tileLayer": "mapbox" }, "mapContextMenu": { "items": [ { "type": "googleSatellite" }, { "type": "googleStreetView" } ] }, "exports": [ { "export": "/rest/projects/$projectId/md/exports?name=grid_export" }, { "export": "/rest/projects/$projectId/md/exports?name=customer_ids_export" }, { "export": "/rest/projects/$projectId/md/exports?name=transaction_ids_export" }, { "export": "/rest/projects/$projectId/md/exports?name=administrative_units_export" } ], "excludeDatasets": [ "gb2_district", "gb2_ward", "gb2_postcodes_dwh", "gb2_msoas_dwh", "gb2_lsoas_dwh" ] } } } |
...
Info |
---|
To configure |
Key description
content
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| identifier of the view icon as shown on the project page see the available icons below |
|
order
integer
Status | ||||
---|---|---|---|---|
|
specifies the order of the view on the Project page
secondary ordering is by title
, alphabetically
| string |
| URL link to the dashboard, which the view contains |
| ||||||
| string |
| URL link to the marker selector, which the view contains |
| ||||||
| boolean |
| enables the marker only view (see the tutorial) default = |
| ||||||
| boolean |
| enables feature attributes visibility after clicking on a indicator drill |
| ||||||
| string |
| URL link to the dataset, which will be the selected as the default granularity level when entering the view |
| ||||||
| string |
| URL link to the indicator, which will be the visualised by default when entering the view |
| ||||||
| string |
| specifies default visualization selected when entering the view |
| ||||||
| string |
| URL link to the indicator, which will be the drilled down to by default when entering the view |
| ||||||
| string |
| specify a tool which will be active by default when entering the view search = , filter = , visibility =, measure = |
| ||||||
| string |
| specifies default compare type selected when using compare |
| ||||||
| array |
| array of available filters applicable to the indicators presented in this view, these filters must not contain | |||||||
| array |
| array of active filters applied to the indicators presented in this view, these filters must contain | |||||||
| array |
| array of | |||||||
| object |
| default spatial query settings (used in heatmap visualization) | x => 1 | ||||||
| integer |
| specifies the number of indicator fitness segments this setting's scope is view, so it will affect all indicators in the view |
| ||||||
| object |
| map window settings on the project page | |||||||
| object |
| array of objects with definition of 3rd party services available on mouse context click | |||||||
| object |
| array of export references which allows you to define exports per view | |||||||
| object |
| measure tool settings | |||||||
| object |
| specify objects selected by default when entering the view | |||||||
| array |
| array of dataset names (not links) to be excluded from the granularity dropdown menu |
content.filterGroup.indicator
...
Default values can be set in the defaultValues
object. And since indicator filters can have different results on different granularities, default granularity
can be set as well.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
| string |
| URL link to an indicator object, whose value will be filtered |
| ||||||
| object | VARIES | object containing default values for the filter See Views#Example of a indicator filter with defaultValues set forbidden when the filter is within required when the filter is within | |||||||
| boolean |
| determines if the filter should be applied also when a marker is selected ( default = |
|
content.defaultActiveFilters.indicator.defaultValues
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| decimal |
| array of two decimals - maximum and minimum value of the filter |
| ||||||
| string |
| URL link to a dataset object, which will be the default granularity option |
|
content.filterGroup.globalDate
...
Can be set by the date picker in the top left corner of the map window.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
| object |
| identifier of a dataset property, which will be filtered by date e.g.: |
| ||||||
| object | VARIES | object containing default values for the date range filter See Views#Example of a globalDate filter with defaultValues set forbidden when the filter is within required when the filter is within |
content.filterGroup.date
content.defaultActiveFilters.date
Allows to set from-to filter for multiple date attributes (year, month, week, day, hour...). It has identical syntax with the globalDate
filter.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
| object |
| identifier of a dataset property, which will be filtered by date |
| ||||||
| object | VARIES | object containing default values for the date range filter See Views#Example of a date filter with defaultValues set forbidden when the filter is within required when the filter is within |
content.defaultActiveFilters.globalDate.defaultValues
content.defaultActiveFilters.date.defaultValues
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| object |
| an object containing either | |||||||
| object |
| an object containing either |
content.defaultActiveFilters.globalDate.defaultValues.startDate
...
content.defaultActiveFilters.date.defaultValues.endDate
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| given value in the ISO 8601 format |
| ||||||
| object |
| a function object defining an interval of a relative date filter |
Relative date filters
Relative date filters allow you to create filters with sliding date values, like last week, previous month or the first 90 days of a year.
...
function_today
- always returns today's datefunction_date_trunc
- truncates a date to a beginning of an interval (= first day of a week, month, etc.)supported intervals:
day
,week
,month
,quarter
,year
function_interval
- generates a date interval, which can later be added or subtracted from a date
Date range | Definition syntax |
---|---|
the day before 30 days |
|
the beginning of the current week |
|
the beginning of last week |
|
the day before two months |
|
the ending of the last month |
|
By combining these functions into startDate
and endDate
, you are able to create the desired intervals. Let's have a look at an example:
...
Histogram filter allows you to filter the integer, bigint and decimal values.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
| object |
| identifier of a dataset property, which the filter will be applied to |
| ||||||
| object |
| specifies the formatting of the histogram values | |||||||
| object | VARIES | object containing default values for the histogram filter See Views#Example of a histogram filter with defaultValues set forbidden when the filter is within required when the filter is within |
content.defaultActiveFilters.histogram.defaultValues
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| array |
| array of two integers - upper and lower default value |
| ||||||
| boolean |
| specifies if null values should be filtered or not default = false (null values are present) |
|
content.filterGroup.multiSelect
...
When there is more than 10 items, a search bar is added. The maximum count of filterable records is 20 000.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
| object |
| identifier of a dataset property, which the filter will be applied to |
| ||||||
| object |
| specifies how to order the multiselect list | |||||||
| object | VARIES | object containing default values for the multi select filter See Views#Example of a multiSelect filter with defaultValues set forbidden when the filter is within required when the filter is within |
content.filterGroup.multiSelect.orderBy
...
Specifies the ordering of elements in a multiSelect
filter.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| identifier of a dataset property, by which the list will be ordered |
| ||||||
| string |
| sort direction default = |
|
content.defaultActiveFilters.multiSelect.defaultValues
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| array |
| array of at least one string value(s), that will be set as default(s) |
|
content.filterGroup.singleSelect
...
Please note that having this filter in a view makes it active all the time. If no defaultValues.value
is specified, the first property is selected.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
| object |
| identifier of a dataset property, which the filter will be applied to |
| ||||||
| object |
| specifies how to order the singleselect list | |||||||
| object | VARIES | object containing default values for the single select filter See Views#Example of a singleSelect filter with defaultValues set forbidden when the filter is within required when the filter is within |
content.defaultActiveFilters.singleSelect.defaultValues
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| string value, that will be set as default |
|
content.filterGroup.feature
...
Allows you to set selected objects in the map (markers, areas, polygons, lines...).
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
| string |
| link to a dataset whose features will be filtered |
| ||||||
| object | VARIES | object containing default string values for the feature filter See Views#Example of a feature filter with defaultValues set forbidden when the filter is within required when the filter is within |
|
content.variables.variables
Allows you to set unique variables which are used in metrics. See the syntax example of the filter above.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type identifier, always |
| ||||||
title | string |
| title of the variables filter |
| ||||||
| array |
| array of the |
|
content.variables.variables.variable
Each variable is uniquely identified by it's name
. This name then must be used in a metric objects, which is located
Ke | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| name of the variable must match the name of variable used in metrics |
| ||||||
| string |
| human-readable title of the variable |
| ||||||
| decimal |
| minimum value of the variable | |||||||
| decimal |
| maximum value of the variable | |||||||
| decimal |
| default value of the variable | |||||||
| object |
| specifies the formatting of the variables values |
content.spatialQuery
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| profile of the spatial query |
| ||||||
| string |
| unit of the spatial query |
| ||||||
| integer |
| the size of the query (in meters or minutes, according to |
|
content.mapOptions
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| object |
| center of the map window when entering the view | |||||||
| integer |
| sets ideal zoom level |
| ||||||
| integer |
| sets the minimum zoom level |
| ||||||
| integer |
| sets the maximum zoom level |
| ||||||
| boolean |
| display or hide the base map layer menu default = |
| ||||||
| string |
| base map layer identifier |
|
content.mapOptions.center
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| decimal |
| decimal value of the latitude |
| ||||||
| decimal |
| decimal value of the longitue |
|
content.mapContextMenu
The mapContextMenu
object allows you to define the content of context menu after using right click in the map.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| array |
| array of map context menu items |
content.mapContextMenu.items
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type of the clickable item choose one of the provided services by Google, Mapy.cz or ČÚZK |
|
content.exports
Allows you to define list of export objects which will be available after using the Export function available from the Menu ().
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| link to an export which will be available in the view |
|
content.measure
This object allows you to set the settings of measure tool. The settings is available for line
and isoline
measure.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| type of the measure |
| ||||||
| array |
| array of points for either |
| ||||||
| array |
| array of zones for either |
|
content.measure.points
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| decimal |
| decimal value of the point's latitude |
| ||||||
| decimal |
| decimal value of the point's longitude |
|
content.measure.zones
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| decimal |
| decimal value of the point's latitude |
| ||||||
| decimal |
| decimal value of the point's longitude |
| ||||||
| string |
| profile of the isochrone |
| ||||||
| string |
| unit of the isochrone |
| ||||||
| integer |
| amount of units of the isochrone |
|
content.defaultSelected
Specifies selected objects and selected coordinates when entering the view.
Key | Type | Optionality | Description | Constraints | ||||||
---|---|---|---|---|---|---|---|---|---|---|
| string |
| link to a dataset whose features will be filtered |
| ||||||
| array |
| array of object ids which will be selected | |||||||
| array |
| array of objects with "lat" and "lng" |
|
Visual representation
View icons
This is the available view icon palette.
atm_cash_machine | catchment_area | city_buildings | credit_cards | customer_intelligence | diagram_chart | fast_delivery | first_place_pedestal | hourglass_sandclock | location_mark |
market_potential | market_trends | market_vision | optimism_and_happiness | packaging_box | performance_method | rent_a_house | road_route | shopping_cart | tactical_advantage |
venture_capital | wealth_accumulation | workgroup_people |
Views displayed on the project page
...
Map base layers
|
|
|
|
|
|
globalDate
filter type
in default state | with set values |
indicator
filter type
in default state | with set values |
date
filter type
in default state | with set values |
histogram
filter type
in default state | with set values |
multiSelect
filter type
in default state | with set values |
multiSelect
filter type
in default state | with set values |
variables
filter type
in default state | with set values |
feature
filter type
in default state | with set values |