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] |
Maintainer: | Petr Bouchal <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.0.9000 |
Built: | 2024-11-08 04:30:02 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_median
district_age_median
A data frame with 1539 rows and 4 variables:
sex
character. Sex
year
integer. Year, 2011-2019
median_age
double. Median age.
KOD_ZUJ
character. 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_structure
district_age_structure
A data frame with 9747 rows and 5 variables:
KOD_ZUJ
character. district code (ZUJ code, CZSO codelist 51 http://apl.czso.cz/iSMS/cisdet.jsp?kodcis=51)
KOD_SO
character. admin. district code (CZSO codelist 72 - CISSOP http://apl.czso.cz/iSMS/cisdet.jsp?kodcis=72)
count
double. number of residents.
age
integer. 5-year age group, except 85+.
year
integer. Year; data for 31. 12.
sex
character. 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_geofacet
district_geofacet
A data frame with 57 rows and 11 variables:
code
character. RUIAN code. Normally should serve as ID to distribute your data points into grid cells.
label
character. Three-character unique label.
row
integer. row number.
col
integer. 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_hexogram
district_hexogram
A data frame with 57 rows and 11 variables:
kod
character. RUIAN code.
nazev
character. Full name.
label
character. Three-character unique label.
mop_kod
character. Prague district code.
spo_kod
character. Admin district code.
pou_kod
character. Higher-level unit code.
okres_kod
character. District code.
CENTROIX
double. X coordinate of centroid.
CENTROIY
double. Y coordinate of centroid.
row
integer. row number.
col
integer. column number.
geometry
list. 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_names
district_names
A data frame with 57 rows and 11 variables:
kod
character. RUIAN code.
label
character. Three-character unique label.
nazev
integer. full name.
name_medium
integer. shortened name.
name_short
integer. short name.
name_spaced
integer. 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_tilegram
district_tilegram
A data frame with 57 rows and 11 variables:
kod
character. RUIAN code.
nazev
character. Full name.
label
character. Three-character unique label.
mop_kod
character. Prague district code.
spo_kod
character. Admin district code.
pou_kod
character. Higher-level unit code.
okres_kod
character. District code.
CENTROIX
double. X coordinate of centroid.
CENTROIY
double. Y coordinate of centroid.
row
integer. row number.
col
integer. column number.
geometry
list. 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_krovak
prg_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_wgs84
prg_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_endpoints
prg_endpoints
A data frame with 18 rows and 5 variables:
name
character. Name of the service, to be used as parameter in prg_tile() and prg_basemap()
type
character. "tile" or "image"
description
character. Description of the map source
endpoint
character. endpoint. Used internally
url
character. 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_oecd
prg_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_ico
prg_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_kod
prg_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_kraj
prg_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_lau1
prg_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_oecd
prg_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_nuts2
prg_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_nuts3
prg_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_okres
prg_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_nuts
prg_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)