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

Simplifying queries #239

Open
Robinlovelace opened this issue Dec 7, 2021 · 2 comments
Open

Simplifying queries #239

Robinlovelace opened this issue Dec 7, 2021 · 2 comments

Comments

@Robinlovelace
Copy link
Member

Many of the examples in the documents show queries like this:

q = "SELECT * FROM 'multipolygons' WHERE 'building' is not null"

However, I've just discovered that this works fine (better in this case, the above fails to omit building=NA):

In context of reprex:

library(dplyr)
q = "SELECT * FROM multipolygons WHERE building is not null"
buildings_nyorks = osmextract::oe_get("north yorkshire", query = q)
buildings_nyorks %>%
  sf::st_drop_geometry() %>% 
  group_by(building) %>% 
  count(building) %>% 
  arrange(desc(n))
@Robinlovelace
Copy link
Member Author

Result!

image

@agila5
Copy link
Collaborator

agila5 commented Dec 7, 2021

Hi Robin! I'm not 100% sure but I think that sounds like a bug (or at least something that I want to check with more details as soon as possible). Anyway, thanks for creating this issue!

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

No branches or pull requests

2 participants