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 an example using PolygonLayer #351

Merged
merged 10 commits into from
Mar 28, 2024
Merged

adds an example using PolygonLayer #351

merged 10 commits into from
Mar 28, 2024

Conversation

naomatheus
Copy link
Contributor

@naomatheus naomatheus commented Feb 8, 2024

Added a short example notebook using the PolygonLayer together to create a map of municipal boundaries.

TODO: I'll need to add images and/or gifs to make the example more visually appealing.

@naomatheus naomatheus marked this pull request as draft February 8, 2024 00:41
@naomatheus
Copy link
Contributor Author

I'd love to add an image or a gif to show the result at the end of the notebook. Any preferred way to do that?
I suppose I would just add an image into the examples directory. Or perhaps a separate directory for the images.
And then link from the notebook with ! [alt_text] path_to_image

Something like that

@kylebarron
Copy link
Member

You can put an image into the assets/ directory. Try to make it relatively small file size. You can do something like brew install imagemagick; convert input.png output.jpg --quality 75. (I forget the exact syntax; that might be wrong)

@kylebarron
Copy link
Member

I'd forgotten that I hadn't given this a full review (feel free to ping me if I haven't reviewed in a day or two), though it would be great to have a screenshot for this as well.

Since it's docs only, this can be merged after the release

@naomatheus naomatheus marked this pull request as ready for review February 20, 2024 19:23
@naomatheus
Copy link
Contributor Author

okay! Moving this out of draft

@naomatheus
Copy link
Contributor Author

naomatheus commented Feb 20, 2024

I'm curious how the gif holds up as well
meh the still image looks a lot better

Copy link
Member

@kylebarron kylebarron left a comment

Choose a reason for hiding this comment

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

This looks pretty good! Just a few comments

examples/global-boundaries.ipynb Outdated Show resolved Hide resolved
examples/global-boundaries.ipynb Outdated Show resolved Hide resolved
examples/global-boundaries.ipynb Outdated Show resolved Hide resolved
examples/global-boundaries.ipynb Outdated Show resolved Hide resolved
examples/global-boundaries.ipynb Outdated Show resolved Hide resolved
examples/global-boundaries.ipynb Outdated Show resolved Hide resolved
@naomatheus
Copy link
Contributor Author

Hmm... One comment I have here is that I noticed that rendering the entire global map seems to affect the rendering of the fill_color and the map's pickability. When I render the entire map, it is no longer pickable for some reason.

Copy link
Member

@emmalu emmalu left a comment

Choose a reason for hiding this comment

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

Nice notebook example, Matt. Especially if you can distinguish shape colors by country code. 👍🏽

@kylebarron
Copy link
Member

There are some weird artifacts here:
image

It's hard to know whether that's an issue in the original data or an issue with shapely.boundary or something else. In any case I do also see that the rendering and picking is somewhat slow on my computer. That said, it is 8 million coordinates, so that is quite a lot to visualize!

How about we bring back in the spatial filter over the americas for now? What do you think?

@kylebarron kylebarron changed the title adds an example using SolidPolygonLayer adds an example using PolygonLayer Mar 28, 2024
@kylebarron
Copy link
Member

boundaries

Updated this to use the new PolygonLayer

@kylebarron kylebarron enabled auto-merge (squash) March 28, 2024 16:19
@kylebarron kylebarron merged commit 7ce1abd into main Mar 28, 2024
5 checks passed
@kylebarron kylebarron deleted the matt/polygon-example branch March 28, 2024 16:19
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

Successfully merging this pull request may close these issues.

None yet

3 participants