A map showcasing over 2000 FAA-recorded aerial obstructions in New York City, including buildings, poles, towers, aviation waypoints, control towers, etc. Color-coded by height above ground level and differentiated in shape by obstruction type, the map provides an overview of what pilots encounter while navigating the airspace above the bustling metropolis.
Data Is Plural
Maps
USA
A4 Size Viz
Author
Aditya Dahiya
Published
April 20, 2024
The detailed Figure 1 showcases over 2000 FAA-recorded aerial obstructions in and around New York City! This map provides an overview of the city’s skies for safe flight operations, including buildings, poles, towers, aviation waypoints, and control towers. Color-coded by height above ground level and differentiated by obstruction type, it offers a view of the airspace above this bustling metropolis, as seen by Pilots. The data, is updated every 56 days by the Federal Aviation Administration’s Obstacles Team to ensure safe and efficient flight operations within the National Airspace System in USA. Access the full dataset here.
How I made this graphic?
Loading required libraries, data import & creating custom functions. The Document for Meta Data, Variable Names and Explanations can be viewed here.
Code
# Data Import and Wrangling Toolslibrary(tidyverse) # All things tidylibrary(janitor) # Cleaning names etc.library(here) # Root Directory Managementlibrary(dataverse) # Getting data from Harvard Dataverse# Final plot toolslibrary(scales) # Nice Scales for ggplot2library(fontawesome) # Icons display in ggplot2library(ggtext) # Markdown text support for ggplot2library(showtext) # Display fonts in ggplot2library(colorspace) # Lighten and Darken colourslibrary(ggthemes) # Themes for ggplot2library(patchwork) # Combining plots# Mapping toolslibrary(sf) # All spatial objects in R# Importing raw datazip_url <-"https://aeronav.faa.gov/Obst_Data/DAILY_DOF_CSV.ZIP"# Define a temporary file path to save the zip filetemp_zip <-tempfile(fileext =".zip")# Download the zip filedownload.file(zip_url, temp_zip, mode ="wb")# Extract the CSV file from the zipcsv_file <-unzip(temp_zip, files =NULL)# Load the CSV file into Rrawdf <-read_csv(csv_file)unlink(temp_zip)unlink("DOF.csv")rm(csv_file, temp_zip, zip_url)# Create a function to draw a bounding box to remove features outside itgeometric_rectangle <-function(lat_min, lat_max, lon_min, lon_max) { box_coords <-matrix(data =c(c(lon_min, lon_max, lon_max, lon_min, lon_min),c(lat_min, lat_min, lat_max, lat_max, lat_min) ),ncol =2, byrow =FALSE )return(st_polygon(list(box_coords)) |>st_sfc(crs =4326) # Set the CRS to EPSG:4326, the default )}
Get New York City Map Data
Code
library(osmdata)# Bounding Box (Latitude and Longitude limits) for New York City Areanyc_bbox <-c(-74.195, 40.55, -73.74, 40.9)# A rectangle to draw around the New York Citynyc_rect <-geometric_rectangle(nyc_bbox[2], nyc_bbox[4], nyc_bbox[1], nyc_bbox[3])# Data to add Pointers for the main airportscom_airports <-tibble(airport =c("John F. Kennedy International Airport","Newark Liberty International Airport","LaGuardia Airport","Long Island MacArthur Airport","Stewart International Airport","Trenton–Mercer Airport","Floyd Bennett Field","Teterboro Airport"),lon =c(-73.7817205, -74.17369618, -73.87422493,-73.0974269, -74.10118458, -74.81378462,-73.8886878, -74.06131113),lat =c(40.6433708, 40.69135938, 40.77570745,40.7980748, 41.49799333, 40.27745111,40.5899426, 40.85165153)) |>st_as_sf(coords =c("lon", "lat"), crs =4326)# Getting NYC streets datanyc_roads <-opq(bbox = nyc_bbox) |>add_osm_feature(key ="highway", value =c("motoryway", "trunk","primary", "secondary")) |>osmdata_sf()# Getting NYC Airports Datanyc_air <-opq(bbox = nyc_bbox) |>add_osm_feature(key ="aeroway") |>osmdata_sf()# Getting Administrative Boundaries of NYCnyc_boundary <-opq(bbox = nyc_bbox) |>add_osm_feature(key ="boundary", value ="administrative") |>osmdata_sf()# Getting NYC Coastlinenyc_coastline <-opq(bbox = nyc_bbox) |>add_osm_feature(key ="natural", value ="coastline") |>osmdata_sf()
Visualization Parameters
Code
# Font for titlesfont_add_google("Cormorant Upright",family ="title_font") # Font for the captionfont_add_google("Saira Extra Condensed",family ="caption_font") # Font for plot textfont_add_google("Marcellus",family ="body_font") showtext_auto()# Background Colourbg_col <-"white"# Colour for the text using FAA's offical website colourtext_col <-"#09283c"# Colour for highlighted texttext_hil <-"#15396c"# Define Base Text Sizets <-40# Caption stuff for the plotsysfonts::font_add(family ="Font Awesome 6 Brands",regular = here::here("docs", "Font Awesome 6 Brands-Regular-400.otf"))github <-""github_username <-"aditya-dahiya"xtwitter <-""xtwitter_username <-"@adityadahiyaias"social_caption_1 <- glue::glue("<span style='font-family:\"Font Awesome 6 Brands\";'>{github};</span> <span style='color: {text_hil}'>{github_username} </span>")social_caption_2 <- glue::glue("<span style='font-family:\"Font Awesome 6 Brands\";'>{xtwitter};</span> <span style='color: {text_hil}'>{xtwitter_username}</span>")
Plot Text
Code
plot_title <-"Navigating New York City's Airspace"plot_caption <-paste0("**Data:** Federal Aviation Administration (USA): Obstacles Team AJV-A32", " | **Code:** ", social_caption_1, " | **Graphics:** ", social_caption_2 )subtitle_text <-"A Map of aerial obstructions for safe flight operations. This detailed map showcases over 2000 FAA-recorded aerial obstructions in New York City, including buildings, poles, towers, aviation waypoints, control towers, etc. Color-coded by height above ground level and differentiated in shape by obstruction type, the map provides an overview of what pilots encounter while navigating the airspace above the bustling metropolis."plot_subtitle <-str_wrap(subtitle_text, width =110)plot_subtitle |>str_view()text_annotation_1 <-"About the Data: The Federal Aviation Administration's Obstacles Team collects and verifies data on man-made aerial obstructions that may affect safe flight navigation. This data, updated every 56 days, includes information such as structure type, height above ground and sea level, lighting, marking, and accuracy code, providing crucial information for safe and efficient flight operations within the National Airspace System. Access the full dataset at https://www.faa.gov/air_traffic/flight_info/aeronav/obst_data/"
Data Analysis and Wrangling
Code
# Air Obstacles in New York Citynyc_arobs <- rawdf |>clean_names() |>mutate(agl =as.numeric(agl),amsl =as.numeric(amsl) ) |>filter(latdec > nyc_bbox[2] & latdec < nyc_bbox[4]) |>filter(londec > nyc_bbox[1] & londec < nyc_bbox[3]) |>mutate(type =case_when( type %in%c("BLDG", "BLDG-TWR") ~"Buildings", type %in%c("TOWER", "POLE", "T-L TWR", "UTILITY POLE", "ANTENNA") ~"Towers & Poles", type %in%c("CTRL TWR", "NAVAID") ~"Control Towers & Navigational Aids",.default ="Other Structures" ),type =fct(type, levels =c("Buildings","Towers & Poles","Control Towers & Navigational Aids","Other Structures" )) ) |>select(oas, state, city, lat = latdec, lon = londec, type, agl, amsl) |>st_as_sf(coords =c("lon", "lat"), crs =4326)