This file contains hidden or 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
# https://stats.oarc.ucla.edu/other/mult-pkg/faq/general/faq-how-do-i-interpret-odds-ratios-in-logistic-regression/ | |
dados = matrix(c(74, 17, 77, 32), ncol = 2) | |
dados | |
dimnames(dados) <- list(voto = c("Normal","Menção Honrosa"), | |
sexo = c("Masculino","Feminino")) | |
dados | |
mosaicplot(dados, color = c("skyblue", "pink"), xlab ="Menção Honrosa", | |
ylab = "Sexo") |
This file contains hidden or 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" | |
) |
This file contains hidden or 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(dplyr) | |
percentual <- CARROS %>% | |
pull(TipodeMarcha) %>% | |
table() %>% | |
prop.table()*100 | |
percentual <- round(percentual,digits = 1) | |
rotulo <- paste0(percentual,"%") | |
#GRÁFICO DE BARRA | |
bp<- CARROS %>% | |
pull(TipodeMarcha) %>% |
This file contains hidden or 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
rm(list=ls(all=TRUE)) # Limpar memória do R | |
# ---------------------------------------# | |
# Georreferenciamente e Mapas # | |
# dos Locais dos Núcleos - Qualifica RJ # | |
# Por Vinicius Israel # | |
# Em 22/04/2023 # | |
# ---------------------------------------# | |
library(ggplot2) # Pacote gráfico | |
library(googleway) # Pacote para o Google Maps |
This file contains hidden or 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
# Extracting 5 words before and after an specific word | |
library(stringr) | |
txt <- "POEMA EM LINHA RETA Nunca conheci quem tivesse levado porrada. Todos os meus conhecidos têm sido campeões em tudo. | |
E eu, tantas vezes reles, tantas vezes porco, tantas vezes vil, Eu tantas vezes irrespondivelmente parasita, Indesculpavelmente sujo, Eu, que tantas vezes não tenho tido paciência para tomar banho, Eu, que tantas vezes tenho sido ridículo, absurdo, Que tenho enrolado os pés publicamente nos tapetes das etiquetas, Que tenho sido grotesco, mesquinho, submisso e arrogante, Que tenho sofrido enxovalhos e calado, Que quando não tenho calado, tenho sido mais ridículo ainda; Eu, que tenho sido cômico às criadas de hotel, Eu, que tenho sentido o piscar de olhos dos moços de fretes, Eu, que tenho feito vergonhas financeiras, pedido emprestado sem pagar, Eu, que, quando a hora do soco surgiu, me tenho agachado Para fora da possibilidade do soco; Eu, que tenho sofrido a angústia das pequenas coisas ridículas, Eu verifico que não |
This file contains hidden or 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
variável resposta: | |
hon, indicando se um aluno está em uma turma de elite ou não. | |
variável explicativa: | |
gênero indicando se é do sexo feminino ou não | |
table(sample$hon) | |
49/151 | |
151/49 | |
chance = P/(1-P) |
This file contains hidden or 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
n = (z^2 * p * (1-p)) / (e^2) | |
n = (1,96^2 * 0,5 * (1-0,5)) / (0,05^2) | |
n = (3,8416 * 0,25) / 0,0025 | |
n = 0,9604 / 0,0025 | |
n = 384,16 | |
This file contains hidden or 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: "Untitled" | |
format: html | |
editor: visual | |
--- | |
```{css,echo=FALSE} | |
html, body { | |
height: 100%; |
This file contains hidden or 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
p = 0.2 | |
n = 2400 | |
x = rbinom(n, 1, p) | |
x | |
mean(x) | |
sd(x) | |
sqrt(2400) | |
qnorm(0.975) |
This file contains hidden or 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
bairros <- geojsonio::geojson_read("https://github.com/DATAUNIRIO/Mapas_e_Shapesfiles/raw/master/rio/Limite_de_Bairros.geojson", what = "sp") | |
class(bairros) | |
names(bairros) | |
library(leaflet) | |
m %>% | |
m = leaflet(bairros) %>% | |
addTiles() %>% |
NewerOlder