Operations with datasets
After you uploaded your own datasets, you can manage them. The available functions depend on how you uploaded the data: as a file or via API.
You can combine all uploaded datasets into groups and moved datasets between them: see the Operations with dataset groups instruction.
For datasets uploaded as a file
In the Urbi Pro interface, you can manage only datasets that you uploaded as a file:
- rename a dataset
- add and edit a description of a dataset
- create a filter by territory and delete it
- configure a tooltip with data attributes
- delete a dataset (also available for datasets uploaded via API)
To work with a dataset, go to the Main tab and click All datasets or go to the Data tab.
Renaming a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Edit.
- Enter a new name of the dataset (not longer than 100 characters).
- Click Apply.
Editing a description of a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Edit.
- Fill in the Description field (not longer than 200 characters).
- Click Apply.
If the description is too long, only its abstract is displayed by default. Hover the cursor over the dataset card to see the full description:
Creating a filter by territory
If your uploaded data contains geometries of the polygon type, you can use them to create your own territorial division. This allows you to create new territory filters (geofilters) and filter any Urbi Pro data not only by standard territory types (regions, districts, settlements, and others) but also by your unique areas.
- Go to the Data tab.
- On the required dataset card, click icon and select Create a filter by territory.
Now when you filter data by territories, you can select the uploaded dataset from a list in the Geofilter settings box.
Deleting a filter by territory
- Go to the Data tab.
- On the required dataset card, click icon and select Remove a filter by territory.
- To confirm deleting, click Delete.
Configuring a tooltip with data attributes
After creating a layer with a data sample, when you hover the cursor over an item on the map, a tooltip with a short help about the item appears.
You can customize the list of data attributes that are displayed in the tooltip. By default, all layers created from this dataset use the tooltip settings. You can change the settings after creating the layer: see the documentation for the visualization methods.
The tooltip configuring is only available for layers with the Point, Buildings, Line, and Polygon visualization methods.
-
Go to the Data tab.
-
On the required dataset card, click icon and select Edit.
-
To display the attributes you specify in the tooltip, enable the Tooltip setup option.
If the option is disabled, the tooltip shows all data attributes from the dataset. The attributes are displayed in the order that was specified during uploading.
-
Set the list of attributes that will be displayed in the element tooltip. Select the required attributes and change their order if necessary. The available values depend on the data in the sample.
-
In the Tooltip field to the right of the attribute list, a preview of the tooltip on the map is shown. Check the tooltip display and click Apply.
Deleting a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Delete.
- To confirm deleting, click Delete.
For datasets uploaded via API
Via API, you can manage only datasets that you uploaded using API:
- upload a new portion of data to a dataset after creating it
- get dataset parameters
- change dataset parameters
- delete several objects from a dataset
- delete all objects from a dataset
You can delete a dataset uploaded via API only in Urbi Pro interface.
To send requests, use the data that you received when creating a dataset:
- Dataset ID (
assetId
). Also, you can copy the ID in Urbi Pro: go to the Data tab, on the required dataset card, click icon and select Copy ID. - Access token for authorization (
access_token
). Also, you can copy the token in Urbi Pro: click icon in the lower-left corner, go to the Tokens section and copy the value from the Token for dynamic datasets field.
Getting dataset parameters
Send a GET request to /dynamic_asset
and specify the dataset ID (assetId
parameter):
https://pro-api.2gis.ru/dynamic_asset/{assetId}
For more information about the response body, see the API Reference.
Changing dataset parameters
Important
If you add a new filter for an existing attribute, the filter only works for new data uploaded after the filter was added. Old data is not indexed. To index all data, you can add a new attribute together with a new filter.
-
Send a PUT request to
/dynamic_asset
:https://pro-api.2gis.ru/dynamic_asset
-
In the request body, pass the dataset ID (
assetId
parameter), dataset name, and other parameters that must be changed in the JSON format.For the full list of parameters, see the API Reference.
Deleting several objects from a dataset
-
Send a DELETE request to
/dynamic_asset
https://pro-api.2gis.ru/dynamic_asset/{assetId}/data
-
In the request body, pass the dataset ID (
assetId
parameter) and a list of object IDs in the JSON format.For more information, see the API Reference.
Deleting all objects from a dataset
Send a DELETE request to /dynamic_asset
and specify the dataset ID (assetId
parameter):
https://pro-api.2gis.ru/dynamic_asset/{assetId}/data/all
For more information, see the API Reference.
Deleting a dataset
- Go to the Data tab.
- On the required dataset card, click icon and select Delete.
- To confirm deleting, click Delete.
What's next?
- See available Operations with dataset groups.
- Quick start.
- Get to know how to work with Data visualization.
- Get to know more about Layers, Dashboards, and Widgets.
- Get to know prepared Analytics presets.