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(data.table) | |
library(readxl) | |
library(tidyverse) | |
library(stringi) | |
library(magrittr) | |
library(sf) | |
library(geosphere) | |
#### Importacao dos dados #### | |
# arquivos originais extraidos do endereco abaixo |
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: "Aula 4.1 - Modelagem" | |
output: | |
html_notebook: | |
css: custom.css | |
number_sections: yes | |
toc: yes | |
toc_float: true | |
--- |
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
### Módulo 2 | |
### Matriz de adjacência | |
library(igraph) | |
library(igraphdata) | |
# exemplo de matriz de adjacencia | |
data("karate") | |
karate | |
# transformar grafo em matriz de adjacencia | |
igraph::as_adjacency_matrix(karate) |
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
nrbf <- function(X, Y, X_test = X, k = ncol(X), gamma = 1.0, seed = 123, plot = TRUE){ | |
library(corpcor) | |
library(neuralnet) | |
set.seed(seed) | |
#### Definição dos argumentos: | |
# X: Matriz de input | |
# Y: Matriz de output | |
# k: número de centros (polos) | |
# gamma: parametro de aprendizado | |
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) | |
library(igraph) | |
library(ggraph) | |
library(abjutils) | |
df <- read_rds("data/socios_cvm.rds") | |
glimpse(df) | |
df_clean <- df %>% | |
filter(tipo == "02") %>% |
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
# https://github.com/Selbosh/user2017 | |
library(tidyverse) | |
library(rvest) | |
library(xml2) | |
library(ggraph) | |
library(igraph) | |
# https://rud.is/dl/r-bloggers-feedly-streams.rds | |
df <- read_rds("r-bloggers-feedly-streams.rds") |
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) | |
library(fs) | |
dir_path <- "projetos/site-master/content/blog/" | |
dir_info(dir_posts, recursive = TRUE) %>% | |
head() %>% | |
knitr::kable() | |
rmd_or_r_file_paths_tbl <- dir_info(dir_path, recursive = T) %>% |
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: "Aula 3: Gráficos no R" | |
output: | |
html_notebook: | |
css: custom.css | |
number_sections: yes | |
toc: yes | |
toc_float: true | |
--- |
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
# devtools::install_github("timelyportfolio/sunburstR") | |
library(tidyverse) | |
library(sunburstR) | |
sequences <- read.csv( | |
system.file("examples/visit-sequences.csv",package="sunburstR") | |
,header = FALSE | |
,stringsAsFactors = FALSE | |
)[1:200,] |
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(tabulizer) | |
library(tidyverse) | |
arquivo <- "C:/Users/sillas.gonzaga/Downloads/gsa.pdf" | |
tab <- tabulizer::extract_tables(arquivo, encoding = "UTF-8", method = "lattice") | |
map(tab,dim) | |
# extrair tabelas com 8 colunas |