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

👤 [User Story]: Develop & visualise uncertainty measure for polity borders + disputed borders #20

Closed
5 of 24 tasks
edwardchalstrey1 opened this issue Jul 8, 2024 · 6 comments
Labels
wontfix This will not be worked on

Comments

@edwardchalstrey1
Copy link

edwardchalstrey1 commented Jul 8, 2024

Role

As a researcher,

Desired Feature

I want to be able to see an uncertainty measure for polity borders,

Benefit

So that I can avoid interpreting polity shape boundaries as hard historical borders and understand the historical data more accurately.

Acceptance Criteria

GIVEN the VideoShapefile table contains uncertainty measures
WHEN a researcher views the world map and polity maps
THEN the uncertainty should be visually represented using varying line styles, shades, or colours that indicate different levels of uncertainty.

GIVEN the presence of disputed borders
WHEN a researcher views these borders on the maps
THEN disputed borders should be visually distinguished using visual cues such as dashed lines or different colours to indicate regions under dispute.

GIVEN the new visual features for uncertainty and disputed borders
WHEN a researcher interacts with the maps
THEN the maps should provide tooltips or legends explaining the visual cues (e.g., what different line styles or colours represent).

GIVEN the addition of uncertainty and disputed borders information
WHEN the data is displayed
THEN it should be accurate, up-to-date, and reflect the latest historical research.

GIVEN the enhanced visual representation
WHEN a researcher uses the feature
THEN the maps should load efficiently without performance degradation, ensuring a smooth user experience.

Dependencies

  • Confirm availability and format of data around uncertainty and disputed borders.
  • Update procedures/documentation to include adding uncertainty measures.

Technical Notes

  • Add a new column to the VideoShapefile table to store the uncertainty measure.
  • Ensure the column can store a range of values representing different levels of uncertainty.
  • Update data models to include the uncertainty measure.
  • Modify data processing scripts to handle the new uncertainty data.
  • Implement logic to vary line styles, shades, or colours based on the uncertainty measure.
  • Add representation for disputed borders, possibly using dashed lines or unique colors.
  • Visually represent disputed borders (see Visualise shape disputes & represent shape uncertainty edwardchalstrey1/seshat#46) this could be difficult as this information is not encoded in Cliopatria
  • Write unit tests for the new backend functionality.
  • Write integration tests to ensure correct data flow from the database to the frontend.
  • Perform end-to-end tests to validate the visual representation on the maps.

Definition of Done

  • The feature fulfills all acceptance criteria.
  • The code is reviewed and meets team coding standards.
  • All unit, integration, and end-to-end tests are passed.
  • The feature meets accessibility standards set for the project.
  • The code passes the CI/CD pipeline quality controls (style and linting).
  • The feature is merged into the main branch.
  • The feature is deployed and functional in the QA environment.
  • The feature was demonstrated to the team and accepted by the product owner.

Progress

Started working on this in #43

Remaining TODOs:

  • Should the confidence value be an editable field, or should it be determined by the "amount" of evidence for a shape?
    • If so, connect the confidence up to an edit field on the Polity page
    • Make the Shape ID field on the edit page a dropdown with the Shape IDs linked to this polity?
  • Could add a "hard borders" checkbox that reverts to no blurring
  • Include a disclaimer that explains the blurring choice based on the confidence
    • We can think of this as being like the measure used by historical basemaps:
      • BORDERPRECISION : ordinal values 1 (approximate), 2 (moderately precise) and 3 (determined by international

  • 🐛 [BUG] - "Show Confidence Scores" button error #45
@edwardchalstrey1 edwardchalstrey1 self-assigned this Jul 11, 2024
@edwardchalstrey1 edwardchalstrey1 changed the title 👤 [User Story]: Develop & visualise uncertainty measure for polity borders 👤 [User Story]: Develop & visualise uncertainty measure for polity borders + disputed borders Jul 11, 2024
@kallewesterling
Copy link
Member

@edwardchalstrey1 I updated this user story with some details -- make sure it reflects the original issue!

@edwardchalstrey1
Copy link
Author

edwardchalstrey1 commented Jul 15, 2024

Possibly: Store the spatial data in the linked past format which may help with this: https://github.com/LinkedPasts/linked-places-format

@edwardchalstrey1
Copy link
Author

It's an open question over whether this should be handled on the Seshat side or the Cliopatria side, but it could be both. Perhaps the key thing here is to initially have a proxy measure such as year and to visualise it, then to allow for the measure itself to be an editable value

@edwardchalstrey1
Copy link
Author

One idea: % coded of variables

@edwardchalstrey1
Copy link
Author

We can follow a similar approach (and disclaimers) as was done here: https://github.com/aourednik/historical-basemaps?tab=readme-ov-file#conceptual-limitations-and-disputed-territories

@edwardchalstrey1
Copy link
Author

Seshat meeting 14th August 2024

For now, we probably won't want to pursue this feature, since it's too much work for Seshat RAs to suggest confidence scores for all of the shapes in the dataset, and the proxy score based on the date is not good.

If we ever do come back to this issue, another way of visualising different uncertainty levels from blur could be to play around with different border colours and thickness for the polygons

@edwardchalstrey1 edwardchalstrey1 added the wontfix This will not be worked on label Sep 10, 2024
@edwardchalstrey1 edwardchalstrey1 removed their assignment Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants