MyNixOS website logo
Description

Generates Networks from BTS Data.

A flexible tool that allows generating bespoke air transport statistics for urban studies based on publicly available data from the Bureau of Transport Statistics (BTS) in the United States <https://www.transtats.bts.gov/databases.asp?Z1qr_VQ=E&Z1qr_Qr5p=N8vn6v10&f7owrp6_VQF=D>.

skynet

Build Status CRAN_Status_Badge Coveragestatus

Overview

The rationale behind Skynet, is to provide researchers with a unifying tool overcoming some of the challenges faced when dealing with the Bureau of Transport Statistics, DB1B and T100 data. The DB1B data consists of 2 sets of files, Coupon and Ticket. They can be both downloaded at https://www.transtats.bts.gov/Fields.asp?gnoyr_VQ=FLM and https://www.transtats.bts.gov/Fields.asp?gnoyr_VQ=FKF respectively while the T100 data can be found here https://www.transtats.bts.gov/Fields.asp?gnoyr_VQ=FIL.

Note

To comply with R syntax guidelines, we changed to a clearer function naming from version 1.2.0. Deprecated functions are still present, but will be removed for the next versions.

Note on importing from other data sources

We are constantly working on new functions that allow importing data from different data sources. However, as we can’t cover them all at least for now, in case you would like to work with a database which is not covered by skynet, simply create a data.frame with the following variables:

itin_id, mkt_id, seq_num, origin_mkt_id, origin, year, quarter, dest_mkt_id, dest, trip_break, op_carrier, distance, gateway, roundtrip, itin_yield, passengers, itin_fare, bulk_fare, distance_full

For more information on the variables, please visit https://www.transtats.bts.gov/Fields.asp?gnoyr_VQ=FLM and https://www.transtats.bts.gov/Fields.asp?gnoyr_VQ=FKF.

Skynet allows that some of this variables have a 0 or NA value, however, if you’re working with a specific dataset which doesn’t allow an easy conversion to our format, please feel free to create an issue so we can look into it. Please make sure to include at least one small example of a csv file with the data you’re trying to import.

Installation

You can install skynet from github with:

# install.packages("devtools")
devtools::install_github("FilipeamTeixeira/skynet")

Import Data

To import data, simply type import_db1b() or import_t100() including the path to your desired file.
Note: The Coupon file should take the first argument while the Ticket file should take the second argument.

 library(skynet)
 import_db1b("folder/Coupon 2016Q1.csv", "folder/Ticket 2016Q1.csv")
 import_t100("folder/T100_2016.csv")

The BTS DB1B data consists of 2 sets of files, Coupon and Ticket. They can be both downloaded at https://www.transtats.bts.gov/Fields.asp?gnoyr_VQ=FLM and https://www.transtats.bts.gov/Fields.asp?gnoyr_VQ=FKF respectively.

Despite being possible to download the complete zipped file, which includes all variables, due to its size, we recommend selecting the following set.

CouponTicket
Itinerary IDItinerary ID
Market IDRoundtrip
Sequence NumberItinerary Yield
Origin City Market IDPassengers
OriginItinerary Fare
YearBulkfare Indicator
QuarterDistance
Destination City Market ID
Destination
Trip Break
Operating Carrier
Distance
Gateway

Since version 1.0.2 that the import method changed being the netimport() function no longer available. When importing from the prezipped DB1B file, just add the argument zip = TRUE to the import_db1b() function. This does not apply to the T100 file which can be simply imported by typing import_t100(). In order to save space, it is possible as well to import the prezipped file, and convert it to a smaller file with only the necessary variables, with the function convert_raw().

Example

To generate a directed network, please type:

library(skynet)
# For DB1B data
import_db1b("folder/Coupon_2011Q1.csv", "folder/Ticket_2011Q1.csv")
make_net_dir(OD_2011Q1, disp = TRUE, alpha = 0.05)

# For T100 data
import_t100("folder/T100_2011.csv")
make_net_dir(T100_2011Q1, disp = TRUE, alpha = 0.05)

ropensci_footer

Metadata

Version

1.4.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows