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

hex grid plots using h3pandas #5918

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

armstrys
Copy link

@dadofsambonzuki just wanted to share what I was playing with this weekend. When I installed h3 on my system using the requirements.txt in this PR I was getting an error when trying to generate the h3 geometry using poly fill. I am honestly not confident that this implementation gives the same result as yours...

From reading about h3 it seems like their resolution scale is defined from 0-15 and doesn't have a direct physical meaning (like degrees or km). I also was only able to get h3 to run in WGS84 (units degrees) and not web mercator (units area). Right now this code is building a grid at scale 2 (very coarse), aggregating, converting to web mercator and then calculating area/density. Because the CRS is so warped in many parts of the map I expect there is quite a bit of error in the area calculation. This should be less of an issue as the hex size gets smaller. I am guessing the version of the code you had running before was aggregating at scale 8, which is probably more appropriate for an interactive map, but wasn't displaying the static plot

@armstrys armstrys marked this pull request as draft December 28, 2023 02:32
@armstrys
Copy link
Author

and I am just now seeing that the files in [merchant-density-hex](https://github.com/teambtcmap/btcmap-data/tree/main/data-analysis/merchant-density-hex) are different and those do run on my system and generate a geojson! I added a geojson output to this new implementation as well

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.

1 participant