Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Roberto Salas robsalasco

🏠
Working from home
View GitHub Profile
View variable_res8.csv
h3 valor
88b2c55437fffff 3631
88b2c55435fffff 4226
88b2c555cbfffff 1145
88b2c555ddfffff 2334
88b2c555d9fffff 251309
88b2c55433fffff 198530
88b2c55431fffff 2574
88b2c5543dfffff 308847
88b2c55423fffff 3058
View redatam_rvest.R
library(httr)
library(rvest)
headers <- add_headers(
"User-Agent" = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36",
"Referer" = "https://redatam-ine.ine.cl/redbin/RpWebStats.exe/CmdSet?BASE=CENSO_2017&ITEM=PROGRED&lang=esp",
"Host" = "redatam-ine.ine.cl",
"X-Requested-With" = "XMLHttpRequest"
)
View network_graph.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 1_descriptive_analysis_r.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View test.R
library(geojsonio)
library(dplyr)
library(purrr)
library(stringr)
d <- geojsonio::geojson_read("https://raw.githubusercontent.com/robsalasco/precenso_2016_geojson_chile/master/Comunas/R01.geojson", method = "local", what = "sp")
regiones_names_list <- c("region_id", "region_name")
provincias_names_list <- c("region_id", "provincia_id",
View redatam_rvest.R
library(httr)
library(rvest)
headers <- add_headers(
"User-Agent" = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36",
"Referer" = "https://redatam-ine.ine.cl/redbin/RpWebStats.exe/CmdSet?BASE=CENSO_2017&ITEM=PROGRED&lang=esp",
"Host" = "redatam-ine.ine.cl",
"X-Requested-With" = "XMLHttpRequest"
)
View redatam_rvest.R
# Proof of concept - Extract data from REDATAM web interface (CENSUS 2017) directly to R
library(httr)
library(rvest)
headers <- add_headers(
"User-Agent" = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36",
"Referer" = "https://redatam-ine.ine.cl/redbin/RpWebStats.exe/AreaList?BASE=CENSO_2017&ITEM=AREAPOB&lang=esp",
"Host" = "redatam-ine.ine.cl",
"X-Requested-With" = "XMLHttpRequest"
View redatam_rvest.R
library(httr)
library(rvest)
headers <- add_headers(
"User-Agent" = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36",
"Referer" = "https://redatam-ine.ine.cl/redbin/RpWebStats.exe/AreaList?BASE=CENSO_2017&ITEM=AREAPOB&lang=esp",
"Host" = "redatam-ine.ine.cl",
"X-Requested-With" = "XMLHttpRequest"
)
View detect values in demands.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View detect values in demands.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.