cars icon

Cars Python Library

From the CORGIS Dataset Project

By Austin Cory Bart acbart@vt.edu
Version 2.0.0, created 11/3/2015
Tags: cars, vehicles, fuel

Overview

This is a dataset about cars and how much fuel they use.

Explore Structure

Each row represents $MISSING_FIELD.

Index Type Example Value
0 dict { }
1 dict (same structure)
2 dict (same structure)
... ... ...
Key Type Example Value Description
"Dimensions" dict { }
"Engine Information" dict { }
"Fuel Information" dict { }
"Identification" dict { }
Key Type Example Value Description
"Height" int 140 Unknown values are stored as 0. Unfortunately, many cars do not report this data.
"Length" int 143 Unknown values are stored as 0. Unfortunately, many cars do not report this data.
"Width" int 202 Unknown values are stored as 0. Unfortunately, many cars do not report this data.
Key Type Example Value Description
"Driveline" str "All-wheel drive" A string representing whether this is "Rear-wheel drive", "Front-wheel drive", or "All-wheel drive".
"Engine Type" str "Audi 3.2L 6 cylinder 250hp 236ft-lbs" How many cylinders are in this engine. Most cars are either a 6-cylinder or an 8-cylinder.
"Hybrid" bool True Whether this is a hybrid engine or not - that is, if it uses both an internal combustion engine and an electric motor.
"Number of Forward Gears" int 6 The number of forward gears. If no information is available, it is coded as 0.
"Transmission" str "6 Speed Automatic Select Shift" The full name of this type of transmission, based on its Classification and number of forward gears.
"Engine Statistics" dict { }
Key Type Example Value Description
"City mpg" int 18 The miles-per-gallon this car gets on average in cities.
"Fuel Type" str "Gasoline" Whether this car takes "Gasoline", "Diesel fuel", "Electricity", "Compressed natural gas", or "E85" (a term that refers to high-level ethanol-gasoline blends containing 51%-83% ethanol). If it is unknown, it is left blank.
"Highway mpg" int 25 The miles-per-gallon this car gets on average on highways.
Key Type Example Value Description
"Classification" str "Automatic transmission" Whether this is a "Manual transmission" or an "Automatic transmission". If it is unknown, it is left blank.
"ID" str "2009 Audi A3 3.2" A unique ID for this particular car, using the year, make, model, and transmission type.
"Make" str "Audi" The maker for this car.
"Model Year" str "2009 Audi A3" The specific name/year for this car.
"Year" int 2009 The year that this car was released.
Key Type Example Value Description
"Horsepower" int 250 A measure of the engine's power. A unit of power equal to 550 foot-pounds per second (745.7 watts).
"Torque" int 236 The torque of the engine, measured in lb/ft. When an engine is said to make "200 lb-ft of torque", it means that 200 pounds of force on a 1-foot lever is needed to stop its motion.

Downloads

Download all of the following files.

  1. cars.py
  2. cars.data

Usage

import cars
car = cars.get_car()

Documentation

get_car()
Returns a list of dictionaries representing car.