Skip to content

Conversation

danlewis85
Copy link

@danlewis85 danlewis85 commented Mar 13, 2025


Description

This PR add a new run script /pipeline/run_scripts/run_make_webmap_geojsons.py and some associated keys in the config file (under the webmap_data_source key).

Running this script produces a set of GB-level geojson files with suitability scores appended. The geojsons produced are at different levels of aggregation to allow for effective rendering at different levels of zoom.

Closes #74

Instructions for Reviewer

Could you check if the doc string at the top of the run script makes sense.
Can you try running the run_make_webmap_geojsons.py script.
Can you ensure you are happy with the logic of the script.

Checklist:

  • I have refactored my code out from notebooks/
  • I have checked the code runs
  • I have tested the code
  • I have run pre-commit and addressed any issues not automatically fixed
  • I have merged any new changes from dev
  • I have documented the code
    • Major functions have docstrings
    • Appropriate information has been added to READMEs
  • I have explained this PR above
  • I have requested a code review

@danlewis85 danlewis85 self-assigned this Mar 13, 2025
Copy link
Collaborator

@crispy-wonton crispy-wonton left a comment

Choose a reason for hiding this comment

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

Thanks so much for this @danlewis85 !

It looks good and I couldn't find any errors. I left some comments mostly re documentation, plus some minor suggestions.

I would suggest moving your functions in this script into some utils files. We can make a separate issue for this if easier. I think they could be useful for other stuff as well.

Also, some of the functions could be renamed to be clearer. Our repo style guide suggests the following format for readability: action_returnsType_description e.g. check_exists_str_file_uri instead of get_file_uri.

Question - is there a separate script for the geojson creation and simplification which needs review?

Thanks so much :)


# Load scores file
logger.info(f"Reading suitability scores from {file_uri}")
scores = pd.read_parquet(file_uri)
Copy link
Collaborator

Choose a reason for hiding this comment

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

pandas jumpscare lol

Copy link
Author

Choose a reason for hiding this comment

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

I don't understand this - leaving open for for info.

danlewis85 and others added 5 commits April 30, 2025 14:10
…_geojsons.py

Co-authored-by: crispy-wonton <104171770+crispy-wonton@users.noreply.github.com>
…_geojsons.py

Co-authored-by: crispy-wonton <104171770+crispy-wonton@users.noreply.github.com>
…pump_suitability into 74_tippecanoe_geojsons

Merging upstream minor stylistic changes.
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.

explore use of tippecanoe for slippy maps
2 participants