A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rOpenGov/usdoj below:

rOpenGov/usdoj: For Accessing U.S. Department of Justice (DOJ) Open Data

usdoj: Accessing U.S. Department of Justice (DOJ) API Data

usdoj fetches blog entries and press releases from the United States Department of Justice API. Optional parameters let users choose how many results to return, whether to start from the earliest or latest publications, and whether to include only results that contain specific keywords. Data is cleaned and structured for analysis and returned in a dataframe.

Install from CRAN:

install.packages("usdoj")

Install from the rOpenGov universe:

# Enable repository from ropengov
options(repos = c(
  ropengov = 'https://ropengov.r-universe.dev',
  CRAN = 'https://cloud.r-project.org'))
  
# Download and install usdoj
install.packages("usdoj")

doj_press_releases() returns a dataframe with the following fields:

doj_blog_entries() returns a dataframe with the following fields:

Argument Description n_results The number of results to return. By default, 50 results are returned. search_direction Set to ASC or DESC to fetch data starting from the most or least recent entries. By default, data is sorted in descending order (the most recent entries). keyword Only return results containing a keyword. Keyword can be a single word, a list or words, or a regex separated by the pipe delimiter clean Set to FALSE to return data without additional cleaning. By default HTML tags, white space, line breaks, and other messy characters are removed. Epoch time is converted to year-month-day format.

Load usdoj.

Return a dataframe with 50 of the latest recorded blog entries recorded. Data is cleaned.

Return a dataframe with 10 of the latest recorded press releases. Data is not cleaned.

doj_press_releases(n_results = 10, search_direction = "DESC", clean = FALSE)

Return a dataframe with 50 of the latest recorded blog entries where the body text includes keyword(s).

doj_blog_entries(keyword = c("weapons", "firearms"))

Please cite the package as follows:

Buongiorno S (2023). usdoj: For Accessing U.S. Department of Justice (DOJ) Open Data. https://github.com/stephbuon/usdoj, https://ropengov.github.io/usdoj/, https://github.com/rOpenGov/usdoj.

BibTeX:

@Manual{,
  title = {usdoj: For Accessing U.S. Department of Justice (DOJ) Open Data},
  author = {Steph Buongiorno},
  year = {2023},
  note = {https://github.com/stephbuon/usdoj,
https://ropengov.github.io/usdoj/, https://github.com/rOpenGov/usdoj},
}

See my website for more projects.

Note

usdoj manages request rate limits in compliance with the Department of Justice API.

Disclaimer

This package is not officially related to or endorsed by the U.S. Department of Justice.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4