View source: R/get_ly_legislator_bills.R
get_ly_legislator_bills | R Documentation |
Retrieves comprehensive information for a specific legislator from the Legislative Yuan API. This includes personal details, committee assignments, educational background, and work experience.
get_ly_legislator_bills(term, name, page = 1, limit = 20, show_progress = TRUE)
term |
integer. Required. The legislative term number (e.g., 9) |
name |
string. Required. The legislator's name in Chinese (e.g., "王金平") |
page |
integer. Page number for pagination (default: 1) |
limit |
integer. Number of records per page (default: 20) |
show_progress |
logical. Whether to display progress information (default: TRUE) |
Get Bill by legislator 取得立法委員提案資料
A list containing two components:
A list containing pagination information:
Total number of bills
Total number of pages
Current page number
Number of records per page
A data frame containing bill information:
Bill number
Bill name
Proposing unit/legislator
Bill status
Bill type
Bill source
Meeting ID
Session number
Reference number
Proposal number
Legislative term
Last modified time
The function accesses the Legislative Yuan's open data API. The API endpoint
format is: https://ly.govapi.tw/legislator/{term}/{name}/propose_bill
The returned data can be used for:
Analyzing legislator's bill proposal patterns
Tracking bill status and progress
Studying legislative priorities
Conducting policy research
get_ly_legislators_by_term
for listing all legislators in a term
get_ly_legislator_detail
for detailed legislator information
## Not run:
# Get bills for a specific legislator
bills <- get_ly_legislator_bills(
term = 9,
name = "王金平",
limit = 10
)
# Get second page of bills
bills_page2 <- get_ly_legislator_bills(
term = 9,
name = "王金平",
page = 2,
limit = 20
)
# Display summary statistics
cat(sprintf(
"Total Bills: %d\nCurrent Page: %d\nBills per page: %d\n",
bills$metadata$total,
bills$metadata$current_page,
bills$metadata$per_page
))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.