#' Get Camara dos Deputados Organizations
#'
#' @description Returns a data frame that lists internal Camara dos Deputados organizations
#' (committees for example) and respective identification codes from the web
#' service. This function does not require any parameters.
#'
#' @return A data frame with information on Camara dos Deputados organizations.
#'
#' @author Leonardo Sangali Barone; Alexia Aslan
#'
#' @note The output of this function can be used as a parameter in functions that require
#' the type of proposals.
#'
#' @import httr XML dplyr
#'
#' @examples
#'
#' obterOrgaos()
#'
#' @rdname obterOrgaos
#' @export
obterOrgaos <- function(){
parsedOutput <- xmlParse(GET('http://www.camara.gov.br/SitCamaraWS/Orgaos.asmx/ObterOrgaos?'))
tempdf <- (xmlAttributesToDataFrame(parsedOutput, "//orgao"))
tempdf[, 3] <- str_trim(tempdf[, 3]) # remove unnecessary spaces in SIGLA column
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.