
Get Vehicle Brands from BrasilAPI (FIPE Data)
Source:R/get_brazil_vehicle_brands.R
get_brazil_vehicle_brands.Rd
This function retrieves a list of vehicle brands in Brazil using the BrasilAPI endpoint, which provides data sourced from FIPE (Fundação Instituto de Pesquisas Econômicas). The user must specify the type of vehicle: `"carros"`, `"motos"`, or `"caminhoes"`.
Value
A tibble (data frame) with the following columns:
nome
: Brand name.valor
: FIPE code of the brand.
Details
This function sends a GET request to the BrasilAPI endpoint and parses the list of vehicle brands.
If the API returns an error (e.g., invalid vehicle type), the function will return NULL
.
Examples
if (FALSE) { # \dontrun{
# Retrieve list of car brands
cars <- get_brazil_vehicle_brands("carros")
head(cars)
} # }