latlong2fips: Latitude-Longitude Coordinates to FIPS Geocode

Description Usage Arguments Value Author(s) References Examples

Description

Converts latitude/longitude coordinates to 15-digit FIPS code. Communicates with FCC API.

Usage

1
  latlong2fips(latitude, longitude, number)

Arguments

latitude

Numeric. Latitude coordinate.

longitude

Numeric. Longitude coordinate.

number

Numeric. Usually part of a loop index counter

Value

Character string 15-digit FIPS code corresponding to Lat/Long entry

Author(s)

Loren Collingwood <loren.collingwood@ucr.edu>

References

https://geo.fcc.gov/api/census/block/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  
  # EXAMPLE: NOT RUN #
  #census_block <- list()
  #num_catch <- rep(NA, nrow(nom_geo))

  #for (i in 1:nrow(nom_geo)) {
  
  #  census_block[[i]] <- latlong2fips(nom_geo$lat[i], nom_geo$lon[i], i)
  #}
  
  # Row Bind the list into a data.frame object #
  #fips_df <- rbindlist(census_block)
    

lorenc5/eiCompare documentation built on June 5, 2019, 5:18 p.m.