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

RShiny: Visualize MPAs on the MPA tab #34

Open
2 of 4 tasks
microlei opened this issue Aug 4, 2021 · 2 comments
Open
2 of 4 tasks

RShiny: Visualize MPAs on the MPA tab #34

microlei opened this issue Aug 4, 2021 · 2 comments

Comments

@microlei
Copy link
Contributor

microlei commented Aug 4, 2021

  • Load a default MPA country (like Cuba)
  • Add tooltip interactivity (to view metadata of each MPA)
  • Add filtering capability
  • Add selection capability (be able to select multiple MPAs by filtering or clicking/dragging)
@microlei
Copy link
Contributor Author

microlei commented Aug 5, 2021

Having difficulty rendering some maps. Chile take a really long time and is very sluggish to interact with. USA, Spain and Portugal throw this error:

Error in to_ring.default(x) :
Don't know how to get polygon data from object of class XY,MULTIPOINT,sfg

Other issues with country maps:
Iceland's metadata is pretty sparse, but main issue is there is no name for each region

@btupper
Copy link
Collaborator

btupper commented Aug 5, 2021

The javascript rendering engine may not be trying to simplify the polygons. You might try simplifying on the R side before handing the polygons to Shiny/javascript. Perhaps sf::st_simplify() is with a shake. It's hard to know a priori how long simplification will take. So, we might want to precompute and save simplified MPAs and read from those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants