This file contains hidden or 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(rvest) | |
library(tidyverse) | |
leagues <- "http://www.footballsquads.co.uk/archive.htm" %>% | |
read_html() %>% | |
html_nodes("a") %>% | |
html_attr("href") | |
leagues_tbl <- as_tibble(str_split(leagues,"/",simplify = T)) %>% | |
mutate(link=leagues) %>% |
This file contains hidden or 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 hidden or 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 hidden or 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
//MIT License | |
//Copyright (c) 2024 David Schoch | |
//Permission is hereby granted, free of charge, to any person obtaining a copy | |
//of this software and associated documentation files (the "Software"), to deal | |
//in the Software without restriction, including without limitation the rights | |
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
//copies of the Software, and to permit persons to whom the Software is | |
//furnished to do so, subject to the following conditions: |
This file contains hidden or 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 hidden or 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