Learn R Programming

giscoR (version 0.2.4)

gisco_get_airports: Get location of airports and ports from GISCO API

Description

Loads a simple feature (sf) object from GISCO API or your local library.

Usage

gisco_get_airports(year = "2013", country = NULL)

gisco_get_ports(year = "2013")

Arguments

year

Year of reference.

country

A list of countries, see gisco_get_countries()

Value

A POINT object on EPSG:4326.

Years available

  • gisco_get_airports: "2006" and "2013"

  • gisco_get_ports: "2009" and "2013"

Ports 2009 contains worldwide information, the rest of datasets refer to Europe. All shapefiles provided in EPSG:4326

Examples

Run this code
# NOT RUN {
library(sf)

NL <- gisco_get_countries(country = "NL")
AirP_NL <- gisco_get_airports(country = "NL")

Ports <- gisco_get_ports()
# Intersect with NL
PortsNL <- st_intersection(Ports, NL)


plot(st_geometry(NL), col = "wheat")
plot(
  st_geometry(PortsNL),
  pch = 22,
  col = "forestgreen",
  add = TRUE,
  cex = 0.8
)

plot(
  st_geometry(AirP_NL),
  pch = 20,
  col = "steelblue",
  add = TRUE,
  cex = 1.2
)
legend(
  "topright",
  legend = c("Port", "Airport"),
  col = c("forestgreen", "steelblue"),
  cex = 0.9,
  bty = "n",
  pch = c(22, 20),
  pt.cex = c(1, 1.5),
  y.intersp = 2
)

title(
  main = "Transport Network on the Nethelands",
  sub = gisco_attributions(),
  line = 1,
  cex.sub = 0.7,
  font.sub = 3
)
# }

Run the code above in your browser using DataLab