Ir al contenido

This function is designed to extract the information related to real estates from Catastro.

Uso

scrape_catastro(url, ID = NA_character_, i = NULL, verbose = FALSE)

Argumentos

url

A character vector of variable length with the url.

ID

An optional character vector with the unique identification of each real state. For example, its name or address.

i

An internal argument when url vector is of length greater than 1. Do not use this parameter.

verbose

If TRUE, the iteration number is printed on the console. Default set to FALSE.

Valor

A list with two elements: the first one with the information of the main real state (parcela). In the second element is the information regarding real states associated with the main one (inmuebles).

Ejemplos


# Real examples

url_1 <- "https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCListaBienes.aspx?rc1=9797905&rc2=VK3799F"
url_2 <- "https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCListaBienes.aspx?rc1=2831834&rc2=VK4723B"

address_1 <- 'CL ARMENTEROS 44'
address_2 <- 'CL ABTAO 30'

# web scraping the information of the first one:

scrape_catastro( url_1, address_1 )
#> Error in scrape_catastro(url_1, address_1): rvest and dplyr packages must be loaded

# web scraping the information of the two webpages:

urls <- c(url_1,url_2)
address <- c(address_1,address_2)

scrape_catastro( urls, address, verbose = TRUE )
#> Error in scrape_catastro(urls, address, verbose = TRUE): rvest and dplyr packages must be loaded