Package 'sotu'

Title: United States Presidential State of the Union Addresses
Description: The President of the United States is constitutionally obligated to provide a report known as the 'State of the Union'. The report summarizes the current challenges facing the country and the president's upcoming legislative agenda. While historically the State of the Union was often a written document, in recent decades it has always taken the form of an oral address to a joint session of the United States Congress. This package provides the raw text from every such address with the intention of being used for meaningful examples of text analysis in R. The corpus is well suited to the task as it is historically important, includes material intended to be read and material intended to be spoken, and it falls in the public domain. As the corpus spans over two centuries it is also a good test of how well various methods hold up to the idiosyncrasies of historical texts. Associated data about each address, such as the year, president, party, and format, are also included.
Authors: Taylor B. Arnold [aut, cre]
Maintainer: Taylor B. Arnold <[email protected]>
License: GPL-2
Version: 1.0.4
Built: 2024-11-08 02:40:16 UTC
Source: https://github.com/statsmaths/sotu

Help Index


sotu: State of the Union Addresses

Description

The President of the United States is constitutionally obligated to provide a report of the current state of country. While historically this could be a written document, in modern times this has always taken the form of an oral address to a joint session of the US Congress. This package provides the raw text from every State of the Union address, with the intention of being used for meaningful examples of text analysis in R. This corpus is well-suited to the task as a it historically important, includes both material intended to be read and material intended to be spoken, and it falls in the public domain. As the corpus spans over two centuries it is also a good test of how well various methods hold up to the idiosyncrasies of historical texts.

Details

A metadata table containing information about each speech is also included in the package. This includes information about the date and president giving the address. Note that some of the addresses contained in the archive are not technically State of the Union Addresses, but are more general Addresses to a Joint Session of Congress. Usually these occur following a new president's inauguration, and are historically treated as no different than a standard State of the Union.

Author(s)

Maintainer: Taylor B. Arnold [email protected]

See Also

Useful links:


Save State of the Union Addresses in Directory

Description

This function saves the State of the Union Addresses to disk, with one address in each file. Useful for testing and demonstrating text analysis functions that read from files.

Usage

sotu_dir(dir = tempfile())

Arguments

dir

an optional directory of where the files should be saved. Otherwise, a temporary location is used. Will be created if it does not exist. Note that these temporary files are erased (eventually) after exiting R.

Value

a character vector with complete paths to the texts

Author(s)

Taylor B. Arnold, [email protected]

Examples

fp <- sotu_dir()
txt <- readLines(fp[200])
txt

Metadata from State of the Union Addresses

Description

A data frame containing one row per State of the Union Address. These line up with the elements in sotu_text.

References

The American Presidency Project, UCSB


State of the Union Address Text

Description

A character vector with one State of the Union in each element. These line up with the rows of the data in sotu_meta.

References

The American Presidency Project, UCSB