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) | |
# DMC | |
agrometR::estaciones_agromet | |
agrometR::estaciones_dmc |> | |
filter(str_detect(nombreEstacion, "uinta")) | |
data <- agrometR::get_agro_data_dmc( |
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(ranger) | |
data("mtcars") | |
regularized_rf <- ranger(mpg ~ ., | |
data = mtcars, | |
num.trees = 500, | |
# num.threads = 1, # needs to be set to | |
# avoid parallelization | |
mtry = 7, | |
importance = "impurity", |
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
ls <- red_sample$geometry %>% head(1) | |
dem <- dem | |
C <- 0.6 | |
tobler_calle2 <- function(ls, dem, C){ | |
# puntos <- puntos_ordenados(ls,dem) | |
# puntos <- todos_los_puntos(ls, dem) | |
pts_orig <- ls %>% | |
st_cast('POINT') %>% |
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(shiny) | |
library(leaflet) | |
library(dplyr) | |
library(shinythemes) | |
library(shinyjs) | |
dbip <- readRDS("dbip.rds") | |
comuna_lista <- dbip %>% | |
distinct(comuna) %>% |
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
# setup ------------------------------------------------------------------- | |
library(readxl) | |
library(tidyverse) | |
library(janitor) | |
library(leaflet) | |
# recuerden que la expresion hola::chao | |
# es la funcion 'chao' del paquete 'hola' | |
# no se pudo encontrar la función "hola" |
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(shiny) | |
library(forecast) | |
library(xts) | |
library(tradestatistics) | |
library(ggplot2) | |
# este es un input ficticio (posible) con el cual yo haré pruebas de mi código | |
# input <- list(pais = "chn") | |
ui <- fluidPage( |
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(shiny) | |
library(tidyverse) | |
library(leaflet) | |
dbip <- readRDS("data/dbip.rds") | |
lista_comunas <- dbip %>% | |
count(COMUNA, sort = TRUE) %>% | |
pull(COMUNA) |
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(readxl) | |
dbip <- read_xlsx("data/pcma20201028oficio-47702013.xlsx", skip = 7) | |
# como leer más de una hoja | |
# readxl::excel_sheets() | |
# readxl::excel_sheets("data/pcma20201028oficio-47702013.xlsx") | |
dbip |
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(lubridate) | |
library(highcharter) | |
confirmed <- read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv") | |
get_data <- function(url = "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Deaths.csv"){ | |
data_wide <- read_csv(url) |
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(tidytext) | |
library(rvest) | |
# obtiene el número de páginas por empresa | |
get_n_pages_from_empresa <- function(empresa = "falabella") { | |
message(empresa) | |
url <- read_html(file.path("https://www.reclamos.cl/empresa", empresa)) |
NewerOlder