@@ -455,7 +455,7 @@ get_planes_data <- function(year, dir, flights_data) {
455
455
456
456
# put together the url to query the planes data at
457
457
planes_src <- paste0(
458
- " http ://registry.faa.gov/database/yearly/ReleasableAircraft." ,
458
+ " https ://registry.faa.gov/database/yearly/ReleasableAircraft." ,
459
459
year ,
460
460
" .zip"
461
461
)
@@ -466,8 +466,13 @@ get_planes_data <- function(year, dir, flights_data) {
466
466
467
467
# download the planes data
468
468
planes_tmp <- tempfile(fileext = " .zip" )
469
- download_file_wrapper(planes_src , planes_tmp , quiet = TRUE )
470
-
469
+ planes_response <-
470
+ httr :: GET(
471
+ planes_src ,
472
+ httr :: user_agent(" anyflights" ),
473
+ httr :: write_disk(planes_tmp , overwrite = TRUE )
474
+ )
475
+
471
476
# ...and unzip it!
472
477
utils :: unzip(planes_tmp , exdir = planes_lcl , junkpaths = TRUE )
473
478
@@ -515,10 +520,12 @@ process_planes_ref <- function(planes_lcl) {
515
520
# download the planes acftref data
516
521
planes_tmp <- tempfile(fileext = " .zip" )
517
522
518
- download_file_wrapper(
519
- " http://registry.faa.gov/database/yearly/ReleasableAircraft.2019.zip" ,
520
- planes_tmp ,
521
- quiet = TRUE )
523
+ planes_response <-
524
+ httr :: GET(
525
+ " https://registry.faa.gov/database/yearly/ReleasableAircraft.2019.zip" ,
526
+ httr :: user_agent(" anyflights" ),
527
+ httr :: write_disk(planes_tmp , overwrite = TRUE )
528
+ )
522
529
523
530
# ...and unzip it!
524
531
utils :: unzip(planes_tmp , exdir = planes_lcl , junkpaths = TRUE )
0 commit comments