Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
prob_diaria <- function(dias_passados){ | |
dia_quantile <- seq(from = -2, | |
to = 2, | |
length.out = 30) | |
prob <- pnorm(dia_quantile) | |
prob <- c(prob[1], prob[2:29] - prob[1:28], prob[1]) | |
d <- data.frame(dia = (40 * 7 - 15):(40 * 7 + 14), | |
prob) | |
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(RSelenium) | |
library(rvest) | |
library(stringr) | |
library(dplyr) | |
remDr <- remoteDriver(port = 4445L) | |
remDr$open(silent = TRUE) | |
url_prato_aberto <- "https://pratoaberto.sme.prefeitura.sp.gov.br/" | |
remDr$navigate(url_prato_aberto) |
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(dplyr) | |
library(rvest) | |
library(stringr) | |
url_tabela_discursos <- "http://www.camara.leg.br/internet/sitaqweb/resultadoPesquisaDiscursos.asp?txOrador=&txPartido=&txUF=&dtInicio=17%2F04%2F2016&dtFim=17%2F04%2F2016&txTexto=&txSumario=&basePesq=plenario&CampoOrdenacao=dtSessao&PageSize=5000&TipoOrdenacao=DESC&btnPesq=Pesquisar" | |
url_discursos <- url_tabela_discursos %>% | |
read_html() %>% | |
html_nodes(xpath = "//table[@class ='table table-bordered variasColunas']//td/a") %>% | |
html_attr(name = "href") |
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(rvest) | |
library(stringr) | |
library(dplyr) | |
library(purrr) | |
library(tm) | |
library(wordcloud) | |
library(tidytext) | |
library(ggplot2) | |
url_obra_completa <- "http://machado.mec.gov.br/obra-completa-mainmenu-123" |
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
/* Autor: Leonardo Sangali Barone (CEBRAP/DCP-USP) */ | |
/* Data: 05/03/2017 */ | |
/* Criação de database e tabela para dados de matricula no MySQL */ | |
/* Cria database CIEDU */ | |
CREATE database CIEDU; | |
/* Cria tabela matriculas_2010_2016 */ | |
/* Dados disponiveis em http://dados.prefeitura.sp.gov.br/dataset/microdados-da-rede-municipal-de-ensino-matriculas */ | |
USE CIEDU; |
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(dplyr, quietly = T) | |
library(data.table, quietly = T) | |
library(purrr, quietly = T) | |
library(rvest, quietly = T) | |
get_tse <- function(url_repo){ | |
temp_dir <- tempdir() | |
temp_file <- tempfile() | |
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(rvest) | |
library(purrr) | |
stf_incidente <- function(tipo, numero){ | |
stf_session <- html_session("http://www.stf.jus.br/portal/processo/listarProcesso.asp") | |
stf_session$url <- "http://www.stf.jus.br/portal/processo/listarProcesso.asp" | |
stf_form <- html_form(read_html(stf_session))[[3]] | |
stf_form <- set_values(stf_form, | |
numero = numero) | |
stf_submission <- submit_form(stf_session, stf_form) |
NewerOlder