inegi_denue_grid: Find businesses in a grid larger than 5 kms

Description Usage Arguments Details Value Author(s) Examples

View source: R/v3_denue.R

Description

Returns data.frame with businesses registered in the DENUE in spaces larger than 5 kilometers. Calls make_grid. Functions contributed by Arturo Cardenas https://github.com/arturocm.

Usage

1
2
3
inegi_denue_grid(lat1, lat2, lon1, lon2, token, meters = 5000,
  keyword = "todos", space_lat = 0.07, space_lon = 0.07,
  uniqueonly = TRUE)

Arguments

lat1

First corner (latitud)

lat2

Second corner (latitud)

lon1

First corner (longitud)

lon2

Second corner (longitud)

token

API token supplied by INEGI

meters

Distance in meters to search by coordinate

keyword

Keyword of businesses to include. Defaults to all ("todos")

space_lat

Space between latitud coordinates defaults to 0.07 degrees

space_lon

Space between longitud coordinates defaults to 0.07 degrees

uniqueonly

Default = TRUE, eliminates duplicate businesses

Details

Makes a loop for each pair of coordinates, creating a grid to extract businesses inside. Uses maximum and minimum coordinate pairs to draw frame.

Value

Data.frame

Author(s)

Arturo Cardenas

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
token<-"webservice_token"
latitud1 <- 25.669194
latitud2 <- 25.169194
longitud1 <- -100.30990
longitud2 <- -101.20102
businesses <- inegi_denue_grid(latitud1, latitud2, longitud1, longitud2, token)

## End(Not run)

inegiR documentation built on July 14, 2019, 5:02 p.m.