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
{ | |
"error": null, | |
"data": { | |
"_id": 85816722, | |
"type": "ELECTIONS-LOCAL-PROVINCE", | |
"title": "Wyniki", | |
"image": null, | |
"image_logo": null, | |
"image_different": null, | |
"show_more": null, |
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
{ | |
"error": null, | |
"data": { | |
"_id": 85815311, | |
"type": "ELECTIONS-LOCAL-DEMOGRAPHIC-FREQUENCY", | |
"title": "DANE DEMOGRAFICZNE", | |
"image": null, | |
"image_logo": null, | |
"image_different": null, | |
"show_more": null, |
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
{ | |
"error": null, | |
"data": { | |
"_id": 85815263, | |
"type": "ELECTIONS-LOCAL-PROVINCE-FREQUENCY", | |
"title": "Województwa", | |
"image": null, | |
"image_logo": null, | |
"image_different": null, | |
"show_more": null, |
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
{ | |
"error": null, | |
"data": { | |
"_id": 85815311, | |
"type": "ELECTIONS-LOCAL-DEMOGRAPHIC-FREQUENCY", | |
"title": "DANE DEMOGRAFICZNE", | |
"image": null, | |
"image_logo": null, | |
"image_different": null, | |
"show_more": null, |
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
{ | |
"error": null, | |
"data": { | |
"_id": 85816722, | |
"type": "ELECTIONS-LOCAL-PROVINCE", | |
"title": "Wyniki", | |
"image": null, | |
"image_logo": null, | |
"image_different": null, | |
"show_more": null, |
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
{ | |
"0": { | |
"name": "Polska", | |
"candidates": [ | |
{ | |
"support": 30.8, | |
"key": "TRZASKOWSKI" | |
}, | |
{ | |
"support": 29.1, |
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(stringr) | |
library(data.table) | |
library(writexl) | |
noc <- read_html("https://nocmuzeow.poznan.pl") | |
noc |> | |
html_nodes("div[id='muzeum']") |> | |
html_nodes("li > a") |> | |
#html_nodes("a") |> |
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
## packages | |
library(WeightIt) | |
library(mvnfast) | |
library(marginaleffects) | |
######## ATE | |
## function taken from the paper Sant'Anna, P. H., Song, X., & Xu, Q. (2022). Covariate distribution balance via propensity scores. Journal of Applied Econometrics, 37(6), 1093-1120. | |
## in particular from here: http://qed.econ.queensu.ca/jae/datasets/santanna001/ | |
cbps_sim_data <- function(n, dgp, scale.ps = 1, y_nonlin = FALSE){ |
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("misclassGLM") | |
library("data.table") | |
library("simex") | |
## population definition | |
set.seed(2024) | |
N <- 100000 | |
pop_data <- data.table(age = sample(c("Young", "Middle-aged", "Old"), size = N, c(0.40, 0.35, 0.25), replace = T), | |
ethnic = sample(c("Native", "Nonnative"), size = N, prob = c(0.85, 0.15), replace = T)) |
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(RcppHNSW) | |
library(rnndescent) | |
library(tokenizers) | |
library(text2vec) | |
library(igraph) | |
## read and process data | |
census <- read.csv("https://raw.githubusercontent.com/djvanderlaan/tutorial-reclin-uros2021/main/data/census.csv") | |
cis <- read.csv("https://raw.githubusercontent.com/djvanderlaan/tutorial-reclin-uros2021/main/data/cis.csv") |
NewerOlder