This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Lab01" | |
format: | |
html: | |
toc: true | |
code-fold: show | |
embed-resources: true | |
engine: knitr | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pegando os links pelo CKAN ---------------------------------------------- | |
## não sei usar o ckanr corretamente... | |
#ckanr::ckanr_setup("https://dadosabertos.tse.jus.br/dataset/resultados-2024-boletim-de-urna") | |
#ckanr::package_list(url = "https://dadosabertos.tse.jus.br/dataset/") | |
library(tidyverse) | |
url_download <- paste0( | |
"https://cdn.tse.jus.br/estatistica/sead/eleicoes/eleicoes2024", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pegando os links pelo CKAN ---------------------------------------------- | |
## não sei usar o ckanr corretamente... | |
#ckanr::ckanr_setup("https://dadosabertos.tse.jus.br/dataset/resultados-2024-boletim-de-urna") | |
#ckanr::package_list(url = "https://dadosabertos.tse.jus.br/dataset/") | |
library(tidyverse) | |
url_download <- paste0( | |
"https://cdn.tse.jus.br/estatistica/sead/eleicoes/eleicoes2024", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# r para ciencia de dados 1 | |
## import | |
## transformação de dados | |
## análises (estatísticas básicas etc) | |
# visualização | |
## ggplot2, extensões | |
# r para ciencia de dados 2 | |
## mudando a forma da base, pivotagem, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
link_dados <- "https://github.com/jtrecenti/main-cdad2/releases/download/data/camaras.csv" | |
camaras <- read_csv(link_dados) | |
glimpse(camaras) | |
camaras$ementa[2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
link_dados <- "https://github.com/jtrecenti/main-cdad2/releases/download/data/camaras.csv" | |
camaras <- read_csv(link_dados) | |
glimpse(camaras) | |
camaras$ementa[2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
u <- "https://consumidor.gov.br/pages/indicador/relatos/consultar" | |
parametros <- list( | |
indicePrimeiroResultado = 0, | |
palavrasChave = "", | |
segmentoMercado = 4, | |
fornecedor = "", | |
regiao = "", | |
area = "", | |
assunto = "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("yfR") | |
da <- yfR::yf_get( | |
"AMER3.SA", | |
first_date = "2024-05-15", | |
last_date = "2024-06-04" | |
) |> | |
dplyr::mutate( | |
price_close = price_close / 100, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("remotes") | |
# remotes::install_github("jjesusfilho/tjsp") | |
# processo a ser acessado | |
processo <- "15012667120228260617" | |
# autenticação: precisa fazer uma vez por sessão, apenas | |
tjsp::autenticar("CPF", "SENHA") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tibble::tibble() | |
tribunais <- forosCNJ::da_tribunal |> | |
dplyr::filter(id_justica == 8) |> | |
dplyr::pull(sigla) |> | |
tolower() | |
endpoints <- glue::glue( | |
"https://api-publica.datajud.cnj.jus.br/api_publica_{tribunais}/_search" | |
) |
NewerOlder