There are so many lovely packages for colour palettes (see links at the bottom of this post for more).
This new one called
feather by Shandiya Balasubramanium is inspired by Australian birds and is delightful.
Today I built my first R package! Meet feather: a set of colour palettes inspired by the plumage of Australian birds. It's a work in progress and a bit rough around the edges, but I'm pretty proud of it#RStats #WildOz #DataVisualization https://t.co/9kjavQ4Q50— Shandiya Balasubramaniam (@ShandiyaB) January 7, 2021
The vignette doesn’t have any pictures of the birds though, so I thought it might be a good opportunity to help Shandiya out and try my first pull request. I am documenting the process here, so I can refer back to it for next time.
I’ve installed the feather package from github…
… and loaded the palette names
##  "spotted_pardalote" "plains_wanderer" ##  "bee_eater" "rose_crowned_fruit_dove" ##  "eastern_rosella" "oriole" ##  "princess_parrot" "blue_faced_parrot_finch" ##  "superb_fairy_wren" "cassowary"
You can print each palette by using the
get_pal() function and the
print_pal() function. There is the palette for the Eastern Rosella
er <- get_pal("eastern_rosella") print_pal(er)
Image credit: Patrick_K59. This file is licensed under the CC BY 2.0, https://commons.wikimedia.org/w/index.php?curid=34831381. Image source: Wikimedia Commons.
Image credit: Bjørn Christian Tørrissen, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=6874281
When making a pull request you are asking the person who wrote the package (or who owns the repo) to pull the changes you have made into the original repo.
Forking is the process of creating a copy of a repo owned by someone else in your github account. There is a button on the top right corner of every github repo that allows you to Fork a copy.
Once you have a copy of the repo in your github account, use the green button to clone the forked copy on to your machine.
You can copy the url and within RStudio use File-New project-From Version control. Or in the terminal use…
pwdto print your working directory and then
cdto navigate to the folder where you want to clone
git clone "paste URL"to clone the repo into that location
pwd cd Users/jenny/Desktop/git git clone "paste URL here"
Once you clone the repo to your machine, you can make changes. I open the README.Rmd file added the images linked above. I knitted the README to check it that it looked OK and saved the file.
Once I had the README looking like I wanted, I pushed my changes to the forked copy in my repo using these commands in the terminal.
git add . git commit -m "adding bird images to README" git push
Now for the hard bit, fingers crossed. I’m following the instructions here.
Refresh the browser on your forked repo and check that the README now includes your changes.
Navigate to the original repo (where you created the fork in the first place) and choose the Pull requests tab.