Real-time and Archives of Taiwan Legislative Data in R

codecov R-CMD-check Test
coverage pkgdown CodeFactor DOI

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/",
  out.width = "100%"
)
`legisTaiwan` is designed to streamline access to real-time archives of Taiwan's legislative data, drawing inspiration from the UK's TheyWorkForYou API. By providing straightforward access to the Taiwan Legislative Yuan API in R, this package not only aims to enhance legislative accountability and public transparency but also serves as a powerful tool for academic research. Scholars can easily retrieve and analyze legislative data including voting records, parliamentary questions, and bill proposals, facilitating quantitative research and empirical analysis. As the package interfaces directly with Legislative Yuan API endpoints, a stable internet connection is required. Users are welcome to contact the author for any API implementation assistance.
`legisTaiwan` 套件旨在簡化台灣立法院資料的即時存取,其設計理念來自於英國的 [`TheyWorkForYou API`](https://www.theyworkforyou.com/api/)。透過在 R 環境中提供直接連接立法院開放資料 API 的便捷管道,本套件不僅致力於提升立法問責制和公共透明度,更為學術研究者提供了系統化分析立法數據的工具。研究人員可以輕鬆獲取並分析立法委員的表決紀錄、問政質詢、法案提案等資料,有助於量化研究和實證分析。由於套件需要直接與立法院 API 介接,使用時請確保網路連線穩定。如有任何 API 使用上的問題,歡迎與套件我們聯繫。


Get Started with Using remotes:

install.packages("remotes")
remotes::install_github("davidycliao/legisTaiwan", force = TRUE)
library(legisTaiwan)
#> ## legisTaiwan                                            ##
#> ## An R package connecting to the Taiwan Legislative API. ##

Summary Descriptive of Taiwan Legilative Yuan API

library(legisTaiwan)
stats <- get_tly_stat()

Legislative Bills Statistics

analyze_bills(stats)

Legislative Meeting Statistics

analyze_meetings(stats)

Legislative Video (IVOD) Statistics

analyze_ivod(stats)


Notice: API Migration

The Legislative Yuan API has transitioned from `https://ly.govapi.tw` to `https://v2.ly.govapi.tw`. While we are still supporting functions that use the legacy API, please note that according to official notice, the old API endpoint will not be maintained. We recommend users to gradually transition to [the newer functions]() attached with API V2.




yl17124/legisTaiwan documentation built on Jan. 22, 2025, 8:47 p.m.