red-data-tools / red-datasets

A RubyGem that provides common datasets
MIT License
30 stars 26 forks source link

Add support for nycflights13 dataset #94

Closed kou closed 2 years ago

kou commented 4 years ago

https://github.com/hadley/nycflights13

bkmgit commented 2 years ago

Depends on https://github.com/red-data-tools/red-datasets/issues/53 since this is a composite data set. Alternatively, one could build a new data set using information available at https://www.transtats.bts.gov

heronshoes commented 2 years ago

We can close this issue because nycflight13 dataset is supported in the package nycflight13 of dataset Rdataset.

Datasets::RdatasetList.new.filter(package: "nycflights13").each do |ds|
  puts "#{ds.dataset}, (#{ds.rows}x#{ds.cols}), #{ds.title}"
end
# =>
airlines, (16x2), Airline names.
airports, (1458x8), Airport metadata
flights, (336776x19), Flights data
planes, (3322x9), Plane metadata.
weather, (26115x15), Hourly weather data
heronshoes commented 2 years ago

FYI, another dataset openintro/nycflights exists in Rdataset. This one has come from the same source, consists of single dataset.

ds = Datasets::Rdataset.new('openintro', 'nycflights')
puts ds.metadata.id
puts ds.metadata.description

# =>
rdataset-openintro-nycflights
Flights data

https://vincentarelbundock.github.io/Rdatasets/articles/data.html

kou commented 2 years ago

Thanks!