# Kod 4.3. Odczyt danych ze zbioru OECD-WeelBeing
library(openxlsx)
link="https://www.oecdregionalwellbeing.org/assets/downloads/OECD-Regional-Well-Being-Data-File.xlsx"
dane <- read.xlsx(link, startRow=9,colNames=FALSE,sheet = 4,rows=9:410,cols=2:17,na.strings="NA")
dane2=dane[,4:16]
dane2[dane2==".."]=NA
for (i in 1:13) {dane2[,i]=as.numeric(dane2[,i])}
dane[,4:16]=dane2
colnames(dane)<-c("Country","Region","Code","Labour","Employment","Unemployment", "Household", "Homicide", "Mortality", "Life", "Air","Voter","Broadband","Number","Perceived","Self")