Skip to content

Retrieves bill information from the Legislative Yuan API with comprehensive filter options. Supports filtering by term, session, bill type, status, and other attributes. Returns both metadata and detailed bill information.

Usage

get_ly_bills(
  page = 1,
  per_page = 20,
  term = NULL,
  session = NULL,
  bill_type = NULL,
  current_status = NULL,
  process_status = NULL,
  proposer = NULL,
  cosigner = NULL,
  source = NULL,
  bill_id = NULL,
  law_id = NULL,
  meeting_code = NULL,
  show_progress = TRUE
)

Arguments

page

integer. Page number for pagination (default: 1)

per_page

integer. Number of items per page (default: 20)

term

integer. Legislative term, e.g., 11

session

integer. Legislative session period, e.g., 2

bill_type

string. Type of bill:

  • "法律案" (Law Bill)

  • "中央政府總預算案" (Central Government Budget Bill)

  • "預(決) 算決議案" (Budget/Final Account Resolution)

  • "定期報告" (Regular Report)

  • "行政命令(層級)" (Administrative Order)

  • "院內單位來文" (Internal Document)

current_status

string. Current bill status, e.g., "排入院會"

process_status

string. Status in process flow, e.g., "排入院會 (交內政委員會)"

proposer

string. Bill proposer name

cosigner

string. Bill cosigner name

source

string. Source of bill, e.g., "委員提案"

bill_id

string. Bill ID number

law_id

string. Related law ID number

meeting_code

string. Meeting code, e.g., "院會-11-2-3"

show_progress

logical. Whether to display progress bar (default: TRUE)

Value

A list containing:

  • metadata - List of pagination info and applied filters

  • bills - Data frame of bill details

Examples

# Get law bills
bills <- get_ly_bills(
  term = 11,
  bill_type = "法律案",
  show_progress = TRUE
)
#> Fetching data...
#> Data received successfully, processing...
#> Found 100 bills, converting...
#> 
  |                                                                      
  |                                                                |   0%
  |                                                                      
  |=                                                               |   1%
  |                                                                      
  |=                                                               |   2%
  |                                                                      
  |==                                                              |   3%
  |                                                                      
  |===                                                             |   4%
  |                                                                      
  |===                                                             |   5%
  |                                                                      
  |====                                                            |   6%
  |                                                                      
  |====                                                            |   7%
  |                                                                      
  |=====                                                           |   8%
  |                                                                      
  |======                                                          |   9%
  |                                                                      
  |======                                                          |  10%
  |                                                                      
  |=======                                                         |  11%
  |                                                                      
  |========                                                        |  12%
  |                                                                      
  |========                                                        |  13%
  |                                                                      
  |=========                                                       |  14%
  |                                                                      
  |==========                                                      |  15%
  |                                                                      
  |==========                                                      |  16%
  |                                                                      
  |===========                                                     |  17%
  |                                                                      
  |============                                                    |  18%
  |                                                                      
  |============                                                    |  19%
  |                                                                      
  |=============                                                   |  20%
  |                                                                      
  |=============                                                   |  21%
  |                                                                      
  |==============                                                  |  22%
  |                                                                      
  |===============                                                 |  23%
  |                                                                      
  |===============                                                 |  24%
  |                                                                      
  |================                                                |  25%
  |                                                                      
  |=================                                               |  26%
  |                                                                      
  |=================                                               |  27%
  |                                                                      
  |==================                                              |  28%
  |                                                                      
  |===================                                             |  29%
  |                                                                      
  |===================                                             |  30%
  |                                                                      
  |====================                                            |  31%
  |                                                                      
  |====================                                            |  32%
  |                                                                      
  |=====================                                           |  33%
  |                                                                      
  |======================                                          |  34%
  |                                                                      
  |======================                                          |  35%
  |                                                                      
  |=======================                                         |  36%
  |                                                                      
  |========================                                        |  37%
  |                                                                      
  |========================                                        |  38%
  |                                                                      
  |=========================                                       |  39%
  |                                                                      
  |==========================                                      |  40%
  |                                                                      
  |==========================                                      |  41%
  |                                                                      
  |===========================                                     |  42%
  |                                                                      
  |============================                                    |  43%
  |                                                                      
  |============================                                    |  44%
  |                                                                      
  |=============================                                   |  45%
  |                                                                      
  |=============================                                   |  46%
  |                                                                      
  |==============================                                  |  47%
  |                                                                      
  |===============================                                 |  48%
  |                                                                      
  |===============================                                 |  49%
  |                                                                      
  |================================                                |  50%
  |                                                                      
  |=================================                               |  51%
  |                                                                      
  |=================================                               |  52%
  |                                                                      
  |==================================                              |  53%
  |                                                                      
  |===================================                             |  54%
  |                                                                      
  |===================================                             |  55%
  |                                                                      
  |====================================                            |  56%
  |                                                                      
  |====================================                            |  57%
  |                                                                      
  |=====================================                           |  58%
  |                                                                      
  |======================================                          |  59%
  |                                                                      
  |======================================                          |  60%
  |                                                                      
  |=======================================                         |  61%
  |                                                                      
  |========================================                        |  62%
  |                                                                      
  |========================================                        |  63%
  |                                                                      
  |=========================================                       |  64%
  |                                                                      
  |==========================================                      |  65%
  |                                                                      
  |==========================================                      |  66%
  |                                                                      
  |===========================================                     |  67%
  |                                                                      
  |============================================                    |  68%
  |                                                                      
  |============================================                    |  69%
  |                                                                      
  |=============================================                   |  70%
  |                                                                      
  |=============================================                   |  71%
  |                                                                      
  |==============================================                  |  72%
  |                                                                      
  |===============================================                 |  73%
  |                                                                      
  |===============================================                 |  74%
  |                                                                      
  |================================================                |  75%
  |                                                                      
  |=================================================               |  76%
  |                                                                      
  |=================================================               |  77%
  |                                                                      
  |==================================================              |  78%
  |                                                                      
  |===================================================             |  79%
  |                                                                      
  |===================================================             |  80%
  |                                                                      
  |====================================================            |  81%
  |                                                                      
  |====================================================            |  82%
  |                                                                      
  |=====================================================           |  83%
  |                                                                      
  |======================================================          |  84%
  |                                                                      
  |======================================================          |  85%
  |                                                                      
  |=======================================================         |  86%
  |                                                                      
  |========================================================        |  87%
  |                                                                      
  |========================================================        |  88%
  |                                                                      
  |=========================================================       |  89%
  |                                                                      
  |==========================================================      |  90%
  |                                                                      
  |==========================================================      |  91%
  |                                                                      
  |===========================================================     |  92%
  |                                                                      
  |============================================================    |  93%
  |                                                                      
  |============================================================    |  94%
  |                                                                      
  |=============================================================   |  95%
  |                                                                      
  |=============================================================   |  96%
  |                                                                      
  |==============================================================  |  97%
  |                                                                      
  |=============================================================== |  98%
  |                                                                      
  |=============================================================== |  99%
  |                                                                      
  |================================================================| 100%
#> 
#> Conversion complete!
#> Processing complete! Total bills processed: 100

# Get budget bills
bills <- get_ly_bills(
  term = 11,
  bill_type = "中央政府總預算案",
  show_progress = TRUE
)
#> Fetching data...
#> Data received successfully, processing...
#> Found 40 bills, converting...
#> 
  |                                                                      
  |                                                                |   0%
  |                                                                      
  |==                                                              |   2%
  |                                                                      
  |===                                                             |   5%
  |                                                                      
  |=====                                                           |   8%
  |                                                                      
  |======                                                          |  10%
  |                                                                      
  |========                                                        |  12%
  |                                                                      
  |==========                                                      |  15%
  |                                                                      
  |===========                                                     |  18%
  |                                                                      
  |=============                                                   |  20%
  |                                                                      
  |==============                                                  |  22%
  |                                                                      
  |================                                                |  25%
  |                                                                      
  |==================                                              |  28%
  |                                                                      
  |===================                                             |  30%
  |                                                                      
  |=====================                                           |  32%
  |                                                                      
  |======================                                          |  35%
  |                                                                      
  |========================                                        |  38%
  |                                                                      
  |==========================                                      |  40%
  |                                                                      
  |===========================                                     |  42%
  |                                                                      
  |=============================                                   |  45%
  |                                                                      
  |==============================                                  |  48%
  |                                                                      
  |================================                                |  50%
  |                                                                      
  |==================================                              |  52%
  |                                                                      
  |===================================                             |  55%
  |                                                                      
  |=====================================                           |  58%
  |                                                                      
  |======================================                          |  60%
  |                                                                      
  |========================================                        |  62%
  |                                                                      
  |==========================================                      |  65%
  |                                                                      
  |===========================================                     |  68%
  |                                                                      
  |=============================================                   |  70%
  |                                                                      
  |==============================================                  |  72%
  |                                                                      
  |================================================                |  75%
  |                                                                      
  |==================================================              |  78%
  |                                                                      
  |===================================================             |  80%
  |                                                                      
  |=====================================================           |  82%
  |                                                                      
  |======================================================          |  85%
  |                                                                      
  |========================================================        |  88%
  |                                                                      
  |==========================================================      |  90%
  |                                                                      
  |===========================================================     |  92%
  |                                                                      
  |=============================================================   |  95%
  |                                                                      
  |==============================================================  |  98%
  |                                                                      
  |================================================================| 100%
#> 
#> Conversion complete!
#> Processing complete! Total bills processed: 40

# Get administrative orders
bills <- get_ly_bills(
  term = 11,
  bill_type = "行政命令(層級)",
  show_progress = TRUE
)
#> Fetching data...
#> Data received successfully, processing...
#> Found 100 bills, converting...
#> 
  |                                                                      
  |                                                                |   0%
  |                                                                      
  |=                                                               |   1%
  |                                                                      
  |=                                                               |   2%
  |                                                                      
  |==                                                              |   3%
  |                                                                      
  |===                                                             |   4%
  |                                                                      
  |===                                                             |   5%
  |                                                                      
  |====                                                            |   6%
  |                                                                      
  |====                                                            |   7%
  |                                                                      
  |=====                                                           |   8%
  |                                                                      
  |======                                                          |   9%
  |                                                                      
  |======                                                          |  10%
  |                                                                      
  |=======                                                         |  11%
  |                                                                      
  |========                                                        |  12%
  |                                                                      
  |========                                                        |  13%
  |                                                                      
  |=========                                                       |  14%
  |                                                                      
  |==========                                                      |  15%
  |                                                                      
  |==========                                                      |  16%
  |                                                                      
  |===========                                                     |  17%
  |                                                                      
  |============                                                    |  18%
  |                                                                      
  |============                                                    |  19%
  |                                                                      
  |=============                                                   |  20%
  |                                                                      
  |=============                                                   |  21%
  |                                                                      
  |==============                                                  |  22%
  |                                                                      
  |===============                                                 |  23%
  |                                                                      
  |===============                                                 |  24%
  |                                                                      
  |================                                                |  25%
  |                                                                      
  |=================                                               |  26%
  |                                                                      
  |=================                                               |  27%
  |                                                                      
  |==================                                              |  28%
  |                                                                      
  |===================                                             |  29%
  |                                                                      
  |===================                                             |  30%
  |                                                                      
  |====================                                            |  31%
  |                                                                      
  |====================                                            |  32%
  |                                                                      
  |=====================                                           |  33%
  |                                                                      
  |======================                                          |  34%
  |                                                                      
  |======================                                          |  35%
  |                                                                      
  |=======================                                         |  36%
  |                                                                      
  |========================                                        |  37%
  |                                                                      
  |========================                                        |  38%
  |                                                                      
  |=========================                                       |  39%
  |                                                                      
  |==========================                                      |  40%
  |                                                                      
  |==========================                                      |  41%
  |                                                                      
  |===========================                                     |  42%
  |                                                                      
  |============================                                    |  43%
  |                                                                      
  |============================                                    |  44%
  |                                                                      
  |=============================                                   |  45%
  |                                                                      
  |=============================                                   |  46%
  |                                                                      
  |==============================                                  |  47%
  |                                                                      
  |===============================                                 |  48%
  |                                                                      
  |===============================                                 |  49%
  |                                                                      
  |================================                                |  50%
  |                                                                      
  |=================================                               |  51%
  |                                                                      
  |=================================                               |  52%
  |                                                                      
  |==================================                              |  53%
  |                                                                      
  |===================================                             |  54%
  |                                                                      
  |===================================                             |  55%
  |                                                                      
  |====================================                            |  56%
  |                                                                      
  |====================================                            |  57%
  |                                                                      
  |=====================================                           |  58%
  |                                                                      
  |======================================                          |  59%
  |                                                                      
  |======================================                          |  60%
  |                                                                      
  |=======================================                         |  61%
  |                                                                      
  |========================================                        |  62%
  |                                                                      
  |========================================                        |  63%
  |                                                                      
  |=========================================                       |  64%
  |                                                                      
  |==========================================                      |  65%
  |                                                                      
  |==========================================                      |  66%
  |                                                                      
  |===========================================                     |  67%
  |                                                                      
  |============================================                    |  68%
  |                                                                      
  |============================================                    |  69%
  |                                                                      
  |=============================================                   |  70%
  |                                                                      
  |=============================================                   |  71%
  |                                                                      
  |==============================================                  |  72%
  |                                                                      
  |===============================================                 |  73%
  |                                                                      
  |===============================================                 |  74%
  |                                                                      
  |================================================                |  75%
  |                                                                      
  |=================================================               |  76%
  |                                                                      
  |=================================================               |  77%
  |                                                                      
  |==================================================              |  78%
  |                                                                      
  |===================================================             |  79%
  |                                                                      
  |===================================================             |  80%
  |                                                                      
  |====================================================            |  81%
  |                                                                      
  |====================================================            |  82%
  |                                                                      
  |=====================================================           |  83%
  |                                                                      
  |======================================================          |  84%
  |                                                                      
  |======================================================          |  85%
  |                                                                      
  |=======================================================         |  86%
  |                                                                      
  |========================================================        |  87%
  |                                                                      
  |========================================================        |  88%
  |                                                                      
  |=========================================================       |  89%
  |                                                                      
  |==========================================================      |  90%
  |                                                                      
  |==========================================================      |  91%
  |                                                                      
  |===========================================================     |  92%
  |                                                                      
  |============================================================    |  93%
  |                                                                      
  |============================================================    |  94%
  |                                                                      
  |=============================================================   |  95%
  |                                                                      
  |=============================================================   |  96%
  |                                                                      
  |==============================================================  |  97%
  |                                                                      
  |=============================================================== |  98%
  |                                                                      
  |=============================================================== |  99%
  |                                                                      
  |================================================================| 100%
#> 
#> Conversion complete!
#> Processing complete! Total bills processed: 100