votes_match_deputies_ids {sejmRP}R Documentation

Matching deputies to theirs' ids

Description

Function votes_match_deputies_ids matches deputies from voting's results page to theirs' ids from deputies table.

Usage

votes_match_deputies_ids(dbname, user, password, host, page, 
   nr_term_of_office = 8, windows = .Platform$OS.type == 'windows')

Arguments

dbname

name of database

user

name of user

password

password of database

host

name of host

page

club's voting's results page

nr_term_of_office

number of term of office of Polish Diet; default: 8

windows

information of used operation system; default: .Platform$OS.type == 'windows'

Details

Function votes_match_deputies_ids matches deputies from voting's results page to theirs' ids from deputies table. The result of this function is a data frame with deputies' data, ids and votes. Because of encoding issue on Windows operation system, you need to select if you use Windows. Example of page with voting's results of PO club: http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp? symbol=klubglos&IdGlosowania=37494&KodKlubu=PO

Value

data frame with three columns: deputy, vote, id

Note

All information is stored in PostgreSQL database.

Author(s)

Piotr Smuda

Examples

## Not run: 
page <- paste0('http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?',
             'symbol=klubglos&IdGlosowania=37494&KodKlubu=PO')
votes_match_deputies_ids(dbname, user, password, host, page, 7, TRUE)
votes_match_deputies_ids(dbname, user, password, host, page, 7, FALSE)
## End(Not run)


[Package sejmRP version 1.3.4 Index]