Connecting specific features
Connecting Yandex Maps
DataLens features an embedded simple world map. However, to work with geolocation data in Russia and the CIS or use the Satellite and Hybrid map layers, you need integration with Yandex Maps.
Note
For geoanalytics use cases, see our demo dashboard.
Administrator tasks
Get an API key. Your organization must obtain an API key for the JavaScript API and Geocoding API. This is a commercial product subject to an individual agreement.
Activate the feature. There are two ways to do this:
-
Basic
To enable Maps, add two parameters during initialization:
./init.sh --yandex-map --yandex-map-token <your_Yandex_Maps_API_key> -
Advanced
Tip
Make sure the configuration in
values.yamlis complete.-
Configure
values.yaml.After you get the key, specify it in the DataLens configuration:
# In your `values.yaml` file features: yandex_map: enabled: true token: 'YOUR_YANDEX_MAPS_API_KEY' -
Applying the configuration.
Run
./init.sh --values <your_file>.yamlto apply the changes.After that, users will see an option to select Yandex Maps layers in their map settings.
-
Chart Editor
Note
Chart Editor is a sandbox tool for advanced users and developers, enabling visualizations beyond the standard types.
How it works:
-
Users write JavaScript code.
-
In their code, they can use third-party libraries for complex charts or Gravity UI Charts which DataLens uses internally.
For an example, see this article.
-
Data for visualization can come from a dataset or JSON API connector.
For an example, see this article.
Note
For real-world examples of using Chart Editor, see our Editor Demo Dashboard.
Administrator tasks
The administrator only has to enable the feature. There are two ways to do this:
-
Basic
You can enable Chart Editor by adding this parameter:
./init.sh --editor -
Advanced
Note
Make sure the configuration in
values.yamlis complete.1. Configure
values.yaml.After you get the key, specify it in the DataLens configuration: ```yaml # In your `values.yaml` file features: editor: enabled: true ```-
Applying the configuration.
Run
./init.sh --values <your_file>.yamlto apply your changes.After that, users will see a new chart type, Chart Editor, in their chart creation menu. Administrators do not need to write Chart Editor code; they simply need to provide their users with this feature.
-
Knowledge check
An analyst asks you to enable the Satellite layer in DataLens maps. To do this, which of the following is required?
-
Activate
features.editor.enabled: true -
Obtain a commercial Yandex Maps API key and configure it in
values.yaml -
Increase the replica count for the
data-apipod -
Create a connection to a database with geocoordinates
Find out the answer
-
Activate
features.editor.enabled: trueIncorrect. Chart Editor is a dedicated feature for custom visualizations, unrelated to Yandex Maps.
-
Obtain a commercial Yandex Maps API key and configure it in
values.yamlCorrect. The Satellite and Hybrid layers are provided under the commercial Yandex Maps API, for which you need a key.
-
Increase the replica count for the
data-apipodWrong. Map layer availability is unrelated to
data-apiperformance. -
Create a connection to a database with geocoordinates
Wrong. While you need geospatial data to render a chart with a map, it is not required to enable map layers in the UI.
Summary
Now you know how to enhance DataLens default capabilities by providing your users with access to Yandex Maps and Chart Editor. As an administrator, your job is to activate and configure the platform, so that analysts can create content.