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

Feature: Allow openairmaps to auto-detect certain limits (e.g., polarMap(limits = ...)) #48

Merged
merged 17 commits into from
Jul 31, 2023

Conversation

jack-davison
Copy link
Collaborator

This PR implements #34.

In short, it changes up how limits and similar args are handled to allow polarMap() and friends to automatically detect limits.

devtools::load_all()
#> ℹ Loading openairmaps

# default behaviour
polarMapStatic(polar_data, "no2", limits = "free")
#> ℹ Assuming latitude is 'lat'
#> ℹ Assuming longitude is 'lon'
#> Creating Polar Markers ■■■■■■■■■■■■■■■■                  50% |  ETA:  2sCreating Polar Markers ■■■■■■■■■■■■■■■■■■■■■■■           75% |  ETA:  1s                                                                         ℹ Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.

# fix limits
polarMapStatic(polar_data, "no2", limits = "fixed")
#> ℹ Assuming latitude is 'lat'
#> ℹ Assuming longitude is 'lon'
#> Creating Polar Markers ■■■■■■■■■■■■■■■■                  50% |  ETA:  1sCreating Polar Markers ■■■■■■■■■■■■■■■■■■■■■■■           75% |  ETA:  1s                                                                         ℹ Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.

# specify limits
polarMapStatic(polar_data, "no2", limits = c(0, 100))
#> ℹ Assuming latitude is 'lat'
#> ℹ Assuming longitude is 'lon'
#> Creating Polar Markers ■■■■■■■■■■■■■■■■                  50% |  ETA:  2sCreating Polar Markers ■■■■■■■■■■■■■■■■■■■■■■■           75% |  ETA:  1s                                                                         ℹ Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL.

Created on 2023-07-31 with reprex v2.0.2

@jack-davison jack-davison added enhancement New features map:polar 🧭 Anything to do with polar marker maps, e.g., polarMap() ggmap 📊 labels Jul 31, 2023
@jack-davison jack-davison self-assigned this Jul 31, 2023
@jack-davison jack-davison marked this pull request as ready for review July 31, 2023 07:32
@jack-davison jack-davison merged commit e5a5518 into master Jul 31, 2023
3 checks passed
@jack-davison jack-davison deleted the auto-detect-limits branch July 31, 2023 07:39
jack-davison added a commit that referenced this pull request Aug 8, 2024
Feature: Allow openairmaps to auto-detect certain limits (e.g., `polarMap(limits = ...)`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features map:polar 🧭 Anything to do with polar marker maps, e.g., polarMap()
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate auto-detecting limits (e.g., colour bar limits, "x" limits)
1 participant