View source: R/get_fogocruzado.R
get_fogocruzado | R Documentation |
get_fogocruzado()
extracts data from shootings and fire gun shots
from Fogo Cruzado's API (https://api.fogocruzado.org.br/).
The function returns a data.frame
where each observation corresponds
to an occurrence.
get_fogocruzado(
city = NULL,
initial_date = Sys.Date() - months(6),
final_date = Sys.Date(),
state = c("PE", "RJ"),
security_agent = c(0:1)
)
city |
City ( |
initial_date |
initial date to filter occurrences starting from a certain day.
|
final_date |
final date to filter occurrences up until in a certain day.
|
state |
State abbreviation in capital letters ( |
security_agent |
Number ( |
A data.frame
with 67 columns. They are described in English
and in Portuguese.
get_cities
fogocruzado_signin
# returns a data.frame with all occurrences in the data repository over the last 210 days
## Not run:
df <- get_fogocruzado()
## End(Not run)
# returns a data.frame with all occurrences in the city of Belford Roxo
# starting in January 1st, 2017 and finishing in June 30th, 2018.
## Not run:
df <- get_fogocruzado(city = "Belford Roxo", initial_date = "2017-01-01", final_date = "2018-06-31")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.