Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd show_call option to get_*() to print API calls #203
Conversation
This comment has been minimized.
This comment has been minimized.
In these other commits, I added in a couple helpful error messages that would address issues raised in #197 and #198 library(tidycensus)
load_variables(2010, "sf3")
#> Error: Summary File 3 was not released in 2010. Use tables from the American Community Survey via get_acs() instead.
get_acs(
geography = "state",
state = "VT",
table = c("B01001", "B01003"),
show_call = TRUE
)
#> Error: Only one table may be requested per call. Created on 2019-11-15 by the reprex package (v0.3.0) |
This comment has been minimized.
This comment has been minimized.
awesome work, thanks @mfherman!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
mfherman commentedNov 15, 2019
In reference to #194, this adds an option to the three
get_*()
functions to print the API call that is sent to the Census API. This enables a user to copy and paste the API call into a browser and help to determine if the issue is with tidycensus or the Census API if they are receiving an error.When the request requires multiple calls to the API because of a large number of variables, all API calls are printed. But, because messages are suppressed internally when making iterating over
get_*()
calls (required for block groups or multi-state tract level requests), the API calls are not printed.Below are examples of the API call printing.
Also another commit to change the default year for
get_estimates()
to 2018 in re #200.Created on 2019-11-15 by the reprex package (v0.3.0)