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

Add capability to plot counties #153

Merged
merged 6 commits into from
Sep 5, 2024
Merged

Conversation

blychs
Copy link
Contributor

@blychs blychs commented Sep 5, 2024

Adds capability to plot county lines to draw_map(), by adding the optional keyword counties, using NaturalEarthFeature.

The only drawback I can think of in my implementation is that, for consistency with the function structure, I added the counties parameter just before the states parameter (since countries is after states). This means that if someone is calling the function using just the position, it might go wrong (i.e., if they are doing draw_map(None, False, True, True, False, '10m') or something similar instead of draw_map(crs=None, natural_earth=True, coastlines=True) etc.). This seems to me quite unlikely, since it would render the function call almost unreadable. However, if we think it could be an issue, an easy workaround is moving the counties parameter to the end of the function, just before the kwargs.

Copy link
Member

@zmoon zmoon left a comment

Choose a reason for hiding this comment

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

The concern about passing args positionally is valid, but, like you say, keyword usage is much more likely (all the uses within monet itself are this way).

monet/plots/mapgen.py Outdated Show resolved Hide resolved
@zmoon
Copy link
Member

zmoon commented Sep 5, 2024

@blychs it's not related to your PR, but can you add the line ./monet/plots/taylordiagram.py:12: to the .codespell-exclude file? (to get codespell passing again)

	Exclude taylordiagram.py:12:
@zmoon zmoon merged commit cb3d5b1 into noaa-oar-arl:develop Sep 5, 2024
2 checks passed
@zmoon zmoon linked an issue Sep 5, 2024 that may be closed by this pull request
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.

Adding optional counties to draw_map()
2 participants