-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: generate h3 polygons and create webmap #46
Conversation
This reverts commit 9b33217.
- add h3pandas to dependencies - add app launch to end of file - use single aggregation (mean) instead of multiple - change order of arguments based on defaults
- adding Typer help and defaults - adding code to generate colours and breakpoints for map - formatting
- fix interpolation breaks - fix hard coded template path
Hard code colours into dataframe/json rather than using MapLibre interpolation
remove temp file
- add pop to show gvi score when polygon is clicked
- Round GVI scores to 2 decimal places for neater pop-ups
- Reduce bounding box buffer from 0.5 degrees to 0.25 - Set default zoom to 12
Update sample .env file to include placeholder for Maptiler api key
Fix line lengths
Formatting
Points to hex to webmap
add info on MapTiler API key
Added a note to the ReadMe re. MapTiler API key - will look into the other comments and come back to you |
Add a leading `0` to cell resolution if it is a single digit
The Jinja template will use an empty basemap if there is no Maptiler API key in the .env file
also, i added a MapTiler API key to the |
2e3586c fixes the Maptiler API issue by adding the error above is because the function expects zoom level to be the 4th of 4 arguments (input data, output folder, output filename, zoom level) - because only 3 were passed, it interpreted zoom level as the file name. I've made a mistake in the example in the documentation. Is it better to not ask for a separate folder and filename and just take a path to a file for the output? Or should I just update the readme to give a code sampe that will work with this pattern |
yeah, i think a path to the file (instead of separate path and filename) matches the other steps? |
Updated with ioalexei@b42316d |
this is looking good, except for it to render the hex layer when there isn't a MapTiler API key, it seems that the
if the user copies the template and doesn't touch the line then it will be |
if there is no
i guess we could just put a commented note in the .env.example file to remove the line if not used? |
Added a new commit to account for a blank variable - but think it makes sense to put a note in the example .env file too as it might be hard to account of all the ways it could be invalid |
|
Added fix for #88 :
|
Addresses issue #25
Adds files:
points_to_h3.py
create_webmap.py
templates/maplibre_template.html
Points to H3
Input:
Output:
Example usage:
python3 -m src.points_to_h3 data/processed/gvi_score_layer.gpkg data/processed/h3_polygons.gpkg 11
Create webmap
Input:
Output:
Example usage:
python3 -m src.create_webmap ./data/processed/h3_polygons.gpkg ./outputs gvi_webmap.html 10