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(rvest) | |
library(ggimage) | |
library(lubridate) | |
#get first 25 leagues in Europe ---- | |
url <- "https://www.transfermarkt.de/wettbewerbe/europa" | |
doc <- read_html(url) | |
leagues <- doc %>% html_nodes(".hauptlink a") %>% html_attr("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
#install UMAP from https://github.com/lmcinnes/umap | |
#install.packages("rPython") | |
umap <- function(x,n_neighbors=10,n_components=2,min_dist=0.1,metric="euclidean"){ | |
x <- as.matrix(x) | |
colnames(x) <- NULL | |
rPython::python.exec( c( "def umap(data,n,d,mdist,metric):", | |
"\timport umap" , | |
"\timport numpy", | |
"\tembedding = umap.UMAP(n_neighbors=n,n_components=d,min_dist=mdist,metric=metric).fit_transform(data)", |
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
#include <Rcpp.h> | |
using namespace Rcpp; | |
// [[Rcpp::export]] | |
double SampleEntropy(NumericVector data, int m, double r, int N, double sd) | |
{ | |
int Cm = 0, Cm1 = 0; | |
double err = 0.0, sum = 0.0; | |
err = sd * r; |
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
Name | Biermarke | Long | Lat | |
---|---|---|---|---|
Augustiner-Keller | Augustiner | 11.551223 | 48.14374 | |
Aujäger | Hacker Pschorr | 11.44961 | 47.919287 | |
Alte Villa | Kaltenberger | 11.098123 | 48.026349 | |
Alter Wirt Krailling | Augustiner | 11.417515 | 48.098479 | |
Alter Wirt Etterschlag | Paulaner | 11.200658 | 48.086221 | |
Alter Wirt Moosach | Hofbräu | 11.51235 | 48.180948 | |
Alter Wirt Ramersdorf | Augustiner | 11.614319 | 48.114996 | |
Ayinger Ottobrunn | Ayinger | 11.6647398 | 48.0651976 | |
Bergl | Hacker Pschorr | 11.567563 | 48.260538 |
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
################################################################################ | |
# replication of https://i.redd.it/q0udc4wfhvjz.gif | |
# originally posted to r/dataisbeautiful by u/Tjukanov | |
################################################################################ | |
library(tidyverse) | |
library(gganimate) | |
library(lubridate) | |
#data from: https://www.ncdc.noaa.gov/ibtracs/index.php?name=wmo-data | |
df <- read_csv("Allstorms.ibtracs_wmo.v03r09.csv") |
NewerOlder