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
from requests import get | |
from lxml import html, etree | |
import camelot | |
import pandas as pd | |
import numpy as np | |
url = 'https://www.minsal.cl/nuevo-coronavirus-2019-ncov/casos-confirmados-en-chile-covid-19/' | |
response = get(url) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
h3 | valor | |
---|---|---|
88b2c55437fffff | 3631 | |
88b2c55435fffff | 4226 | |
88b2c555cbfffff | 1145 | |
88b2c555ddfffff | 2334 | |
88b2c555d9fffff | 251309 | |
88b2c55433fffff | 198530 | |
88b2c55431fffff | 2574 | |
88b2c5543dfffff | 308847 | |
88b2c55423fffff | 3058 |
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(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" | |
) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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", |
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(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" | |
) |
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
# 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" |