extract_from_catastro: Extract data from catastro object

View source: R/extract_from_catastro.r

extract_from_catastroR Documentation

Extract data from catastro object

Description

After scraping data with scrape_catastro is obtained an object of class catastro which is a list with at least two elements (parcelas and inmuebles). With this function that information can be translated into a tibble: both the parcelas and inmuebles as well as both

Usage

extract_from_catastro(list_scrape, which = c("parcelas", "inmuebles"))

Arguments

list_scrape

A catastro object (the output of scrape_catastro).

which

Options: 'parcelas', 'inmuebles' or c('parcelas','inmuebles').

Value

A tibble with the specified information.

Examples


# Real example

urls <- c("https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCListaBienes.aspx?rc1=9797905&rc2=VK3799F",
          "https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCListaBienes.aspx?rc1=2831834&rc2=VK4723B")

address <- c('CL ARMENTEROS 44','CL ABTAO 30')

# web scraping:
example_catastro <- scrape_catastro(urls,address)

# extract information:

extract_from_catastro(example_catastro, which = 'inmuebles')

extract_from_catastro(example_catastro, which = 'parcelas')

extract_from_catastro(example_catastro, c('inmuebles','parcelas'))


octmedina/ksnet documentation built on April 18, 2023, 3:34 p.m.