Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds maps documentation #2376

Merged
merged 13 commits into from
Jan 17, 2023
Merged

Adds maps documentation #2376

merged 13 commits into from
Jan 17, 2023

Conversation

kolchfa-aws
Copy link
Collaborator

Fixes #897

Checklist

  • [x ] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws kolchfa-aws requested a review from a team as a code owner January 11, 2023 16:59
@kolchfa-aws kolchfa-aws self-assigned this Jan 11, 2023
Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws kolchfa-aws added 3 - Tech review PR: Tech review in progress v2.5.0 'Issues and PRs related to version v2.5.0' labels Jan 11, 2023

To get started, perform the following steps:

1. On the top menu bar, go to **OpenSearch Dashboards > Maps**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It now changed the place to under Plugins. opensearch-project/dashboards-maps#196


# Maps

With OpenSearch Dashboards, you can create maps to visualize your geographical data. OpenSearch lets you construct map visualizations with multiple layers, combining data across different indexes. You can build each layer from a different data source either directly or using simple or ML-powered aggregations. Additionally, you can configure maps to show specific data at different zoom levels. OpenSearch maps are powered by the OpenSearch maps service, which uses vector tiles to render maps.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is ML-powered aggregations?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VijayanB The feature review doc had "ML-enabled aggregations". Is that a better term? Or is it not applicable altogether?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Signed-off-by: Fanit Kolchina <[email protected]>
You can add either **data layers** or **reference layers** to the map:
- **Data layers** let you visualize data from various data sources.

- **Reference layers** serve as basemaps. To use your own or a third-party map as a basemap, [add it as a **Custom map**](#adding-a-custom-map).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We renamed it to "Base layer"


1. In the **Custom type** dropdown, select **Tile Map Service (TMS)**.
1. Enter the TMS URL.
1. (Optional) In **TMS attribution**, enter a TMS attribution for the basemap. For example, if you're using Maptiler, enter `Maptiler`. The name `Maptiler` will be displayed in the lower-right corner of the map.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to give Maptiler as an example, we can use something else "custom-map"


To change the default map settings, select **Default map** in the **Layers** panel. Under **Layer settings**, you can change the layer name and description and configure zoom levels and opacity for your layer:

- **Zoom levels**: If you want to make a layer visible only on a certain range of zoom levels, you can specify the zoom levels for this layer either by entering them in the text boxes or by sliding the range slider to the desired values.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we call out like, by default layer is visible in all zoom levels, you can update this range if you want otherwise.


## Adding a document layer

Adding document layers lets you visualize your data. You can use a single index or multiple indexes as a data source for a visualization.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We support one index pattern per document layer. Users can create multiple layers if they want to view multiple index pattern. I am not sure whether "You can use a single index or multiple indexes as a data source for a visualization." means same.


Adding document layers lets you visualize your data. You can use a single index or multiple indexes as a data source for a visualization.

OpenSearch supports displaying documents that contain both geopoint and geoshape fields on a map.
Copy link
Member

@VijayanB VijayanB Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
OpenSearch supports displaying documents that contain both geopoint and geoshape fields on a map.
Document layer supports displaying documents that contain both geo_point and geo_shape fields on a map.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the suggestion read "The document layer..."?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded.

OpenSearch supports displaying documents that contain both geopoint and geoshape fields on a map.
{: .note}

The following example assumes that you have the `opensearch_dashboards_sample_data_flights` dataset installed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not, do we have a link on how to install this sample dataset?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added steps in this document


1. In the **Layers** panel, select the **Add layer** button.
1. From the **Add layer** dialog, select **Data layer > Documents**.
1. In **Data source**, select `opensearch_dashboards_sample_data_flights`. Alternatively, you can enter another index name or index pattern to visualize.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. In **Data source**, select `opensearch_dashboards_sample_data_flights`. Alternatively, you can enter another index name or index pattern to visualize.
1. In **Data source**, select `opensearch_dashboards_sample_data_flights`. Alternatively, you can enter another index pattern to visualize.

1. In the **Layers** panel, select the **Add layer** button.
1. From the **Add layer** dialog, select **Data layer > Documents**.
1. In **Data source**, select `opensearch_dashboards_sample_data_flights`. Alternatively, you can enter another index name or index pattern to visualize.
1. In **Geospatial field**, select a data field to be displayed in the visualization. In this example, select `DestLocation`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. In **Geospatial field**, select a data field to be displayed in the visualization. In this example, select `DestLocation`.
1. In **Geospatial field**, select a geospatial field (geo_point or geo_shape) to be displayed in the visualization. In this example, select `DestLocation`.


## Using tooltips to visualize additional data

The map layers show geopoint and geoshape document fields as locations on the map. To add more information to the locations, you can use tooltips. For example, you may want to to show flight delay, destination weather, and destination country in the Flight destination layer. Perform the following steps to configure tooltips to show additional data:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The map layers show geopoint and geoshape document fields as locations on the map. To add more information to the locations, you can use tooltips. For example, you may want to to show flight delay, destination weather, and destination country in the Flight destination layer. Perform the following steps to configure tooltips to show additional data:
The Document layer show geo_point and geo_shape document fields as locations on the map. To add more information to the locations, you can use tooltips. For example, you may want to to show flight delay, destination weather, and destination country in the Flight destination layer. Perform the following steps to configure tooltips to show additional data:

@hdhalter hdhalter added the release-notes PR: Include this PR in the automated release notes label Jan 11, 2023
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Copy link
Contributor

@vagimeli vagimeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; minimal comments

_dashboards/maps.md Show resolved Hide resolved
_dashboards/maps.md Show resolved Hide resolved
_dashboards/maps.md Outdated Show resolved Hide resolved
_dashboards/maps.md Outdated Show resolved Hide resolved

Adding document layers lets you visualize your data. You can use a single index or multiple indexes as a data source for a visualization.

OpenSearch supports displaying documents that contain both geopoint and geoshape fields on a map.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the suggestion read "The document layer..."?

1. In the **Layers** panel, select the **Add layer** button.
1. From the **Add layer** dialog, select **Data layer > Documents**.
1. In **Data source**, select `opensearch_dashboards_sample_data_flights`. Alternatively, you can enter another index pattern to visualize.
1. In **Geospatial field**, select a geospatial field (geopoint or geoshape) to be displayed in the visualization. In this example, select `DestLocation`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the fields need to be written the same as in the line 65 suggestion, if change is accepted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll discuss with @natebower whether to use underscores in the field names.


## Filtering data

To show a subset of the data in the index, filter the data. The following example filters the Flight destination data to see only United States destinations:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase "Flight" or capitalize it in line 87. Is the term referring the to proper name Flight destination?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think lowercase works here. The name of the layer is Flight destination, but here I can refer to the generic concept.


## Using tooltips to visualize additional data

Document layers show geopoint and geoshape document fields as locations on the map. To add more information to the locations, you can use tooltips. For example, you may want to to show flight delay, destination weather, and destination country in the Flight destination layer. Perform the following steps to configure tooltips to show additional data:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirm geopoint and geoshape spelling is consistent throughout. Confirm "Flight destination" spelling is consistent throughout.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a conversation with @natebower, we're going with geopoint and geoshape since it is the simplest option that is easiest to use in multiple contexts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this line, I am referring to the layer name, and the layer name was capitalized, so Flight destination has correct capitalization here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to bold the name of the layer so that it's clear that it's not just a capitalization error? If yes, apply globally. Also, it looks like either "data" or "information" should follow "country".

1. In the **Layers** panel, select **Flight destination**.
1. Select **Tooltips**.
1. Select the **Show tooltips** checkbox.
1. In the **Tooltip fields** dropdown, select the fields that you'd like to display. In this example, select `FlightDelay`, `DestWeather`, and `DestCountry`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "dropdown" to "dropdown list" (per TERMS.md)

Signed-off-by: Fanit Kolchina <[email protected]>
Copy link

@JeffHuss JeffHuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM nice work!

Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kolchfa-aws Please see my comments and changes and let me know if you have any questions. Thanks!


To change the default map settings, select **Default map** in the **Layers** panel. Under **Layer settings**, you can change the layer name and description and configure zoom levels and opacity for your layer:

- **Zoom levels**: By default, a layer is visible at all zoom levels. If you want to make a layer visible only on a certain range of zoom levels, you can specify the zoom levels either by entering them in the text boxes or by sliding the range slider to the desired values.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"only for a certain range"?


1. In the **Custom type** dropdown list, select **Tile Map Service (TMS)**.
1. Enter the TMS URL.
1. (Optional) In **TMS attribution**, enter a TMS attribution for the basemap. For example, if you're using a custom basemap, you can add its name to display in the lower-right corner of the map.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A word should follow "display". "display it"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded

1. (Optional) In **TMS attribution**, enter a TMS attribution for the basemap. For example, if you're using a custom basemap, you can add its name to display in the lower-right corner of the map.
1. Select the **Settings** tab to edit the layer settings.
1. Enter the layer name in **Name**.
1. (Optional) Enter layer description in **Description**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. (Optional) Enter layer description in **Description**.
1. (Optional) Enter the layer description in **Description**.

1. Select the **Settings** tab to edit layer settings.
1. Enter `Flight destination` in **Name**.
1. Select the **Update** button.
1. To see more data, in the upper-right corner select the calendar icon dropdown list, then under **Quick select** choose **Last 15 days**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. To see more data, in the upper-right corner select the calendar icon dropdown list, then under **Quick select** choose **Last 15 days**.
1. To see more data, in the upper-right corner, select the calendar icon dropdown list. Then under **Quick select**, choose **Last 15 days**.

1. Select the **Update** button.
1. To see more data, in the upper-right corner select the calendar icon dropdown list, then under **Quick select** choose **Last 15 days**.

You should see the flight destination data similar to the following image:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You should see the flight destination data similar to the following image:
You should see the flight destination data, as in the following image.


## Refreshing data for a real-time dataset

If you want to visualize a real-time dataset, after adding layers to the map use the following steps to set the refresh interval:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to visualize a real-time dataset, after adding layers to the map use the following steps to set the refresh interval:
If you want to visualize a real-time dataset, after adding layers to the map, perform the following steps to set the refresh interval:


## Saving a map

To save a map with all layers that you set up, perform the following steps:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either "all the layers" or "every layer".


To save a map with all layers that you set up, perform the following steps:

1. Select the **Save** button in the upper-right corner. This brings up the **Save map** dialog.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not use the phrasal verb "brings up". How about something like "The Save map dialog appears."?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded.

To save a map with all layers that you set up, perform the following steps:

1. Select the **Save** button in the upper-right corner. This brings up the **Save map** dialog.
1. In the **Title** textbox, enter the map name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. In the **Title** textbox, enter the map name.
1. In the **Title** text box, enter the map name.


1. Select the **Save** button in the upper-right corner. This brings up the **Save map** dialog.
1. In the **Title** textbox, enter the map name.
1. (Optional) In the **Description** textbox, enter map description.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. (Optional) In the **Description** textbox, enter map description.
1. (Optional) In the **Description** text box, enter the map description.

Signed-off-by: Fanit Kolchina <[email protected]>
@hdhalter hdhalter added 6 - Done but waiting to merge PR: The work is done and ready to merge and removed 3 - Tech review PR: Tech review in progress labels Jan 13, 2023
@VijayanB
Copy link
Member

LGTM. Please retake snapshot since some of them are outdated. Thanks.

Signed-off-by: Fanit Kolchina <[email protected]>
@kolchfa-aws kolchfa-aws merged commit 4760827 into main Jan 17, 2023
vagimeli pushed a commit that referenced this pull request Jan 25, 2023
* Adds maps documentation

Signed-off-by: Fanit Kolchina <[email protected]>

* Rewrites

Signed-off-by: Fanit Kolchina <[email protected]>

* Changed entry point for maps

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated tech review comments

Signed-off-by: Fanit Kolchina <[email protected]>

* More tech review comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Adds steps to install sample data

Signed-off-by: Fanit Kolchina <[email protected]>

* Minor edit

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated doc review comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Incorporated editorial comments

Signed-off-by: Fanit Kolchina <[email protected]>

* Updated the add layer dialog

Signed-off-by: Fanit Kolchina <[email protected]>

* Simplified adding sample dataset

Signed-off-by: Fanit Kolchina <[email protected]>

* Minor change

Signed-off-by: Fanit Kolchina <[email protected]>

* Added new images

Signed-off-by: Fanit Kolchina <[email protected]>

Signed-off-by: Fanit Kolchina <[email protected]>
vagimeli added a commit that referenced this pull request Jan 26, 2023
@Naarcha-AWS Naarcha-AWS deleted the Fix897-maps branch March 28, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6 - Done but waiting to merge PR: The work is done and ready to merge release-notes PR: Include this PR in the automated release notes v2.5.0 'Issues and PRs related to version v2.5.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] New OpenSearch Maps
7 participants