| Title: | Tools for visualising Prague data |
|---|---|
| Description: | A bridge between Prague geodata and R to enable visualisation. Currently, it provides access to raster map layers provided by the Prague geoportal and several utilities. |
| Authors: | Petr Bouchal [aut, cre] (ORCID: <https://orcid.org/0000-0002-0471-716X>) |
| Maintainer: | Petr Bouchal <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0.9000 |
| Built: | 2026-06-04 10:27:27 UTC |
| Source: | https://github.com/petrbouchal/pragr |
Median age of each of the 57 districts by 5-year age groups and sex, 2011-2019, from the Czech Statistical Office
district_age_mediandistrict_age_median
A data frame with 1539 rows and 4 variables:
sexcharacter. Sex
yearinteger. Year, 2011-2019
median_agedouble. Median age.
KOD_ZUJcharacter. district code (ZUJ code, CZSO codelist 51 http://apl.czso.cz/iSMS/cisdet.jsp?kodcis=51)
Source: https://www.czso.cz/csu/xa/casove-rady-za-mestske-casti-prahy
Other Statistics:
district_age_structure
Population of each of the 57 districts by 5-year age groups and sex, 2011-2019, from the Czech Statistical Office
district_age_structuredistrict_age_structure
A data frame with 9747 rows and 5 variables:
KOD_ZUJcharacter. district code (ZUJ code, CZSO codelist 51 http://apl.czso.cz/iSMS/cisdet.jsp?kodcis=51)
KOD_SOcharacter. admin. district code (CZSO codelist 72 - CISSOP http://apl.czso.cz/iSMS/cisdet.jsp?kodcis=72)
countdouble. number of residents.
ageinteger. 5-year age group, except 85+.
yearinteger. Year; data for 31. 12.
sexcharacter. Sex.
Source: https://www.czso.cz/csu/xa/casove-rady-za-mestske-casti-prahy
Other Statistics:
district_age_median
Use this as the grid argument to geofacet::facet_geo(). The layout corresponds to district_tilegram.
district_geofacetdistrict_geofacet
A data frame with 57 rows and 11 variables:
codecharacter. RUIAN code. Normally should serve as ID to distribute your data points into grid cells.
labelcharacter. Three-character unique label.
rowinteger. row number.
colinteger. column number.
Other Mapping:
district_hexogram,
district_names,
district_tilegram,
prg_basemap(),
prg_endpoints,
prg_tile()
Equal-area hexogram of 57 Prague districts. Best available representation though some district tiles neighbor districts they do not in reality.
district_hexogramdistrict_hexogram
A data frame with 57 rows and 11 variables:
kodcharacter. RUIAN code.
nazevcharacter. Full name.
labelcharacter. Three-character unique label.
mop_kodcharacter. Prague district code.
spo_kodcharacter. Admin district code.
pou_kodcharacter. Higher-level unit code.
okres_kodcharacter. District code.
CENTROIXdouble. X coordinate of centroid.
CENTROIYdouble. Y coordinate of centroid.
rowinteger. row number.
colinteger. column number.
geometrylist. geometry.
Other Mapping:
district_geofacet,
district_names,
district_tilegram,
prg_basemap(),
prg_endpoints,
prg_tile()
For when a shorter label is needed or for linking with other data by name.
district_namesdistrict_names
A data frame with 57 rows and 11 variables:
kodcharacter. RUIAN code.
labelcharacter. Three-character unique label.
nazevinteger. full name.
name_mediuminteger. shortened name.
name_shortinteger. short name.
name_spacedinteger. full name with spaced dash.
Other Mapping:
district_geofacet,
district_hexogram,
district_tilegram,
prg_basemap(),
prg_endpoints,
prg_tile()
Equal-area tilegram of 57 Prague districts. Best available representation though some district tiles neighbor districts they do not in reality.
district_tilegramdistrict_tilegram
A data frame with 57 rows and 11 variables:
kodcharacter. RUIAN code.
nazevcharacter. Full name.
labelcharacter. Three-character unique label.
mop_kodcharacter. Prague district code.
spo_kodcharacter. Admin district code.
pou_kodcharacter. Higher-level unit code.
okres_kodcharacter. District code.
CENTROIXdouble. X coordinate of centroid.
CENTROIYdouble. Y coordinate of centroid.
rowinteger. row number.
colinteger. column number.
geometrylist. geometry.
Other Mapping:
district_geofacet,
district_hexogram,
district_names,
prg_basemap(),
prg_endpoints,
prg_tile()
Include raster maps from Prague geoportal in your ggplot map
prg_basemap( data, image_service = "orto", layer = "", width = 900, alpha = 1, buffer = 0, verbose = F )prg_basemap( data, image_service = "orto", layer = "", width = 900, alpha = 1, buffer = 0, verbose = F )
data |
sf data frame from which to extract the bounding box |
image_service |
map service from which to draw the map; |
layer |
layer from map service to use, see https://mpp.praha.eu/arcgis/rest/services/ |
width |
width in pixels, in effect sets image resolution; integer or "max" |
alpha |
transparency of the tile |
buffer |
distance between feature end and image end; for EPSG 5514 in meters. |
verbose |
display information on image URLs and image processing. |
list including raster annotation layers for ggplot2
Other Mapping:
district_geofacet,
district_hexogram,
district_names,
district_tilegram,
prg_endpoints,
prg_tile()
## Not run: praha1 <- CzechData::load_RUIAN_settlement(prg_kod, "MOMC_P", WGS84 = F) %>% filter(nazev == 'Praha 1') ggplot() + prg_basemap(data = praha1, alpha = .8, buffer = 200, image_service = 'mapy_archiv', layer = 6) + geom_sf(data = praha1, fill = alpha("red", 0.6), colour = NA) + theme_void() ## End(Not run)## Not run: praha1 <- CzechData::load_RUIAN_settlement(prg_kod, "MOMC_P", WGS84 = F) %>% filter(nazev == 'Praha 1') ggplot() + prg_basemap(data = praha1, alpha = .8, buffer = 200, image_service = 'mapy_archiv', layer = 6) + geom_sf(data = praha1, fill = alpha("red", 0.6), colour = NA) + theme_void() ## End(Not run)
Prague bbox in EPSG 5514 (Krovak)
prg_bbox_krovakprg_bbox_krovak
named numeric of class bbox, length 4
Prague RUIAN code
Other Codes and metadata:
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague bbox in EPSG 4326 (WGS 84)
prg_bbox_wgs84prg_bbox_wgs84
named numeric of class bbox, length 4
Prague RUIAN code
Other Codes and metadata:
prg_bbox_krovak,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Contains information on a selection of available Prague raster map services. Can be used manually to inspect services and is used internally by prg_tile() and prg_basemap() for retrieving data from servers.
prg_endpointsprg_endpoints
A data frame with 18 rows and 5 variables:
namecharacter. Name of the service, to be used as parameter in prg_tile() and prg_basemap()
typecharacter. "tile" or "image"
descriptioncharacter. Description of the map source
endpointcharacter. endpoint. Used internally
urlcharacter. URL, used internally but also points to human readable interface.
Other Mapping:
district_geofacet,
district_hexogram,
district_names,
district_tilegram,
prg_basemap(),
prg_tile()
Prague code in OECD Functional Urban Area database.
prg_fua_oecdprg_fua_oecd
character vector of length 1
Prague code in OECD Functional Urban Area database.
See https://www.oecd.org/cfe/regional-policy/functionalurbanareasbycountry.htmz
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague ICO code
prg_icoprg_ico
character vector of length 1
Prague ICO code
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague RUIAN code
prg_kodprg_kod
character vector of length 1
Prague RUIAN code
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague 'kraj' code. Comes from CZSO registry 100, KRAJ_NUTS.
prg_krajprg_kraj
character vector of length 1
Prague kraj code
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague LAU1 code - level of okres.
prg_lau1prg_lau1
character vector of length 1
Prague LAU1 code. Comes from CZSO registry 109 - OKRES_LAU.
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague code in OECD database on Metropolitan Areas.
prg_metro_oecdprg_metro_oecd
character vector of length 1
Prague code in OECD Functional Urban Area database.
See https://stats.oecd.org/Index.aspx?DataSetCode=CITIES
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_nuts2,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague NUTS2 code
prg_nuts2prg_nuts2
character vector of length 1
Prague NUTS2 code
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts3,
prg_okres_nuts,
prg_okres
Prague NUTS3 code, level of kraj. Comes from CZSO registry 108 - NUTS3-2004.
prg_nuts3prg_nuts3
character vector of length 1
Prague NUTS3 code
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_okres_nuts,
prg_okres
Prague 'okres' code. Comes from CZSO registry 101 - OKRES_NUTS.
prg_okresprg_okres
character vector of length 1
Prague okres code
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres_nuts
Prague 'okres LAU' code. Comes from CZSO register 101 (OKRES_NUTS) - yes these are confusing but that is how it is.
prg_okres_nutsprg_okres_nuts
character vector of length 1
Prague okres (NUTS) code.
Other Codes and metadata:
prg_bbox_krovak,
prg_bbox_wgs84,
prg_fua_oecd,
prg_ico,
prg_kod,
prg_kraj,
prg_lau1,
prg_metro_oecd,
prg_nuts2,
prg_nuts3,
prg_okres
Include raster tiles for Prague in ggplot2
prg_tile( data, tile_service = "orto", zoom = 6, alpha = 1, buffer = 0, verbose = F )prg_tile( data, tile_service = "orto", zoom = 6, alpha = 1, buffer = 0, verbose = F )
data |
sf data frame from which to extract the bounding box |
tile_service |
map service from which to draw the map (see |
zoom |
zoom level, from 0 to the service's limit |
alpha |
transparency of the tiles. |
buffer |
distance between feature end and tile end; for EPSG 5514 in meters. |
verbose |
display information on tile URLs and image processing. |
list including raster annotation layers for ggplot2
Other Mapping:
district_geofacet,
district_hexogram,
district_names,
district_tilegram,
prg_basemap(),
prg_endpoints
## Not run: praha1 <- CzechData::load_RUIAN_settlement(prg_kod, "MOMC_P", WGS84 = F) %>% filter(nazev == 'Praha 1') ggplot() + prg_tile(data = praha1, zoom = 10, alpha = .7, buffer = 200, tile_service = 'orto') + geom_sf(data = praha1, fill = alpha("red", 0.6), colour = NA) + theme_void() ## End(Not run)## Not run: praha1 <- CzechData::load_RUIAN_settlement(prg_kod, "MOMC_P", WGS84 = F) %>% filter(nazev == 'Praha 1') ggplot() + prg_tile(data = praha1, zoom = 10, alpha = .7, buffer = 200, tile_service = 'orto') + geom_sf(data = praha1, fill = alpha("red", 0.6), colour = NA) + theme_void() ## End(Not run)