We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Nowosad kod dla kartogramów ciągłych
library(sf) library(rmapshaper) library(lwgeom) library(cartogram) library(tmap) library(maptools) library(dplyr) library(sf) library(tmaptools) # Pobranie oraz wczytanie danych wektorowych, ustalenie układu współrzędnych temp <- tempfile() download.file("https://www.gis-support.pl/downloads/Powiaty.zip", temp) unzip(temp, exdir = "dane/pobrane") powiat = read_sf("dane/pobrane/Powiaty.shp", stringsAsFactors=FALSE) %>% st_transform(crs = 2180) %>% select(-c(4:29)) # Uproszczenie geometrii i zapisanie pliku w formacie geopackage powiat_simp = ms_simplify(powiat, keep_shapes = TRUE, keep = 0.2, explode = FALSE, snap = TRUE) powiat$geometry = powiat_simp$geometry #write_sf(powiat, dsn = "dane/temp/powiat.gpkg") #powiat = read_sf("dane/temp/powiat.gpkg", stringsAsFactors=FALSE) powiat = select(powiat, -1) prez_p = "https://raw.github.com/bananaonthemoon/wybory/master/dane/powiaty.gpkg" prez_pow = read_sf(prez_p, stringsAsFactors=FALSE) %>% st_transform(crs = 2180) %>% st_cast("POLYGON") prez_pow_cont_frek = cartogram_cont(prez_pow, "t1_Frekwencja", 15, threshold = 0.1) cont_pow_frek = tm_shape(prez_pow_cont_frek) + tm_polygons(col = "#BDE5B7", lwd = 1) + tm_layout(frame = FALSE) print(cont_pow_frek)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@Nowosad kod dla kartogramów ciągłych
The text was updated successfully, but these errors were encountered: