-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34dc188
commit 325bf44
Showing
9 changed files
with
224 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ Collate: | |
'spanish.R' | ||
RoxygenNote: 6.1.1 | ||
Suggests: testthat, tidyr | ||
Depends: magrittr,xml2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
export(geocode_cadastral) | ||
export(to_number) | ||
export(to_words) | ||
importFrom(magrittr,"%>%") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
#' Cadastral references test data | ||
#' | ||
#' Randomly selected data from catastro to test geocode_cadastral function | ||
#' | ||
#' @docType data | ||
#' | ||
#' @usage data(cadastral_references) | ||
#' | ||
#' @format A data frame. | ||
#' | ||
#' @keywords datasets | ||
#' | ||
#' @references Catastro. Ministerio de Hacienda y función pública. | ||
#' (\href{http://www.catastro.meh.es/}{Catastro}) | ||
#' | ||
#' @source \href{http://www.catastro.meh.es/}{Sede Electrónica del Catastro} | ||
#' | ||
#' @examples | ||
#' ## source is cadastral reference number ## | ||
#' | ||
#' geocode_cadastral("0636105UF3403N", parse_files = FALSE) | ||
#' | ||
#' ## Use lapply to geocode cadastral references from dataframe columns. | ||
#' | ||
#' cadastral_references$new <- lapply(cadastral_references$cadref1, geocode_cadastral) | ||
#' | ||
#' ## separate previously generated "new" data into columns usign tidyr | ||
#' | ||
#' library(tidyr) | ||
#' separate(cadastral_references, new, into = c('longitude','latitude'), sep = "," ) | ||
#' | ||
#' ## source is folder. A loop is needed to process each kml file ## | ||
#' | ||
#' \dontrun{ | ||
#' files <- list.files("folder", full.names = T) | ||
#' | ||
#' for (f in files) { | ||
#' coords <- geocode_cadastral(f, parse_files = TRUE) | ||
#' d <- as.data.frame(rbind(d , as.data.frame(coords, stringsAsFactors = F ))) | ||
#' } | ||
#' | ||
#'# separate lat/lon into columns if you prefer using tidyr | ||
#' d <- tidyr::separate(coords, into = c("longitude","latitude"), sep = "," ) | ||
#'} | ||
"cadastral_references" | ||
#' Cadastral references test data | ||
#' | ||
#' Randomly selected data from catastro to test geocode_cadastral function | ||
#' | ||
#' @docType data | ||
#' | ||
#' @usage data(cadastral_references) | ||
#' | ||
#' @format A data frame. | ||
#' | ||
#' @keywords datasets | ||
#' | ||
#' @references Catastro. Ministerio de Hacienda y función pública. | ||
#' (\href{http://www.catastro.meh.es/}{Catastro}) | ||
#' | ||
#' @source \href{http://www.catastro.meh.es/}{Sede Electrónica del Catastro} | ||
#' | ||
#' @examples | ||
#' \dontrun{ | ||
#' ## source is cadastral reference number ## | ||
#' | ||
#' geocode_cadastral("0636105UF3403N", parse_files = FALSE) | ||
#' | ||
#' ## Use lapply to geocode cadastral references from dataframe columns. | ||
#' | ||
#' cadastral_references$new <- lapply(cadastral_references$cadref1, geocode_cadastral) | ||
#' | ||
#' ## separate previously generated "new" data into columns usign tidyr | ||
#' | ||
#' library(tidyr) | ||
#' separate(cadastral_references, new, into = c('longitude','latitude'), sep = "," ) | ||
#' | ||
#' ## source is folder. A loop is needed to process each kml file ## | ||
#' | ||
#' files <- list.files("folder", full.names = T) | ||
#' | ||
#' for (f in files) { | ||
#' coords <- geocode_cadastral(f, parse_files = TRUE) | ||
#' d <- as.data.frame(rbind(d , as.data.frame(coords, stringsAsFactors = F ))) | ||
#' } | ||
#' | ||
#'# separate lat/lon into columns if you prefer using tidyr | ||
#' d <- tidyr::separate(coords, into = c("longitude","latitude"), sep = "," ) | ||
#'} | ||
"cadastral_references" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.