Learn R Programming

sejmRP (version 1.2)

statements_get_statements_data: Getting data about statements

Description

Function statements_get_statements_data gets data about statements.

Usage

statements_get_statements_data(statements_links,
  home_page = 'http://www.sejm.gov.pl/Sejm7.nsf/')

Arguments

statements_links
list of elements of XMLNodeSet class with statements' ids, links and their's authors
home_page
main page of polish diet: http://www.sejm.gov.pl/Sejm7.nsf/

Value

  • data frame with three columns: names, statements_links, ids

Details

Function statements_get_statements_data gets data about statements like author, page with content of statement and it's id.

Examples

Run this code
page <- html(paste0('http://www.sejm.gov.pl/Sejm7.nsf/',
               'wypowiedz.xsp?posiedzenie=15&dzien=1&wyp=0')
page <- html_nodes(page, '.stenogram')
statements_links <- html_nodes(page, 'h2 a')
statements_get_statements_data(statements_links,
  home_page = 'http://www.sejm.gov.pl/Sejm7.nsf/')

Run the code above in your browser using DataLab