GBAT.borough_code: Geocode NYC addresses with borough code

Description Usage Arguments Details Value Examples

Description

The GBAT.zip_code function geocodes a data frame of NYC addresses using house number, street name, and borough code.

Usage

1
GBAT.borough_code(input_df, id_colname, address_colname, borough_code_colname)

Arguments

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

Details

The New York Department of City Planning's Geosupport Desktop geocoding software must be installed prior to installing the rGBAT16AB package.

Value

The GBAT.borough_code function returns almost 200 columns which are described in the Geosupport Desktop User Guide

Examples

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')

gmculp/rGBAT16AB documentation built on May 17, 2019, 7:24 a.m.