Last active
May 13, 2021 14:27
-
-
Save billspat/802a77eb0956252fa6f4f10fa2dfa630 to your computer and use it in GitHub Desktop.
NSF badge maker!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make NSF award badges for your github readme or Markdown-based website! | |
nsf_badges <- function(award_id) { | |
nsf_button_template="[](https://nsf.gov/awardsearch/showAward?AWD_ID={award_id})]" | |
badges<- stringr::str_glue(nsf_button_template) | |
return(paste(badges, collapse = ' ') ) | |
} | |
# # example | |
# # if I have two NSF awards 1234567 and 4567890 | |
# source("nsfbadger.R") | |
# nsf_badges(list(1234567,4567890)) | |
# [1] "[](https://nsf.gov/awardsearch/showAward?AWD_ID=1234567)] [](https://nsf.gov/awardsearch/showAward?AWD_ID=4567890)]" | |
# copy and paste into your markdown file e.g. readme.md | |
# note: no error checking | |
# you can put anything for the award number and it will work | |
# based on the awesome https://shields.io/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment