votes_match_deputies_ids: Matching deputies to theirs' ids

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/votes_match_deputies_ids.R

Description

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

Usage

1
2
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

1
2
3
4
5
6
## 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)

sejmRP documentation built on May 2, 2019, 5:16 a.m.