-
Notifications
You must be signed in to change notification settings - Fork 9
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 arc_read()
function
#108
Comments
vctrs is already recursively imported by httr2 so that's not such a big deal. I still don't think I'm sold on this. When you read from a database you open a connection, then you query the results and then bring it into memory. That's the workflow we're replicating here. For example I don't think If |
I don't think I'd also note that most of the common read functions don't require you to read everything into memory:
|
Let's go ahead and make a pr. Why not? be sure to use |
Nice. Thanks! Would you be interested in me including the col_select argument as an alias for fields? Internally inconsistent but maybe nice for familiarity based on those other read functions. |
I think signature should be: arc_read <- function(
url,
col_names = NULL,
col_select = NULL,
n_max = Inf # or a sensible number e.g. 10000
name_repair = "unique"
) {
# ...
} |
That is almost exactly how I have it started. Stayed up late getting it working (getting col_names to parity with the standard tidyverse functionality was a bit tricky) but the PR may not be until next weekend. I think it could also easily support |
FWIW I dont think it needs to be exactly the same as |
Closed by #118 |
I would find it really convenient to have a single function, e.g.
arc_read()
, that I could use to read in data from a ArcGIS service. Here is a reprex showing my existing workflow and an alternate workflow with this function:Created on 2023-11-29 with reprex v2.0.2
This reprex also shows the potential of adding a .name_repair parameter. If you'd be OK with picking up a
{vctrs}
dependency you could usevctrs::vec_as_names()
or re-implement comparable flexibility.The text was updated successfully, but these errors were encountered: