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

Add map visualization #1408

Closed
BeritJanssen opened this issue Feb 1, 2024 · 8 comments
Closed

Add map visualization #1408

BeritJanssen opened this issue Feb 1, 2024 · 8 comments
Assignees
Labels
enhancement improvements to user functionality needs-mockup this suggestion could use a picture before it is implemented

Comments

@BeritJanssen
Copy link
Contributor

Is your feature request related to a problem? Please describe.
If a corpus has geographical metadata, we would like to visualize this on a map.

Describe the solution you'd like
Perhaps this ChartJS plugin is interesting

Describe alternatives you've considered
Other geo visualization libraries exist, e.g. maplibre (cf. in this repo

@BeritJanssen BeritJanssen added the enhancement improvements to user functionality label Feb 1, 2024
@lukavdplas
Copy link
Contributor

lukavdplas commented Feb 5, 2024

Can we add more information to this issue?

Things like:

  • What question is the map supposed to answer?
  • Where should it be displayed?
  • I think the displayed data is the content of geo_point fields, correct?
  • What other geographical information should be visible, if any?

@ar-jan
Copy link
Contributor

ar-jan commented Feb 7, 2024

Having just been briefed by Berit, this is my understanding:

  • The map should display the recorded locations of records returned in a search result.
  • It can/should be added as a visualization.
  • The map should not display modern features like borders, but (presumably) some natural features (elevation, landcover, rivers, etc.).

@lukavdplas lukavdplas added the needs-mockup this suggestion could use a picture before it is implemented label Feb 16, 2024
@lukavdplas
Copy link
Contributor

Some thoughts:

  • I already mentioned this in our last meeting, but for the record: if we intend to work on Analysis plugins #1427 in the future and roughly follow the implementation suggested there (both are big ifs), it would be a good idea to build new visualisations with the following principles:
    • Use a visualisation library with declarative syntax, such as Plotly or Vega. Both of those have some support for maps, but I'm not sure if they would meet our needs.
    • Try to implement functionality in the backend rather than the frontend. Centre the visualisation around a backend endpoint that essentially takes the query and some additional parameters and returns the result - rather than using the frontend to construct aggregation queries that the backend merely forwards to elasticsearch.
  • For the frontend component, Results is a useful base class for fetching data based on a query, but it hasn't yet been implemented in other visualisations (Use Results class for visualisations #1468 ).
  • I added a "needs mockup" label to the issue because it's the kind of thing that could benefit from creating a picture before you get into the nitty gritty, but I'm not involved in this project, so it's up to you.

@ar-jan
Copy link
Contributor

ar-jan commented Mar 28, 2024

The initial map component has been merged into develop, but the actual map visualization is still to be implemented (probably requires Angular to be updated).

@ar-jan
Copy link
Contributor

ar-jan commented May 1, 2024

#1549 works with ngx-maplibre-gl, but it's worth checking if the features we need are supported by Vega or Plotly.

Vega-Lite (and therefore Vega-Altair which produces Vega-Lite) does not yet support zoomable maps.

If we do want to use maplibre, we need to add a different base layer (include local assets, or use a service?) and fix the tests.

@lukavdplas
Copy link
Contributor

lukavdplas commented May 1, 2024

In case it's useful: I've pushed my local branch experiment/vega - I created that a few months ago as an experiment. It includes a component that request a vega (or vega-lite) JSON and renders the visualisation.

The branch is quite outdated, but it may save some time?

@lukavdplas
Copy link
Contributor

@ar-jan I think this is done, right?

@ar-jan
Copy link
Contributor

ar-jan commented Dec 12, 2024

Right! #1629.

@ar-jan ar-jan closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to user functionality needs-mockup this suggestion could use a picture before it is implemented
Projects
None yet
Development

No branches or pull requests

3 participants