Package 'kaigiroku'

Title: Programmatic Access to the API for Japanese Diet Proceedings
Description: Search and download data from the API for Japanese Diet Proceedings (see the reference at <https://kokkai.ndl.go.jp/api.html>).
Authors: Akitaka Matsuo [aut, cre]
Maintainer: Akitaka Matsuo <[email protected]>
License: GPL-3
Version: 0.5
Built: 2024-11-05 02:56:09 UTC
Source: https://github.com/amatsuo/kaigiroku

Help Index


Get speeches by meeting

Description

This function returns all speeches based on the specified conditions. Three parameters have to be specified. The first is the name of house (house). The second is the name of meeting in Japanese (meetingName) (e.g. "Yosan Inkai", "Honkaigi"). And the third is the time period. There are three ways to specifiy the time period (1. starting and ending date, 2. National Diet session number, and 3. year). If the specified conditions exceed the limit of the number of records for one API call (3 records per call), this function will repeatedly call the API until all records are obtained.

Usage

get_meeting(
  house = "Lower",
  sessionNumber = NA,
  startDate = NA,
  endDate = NA,
  year = NA,
  meetingName = NA,
  searchTerms = NA,
  verbose = TRUE,
  downloadMessage = FALSE,
  sleep = 3,
  meeting_list = FALSE
)

Arguments

house

Name of the house, value is "Upper" (Sangiin), "Lower" (Shugin), or "Both" (Ryouin).

sessionNumber

integer, session number.

startDate

starting date to obtain the record in the format of " (e.g. "1999-01-01"), if you specified session number, you cannot assign this option.

endDate

ending date to obtain the record in the format of " (e.g. "1999-01-01"), if you specified session number, you cannot assign this option.

year

integer, year of the record.

meetingName

name of the meeting in Japanese. example "Yosan iinkai", "Honkaigi".

searchTerms

search terms. either vector of search terms or a string of search terms separated by a space.

verbose

display detailed message about the download progress.

downloadMessage

show download.file() progress, default FALSE.

sleep

the length of break between each time to fetch the record (in seconds).

meeting_list

get the list of meeting, instead of actual speeches. Default FALSE.

Value

the function returns a data.frame of speeches.

Examples

## Not run: 
hm_122 <- get_meeting(meetingName = "\u904B\u8F38\u59D4\u54E1\u4F1A", sessionNumber = 126)
head(hm_122)

## End(Not run)

data on the National Diet sessions

Description

data on the National Diet sessions

Usage

session_info

Format

An object of class data.frame with 208 rows and 5 columns.