This package is an R wrapper for the FBI Crime API, it aims to provide an easy access for R users to the most updated data about offense, offender, victim, and arrest from the API. It also makes it possible to query multiple keywords at one time and return a combined data frame.
# install.packages("devtools")
library(devtools)
install_github("SUN-Wenjun/fbicrime")
library(fbicrime)
You need to get a key for the API at https://api.data.gov/signup/
Then you can access FBI crime data by calling functions in this package. You can either input your API key each time when use functions or save it as a global variable in your R session using function set_fbi_crime_api_key('')
.
After install and library this package, you can also access to the help document of each function by excuting
?function_name