Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Scrape EASA Noise Excel files
library(readxl)
library(lubridate)
# data from
# https://www.easa.europa.eu/domains/environment/easa-certification-noise-levels
#
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20Heavy%20Prop%28200914%29.xlsm
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20JETS%28201015%29.xlsm
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20Light%20Prop%28201012%29.xlsm
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20HELICOPTERS%28201012%29.xlsm
# HEAVY ----
heavy_raw <- read_xlsx("/Users/espin/Downloads/MAdB Heavy Prop(200914).xlsm",
skip = 6,
col_names = FALSE)
heavy <- heavy_raw %>%
rename(
# record part
record_number = ...1,
tcdsn_number = ...2,
issue_number = ...3,
issue_date = ...4) %>%
rename(
# airframe type part
airframe_type_certificate_holder = ...6,
airframe_type_designation = ...7,
airframe_variant_popular_name = ...8,
airframe_modification_number = ...9,
airframe_modification_description = ...10,
airframe_mtow = ...11,
airframe_mlw = ...12,
airframe_notes = ...13) %>%
rename(
# engine part
engine_manufacturer = ...15,
engine_type_designation = ...16,
engine_modification_number = ...17,
engine_modification_description = ...18,
engine_notes = ...19) %>%
rename(
# propeller
propeller_manufacturer = ...21,
propeller_type_designation = ...22,
propeller_modification_number = ...23,
propeller_modification_description = ...24) %>%
rename(
# regulation
regulation_regulation = ...26,
regulation_edition_amendment = ...27,
regulation_chapter = ...28,
regulation_notes = ...29) %>%
rename(
# noise levels part
noise_levels_lateral_full_power_level = ...31,
noise_levels_lateral_full_power_limit = ...32,
noise_levels_lateral_full_power_margin = ...33,
noise_levels_lateral_full_power_notes = ...34,
noise_levels_flyover_level = ...35,
noise_levels_flyover_limit = ...36,
noise_levels_flyover_margin = ...37,
noise_levels_flyover_notes = ...38,
noise_levels_approach_level = ...39,
noise_levels_approach_limit = ...40,
noise_levels_approach_margin = ...41,
noise_levels_approach_notes = ...42) %>%
rename(
# meta
notes = ...44,
revision_record_added = ...46,
revision_record_amended = ...47,
revision_record_notes = ...48
) %>%
mutate(issue_date = as_date(issue_date),
revision_record_added = as_date(revision_record_added),
revision_record_amended = as_date(revision_record_amended)) %>%
select(-starts_with("..."))
# JET ----
jet_raw <- read_xlsx("/Users/espin/Downloads/MAdB JETS(201015).xlsm",
skip = 6,
col_names = FALSE)
jet <- jet_raw %>%
rename(
# record part
record_number = ...1,
tcdsn_number = ...2,
issue_number = ...3,
issue_date = ...4) %>%
mutate(issue_date = as_date(issue_date)) %>%
rename(
# airframe type part
airframe_type_certificate_holder = ...6,
airframe_type_designation = ...7,
airframe_popular_name = ...8,
airframe_variant = ...9,
airframe_modification_number = ...10,
airframe_modification_description = ...11,
airframe_mtow = ...12,
airframe_mlw = ...13,
airframe_notes = ...14) %>%
rename(
# engine part
engine_manufacturer = ...16,
engine_type_designation = ...17,
engine_modification_number = ...18,
engine_modification_description = ...19,
engine_number_of_engines = ...20) %>%
rename(
# regulation
regulation_regulation = ...22,
regulation_edition_amendment = ...23,
regulation_chapter = ...24,
regulation_notes = ...25) %>%
rename(
# noise levels part
epndb_lateral_level = ...27,
epndb_lateral_limit = ...28,
epndb_lateral_margin = ...29,
epndb_lateral_notes = ...30,
epndb_flyover_level = ...31,
epndb_flyover_limit = ...32,
epndb_flyover_margin = ...33,
epndb_flyover_notes = ...34,
epndb_approach_level = ...35,
epndb_approach_limit = ...36,
epndb_approach_margin = ...37,
epndb_approach_notes = ...38,
epndb_cumulative_level = ...39,
epndb_cumulative_limit = ...40,
epndb_cumulative_margin = ...41,
) %>%
rename(
# meta
notes = ...43,
revision_record_added = ...45,
revision_record_amended = ...46,
revision_record_notes = ...47
) %>%
mutate(revision_record_added = as_date(revision_record_added),
revision_record_amended = as_date(revision_record_amended)) %>%
select(-starts_with("..."))
# LIGHT ----
light_raw <- read_xlsx("/Users/espin/Downloads/MAdB Light Prop(201012).xlsm",
skip = 6,
col_names = FALSE)
light <- light_raw %>%
rename(
# record part
record_number = ...1,
tcdsn_number = ...2,
issue_number = ...3,
issue_date = ...4) %>%
rename(
# airframe type part
airframe_type_certificate_holder = ...6,
airframe_type_designation = ...7,
airframe_popular_name = ...8,
airframe_modification_number = ...9,
airframe_modification_description = ...10,
airframe_mtow = ...11,
airframe_notes = ...12) %>%
rename(
# engine part
engine_manufacturer = ...14,
engine_type_designation = ...15,
engine_modification_number = ...16,
engine_modification_description = ...17,
engine_notes = ...18) %>%
rename(
# muffler part
muffler_manufacturer = ...20,
muffler_part_number = ...21,
muffler_description = ...22,
muffler_notes = ...23) %>%
rename(
# propeller
propeller_manufacturer = ...25,
propeller_hub_blade_designation = ...26,
propeller_modification_number = ...27,
propeller_modification_description = ...28) %>%
rename(
# regulation
regulation_regulation = ...30,
regulation_edition_amendment = ...31,
regulation_chapter = ...32) %>%
rename(
# noise levels part
epndb_overflight_level = ...34,
epndb_overflight_limit = ...35,
epndb_overflight_margin = ...36,
epndb_takeoff_level = ...37,
epndb_takeoff_limit = ...38,
epndb_takeoff_margin = ...39) %>%
rename(
# meta
notes = ...41,
revision_record_added = ...43,
revision_record_amended = ...44,
revision_record_notes = ...45
) %>%
mutate(issue_date = as_date(issue_date),
revision_record_added = as_date(revision_record_added),
revision_record_amended = as_date(revision_record_amended)) %>%
select(-starts_with("..."))
# HELI ----
heli_raw <- read_xlsx("/Users/espin/Downloads/MAdB HELICOPTERS(201012).xlsm",
skip = 6,
col_names = FALSE)
heli <- heli_raw %>%
rename(
# record part
record_number = ...1,
tcdsn_number = ...2,
issue_number = ...3,
issue_date = ...4) %>%
rename(
# airframe type part
airframe_type_certificate_holder = ...6,
airframe_type_designation = ...7,
airframe_variant = ...8,
airframe_modification_number = ...9,
airframe_modification_description = ...10,
airframe_mtow = ...11,
airframe_mlw = ...12,
airframe_notes = ...13) %>%
rename(
# engine part
engine_manufacturer = ...15,
engine_type_designation = ...16,
engine_modification_number = ...17,
engine_modification_description = ...18) %>%
rename(
# regulation
regulation_regulation = ...20,
regulation_edition_amendment = ...21,
regulation_chapter = ...22,
regulation_notes = ...23) %>%
rename(
# propeller
noise_levels_chapter11_overflight_level = ...25,
noise_levels_chapter11_overflight_limit = ...26,
noise_levels_chapter11_overflight_margin = ...27,
noise_levels_chapter11_overflight_notes = ...28) %>%
rename(
# noise levels part
noise_levels_takeoff_level = ...30,
noise_levels_takeoff_limit = ...31,
noise_levels_takeoff_margin = ...32,
noise_levels_takeoff_notes = ...33,
noise_levels_overflight_level = ...34,
noise_levels_overflight_limit = ...35,
noise_levels_overflight_margin = ...36,
noise_levels_overflight_notes = ...37,
noise_levels_approach_level = ...38,
noise_levels_approach_limit = ...39,
noise_levels_approach_margin = ...40,
noise_levels_approach_notes = ...41) %>%
rename(
# meta
notes = ...43,
revision_record_added = ...45,
revision_record_amended = ...46,
revision_record_notes = ...47
) %>%
mutate(issue_date = as_date(issue_date),
revision_record_added = as_date(revision_record_added),
revision_record_amended = as_date(revision_record_amended)) %>%
select(-starts_with("..."))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment