tidyverse / tidyverse/ggplot2

Clarify US unit and origin of data for mpg documentation

Open Beginner friendly
#6,898 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
7k
Forks
2.1k
Avg merge
59m
Merged PRs (30d)
2

Description

This is a suggestion for a minimal change in the documentation of the mpg dataset, and I am happy to provide a PR.

Currently, ?mpg gives the following description:

This dataset contains a subset of the fuel economy data that the EPA makes available on https://fueleconomy.gov/. It contains only models which had a new release every year between 1999 and 2008 - this was used as a proxy for the popularity of the car.

And the description for fuel efficiency variables:

cty
city miles per gallon
hwy
highway miles per gallon

There is no mention of the data originating from the US anywhere on the page.

Specifically, I would like to make it more explicit that:

  • the EPA is the US EPA (as there are many other agencies that share the name (and possibly, also spell out "EPA" entirely)
  • the units are miles per US gallons, and not miles per imperial gallons. (To be safe, I verified the factor by using the Fuel Economy website's own unit conversion setting.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ?mpg help page and locate the documentation for the dataset and its cty and hwy variables. Update it to identify the US EPA and state that fuel-efficiency values use miles per US gallons, then verify the rendered help page reflects both clarifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.