Class: Datasets::FuelEconomy

Inherits:
Ggplot2Dataset show all
Defined in:
lib/datasets/fuel-economy.rb

Defined Under Namespace

Classes: Record

Constant Summary collapse

COLUMN_NAME_MAPPING =
{
  "displ" => "displacement",
  "cyl" => "n_cylinders",
  "trans" => "transmissions",
  "drv" => "drive_train",
  "cty" => "city_mpg",
  "hwy" => "highway_mpg",
  "fl" => "fuel",
  "class" => "type",
}

Instance Attribute Summary

Attributes inherited from Dataset

#metadata

Instance Method Summary collapse

Methods inherited from Ggplot2Dataset

#each

Methods inherited from Dataset

#clear_cache!, #to_table

Constructor Details

#initializeFuelEconomy

Returns a new instance of FuelEconomy.



17
18
19
20
21
22
# File 'lib/datasets/fuel-economy.rb', line 17

def initialize
  super("mpg")
  @metadata.id = "fuel-economy"
  @metadata.name = "Fuel economy"
  @metadata.licenses = ["CC0-1.0"]
end