Skip to content

line_df not defined in README.md #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
trashbirdecology opened this issue Feb 15, 2019 · 3 comments
Closed

line_df not defined in README.md #12

trashbirdecology opened this issue Feb 15, 2019 · 3 comments

Comments

@trashbirdecology
Copy link

The dataframe used to plot the example, line_df is not defined.

Perhaps create an example df and save to the package, or provide code in .md to create line_df.

@hlj-datacamp
Copy link

The line_df dataframe is a filtered down version of the gapminder dataset. This comes with an R install and can be accessed by putting library(gapminder) at the top of your code :)

@trashbirdecology
Copy link
Author

trashbirdecology commented Mar 29, 2019

Thanks for the clarification. It may be useful to, in README.md, define the line_df, as whatever subset of gapminder you prefer, such that the "typical workflow" code chunk can be run directly. May also be useful to rename line_df --> my_line_plot.

E.g. 👍
line_df = gapminder %>% filter(country == "Afghanistan")
my_line_plot <- ggplot(line_df, aes(x = year, y = lifeExp)) +
geom_line(colour = "#007f7f", size = 1) +
geom_hline(yintercept = 0, size = 1, colour="#333333") +
bbc_style()
finalise_plot(plot_name = my_line_plot, source = "Source: ONS", save_filepath = "filename_that_my_plot_should_be_saved_to-nc.png", width_pixels = 640, height_pixels = 550)

Just a thought. Thanks for the pkg!

@trashbirdecology
Copy link
Author

I now see that someone has submitted a pr; (#2), so I will close this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants