Description Usage Arguments Details Value Examples
The GBAT.zip_code
function geocodes a data frame of NYC addresses using house number, street name, and borough code.
1 | GBAT.borough_code(input_df, id_colname, address_colname, borough_code_colname)
|
input_df |
a data frame containing NYC address |
id_colname |
the column name of an arbitrary unique identifier |
address_colname |
the column name of addresses where addresses are in the format of house number and street name (e.g., 123 Smith Street) |
borough_code_colname |
the column name of the borough code where Manhattan = 1, Bronx = 2, Brooklyn = 3, Queens = 4, and Staten Island = 5 |
The New York Department of City Planning's
Geosupport Desktop geocoding software
must be installed prior to installing the rGBAT16AB
package.
The GBAT.borough_code
function returns almost 200 columns which are described in the Geosupport Desktop User Guide
1 2 3 4 5 6 7 8 9 | # create a data frame of addresses
ADDR <- c("448 Lafayette Ave","727 Manhattan Ave","31-00 47th Ave","308 E 78th S","10 Morton St")
ZIP_CODE <- c("11205","11222","11101","10075","10014")
BORO_CODE <- c(3,3,4,1,1)
u_id <- 1:length(ADDR)
df = data.frame(u_id, ADDR, ZIP_CODE, BORO_CODE)
#geocode data frame
df_gc <- GBAT.borough_code(df,'u_id','ADDR','BORO_CODE')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.