A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jessecambon/tidygeocoder/issues/48 below:

Issue with custom_query and geocodio · Issue #48 · jessecambon/tidygeocoder · GitHub

First, thank you for the excellent package.

I am running into an issue where custom_query won't pull the requested fields from the geocodio API.

Reproducible example requesting state legislative districts or Census tracts via the field keys stateleg and tract_code:


library(tidygeocoder)
library(tidyverse)

Sys.setenv(GEOCODIO_API_KEY = "INSERT YOUR KEY")

some_addresses <- tribble(
                       ~name,                  ~addr,
                       "White House",          "1600 Pennsylvania Ave, Washington, DC",
                       "Transamerica Pyramid", "600 Montgomery St, San Francisco, CA 94111",     
                       "Willis Tower",         "233 S Wacker Dr, Chicago, IL 60606"                                  
                       )

test <- some_addresses %>% geocode(
                                addr, method = "geocodio", 
                                full_results = TRUE,
                                custom_query = list(fields = 'stateleg')
                                )

test2 <- some_addresses %>% geocode(
                                 addr, method = "geocodio", 
                                 full_results = TRUE,
                                 custom_query = list(fields = 'tract_code')
                                 )

My expectation was that this would give me the information contained within the stateleg and tract_code keys from geocodio. This is the link to the relevent API documentaiton: https://www.geocod.io/docs/?shell#fields.

I modeled this off the example in the tidygeocoder documentation for getting different vintages of census data (i.e., list(vintage = 'Current_Census2010').


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4