library(OpasnetUtils) library(OpasnetUtilsExt) library(rgdal) objects.latest("Op_fi3857", code_name = "alusta") dat <- pyörät.nyt() dat <- dropall(dat) dat <- as.data.frame(as.table(tapply(as.character(dat$Tyyppi), dat[c("Teline", "LA", "LO")], function(x) paste(x, sep = "", collapse = " ")))) dat <- dat[!is.na(dat$Freq) , ] dat$LA <- as.numeric(levels(dat$LA)[dat$LA]) dat$LO <- as.numeric(levels(dat$LO)[dat$LO]) oprint(dat) coordinates(dat)=c("LO","LA") out <- google.point_kml( obj = dat, kmlname = "Helsingin pyörätelineet", kmldescription = "KML-tiedostona", name = dat$Freq, description = dat$Freq ) google.show_kml_data_on_maps(out) |