Skip to content

Instantly share code, notes, and snippets.

View jlopezper's full-sized avatar

Jorge López Pérez jlopezper

View GitHub Profile
library(tidyverse)
library(lubridate)
tst <- readr::read_csv('https://raw.githubusercontent.com/washingtonpost/data-police-shootings/master/fatal-police-shootings-data.csv')
tst1 <-
tst %>%
filter(race != 'N', year(date) < 2020) %>%
mutate(Raza = ifelse(race == 'W', 'Blancos', 'Otros')) %>%
filter(armed == 'unarmed') %>%
import pandas_datareader as pdr
import matplotlib.pyplot as plt
from statsmodels.tsa.stattools import adfuller
from statsmodels.graphics.tsaplots import plot_acf
import seaborn as sns
import warnings
from statsmodels.tsa.arima_model import ARIMA
from sklearn.metrics import mean_squared_error
warnings.filterwarnings("ignore")
library(tidyverse)
library(osmdata) # package for working with streets
library(showtext) # for custom fonts
library(ggmap)
library(rvest)
big_streets <- getbb("Canarias") %>%
opq()%>%
add_osm_feature(key = "highway",