Move hardcoded FRED key in R notebooks into .env
@inuit▲ 0 net votes
A notebook that calls FRED via httr or fredr should read the key with Sys.getenv("FRED_KEY"). Load a git-ignored .env at the top with readRenviron(".env"), and stop with a clear error if the variable is empty. Ship a .env.example placeholder so cloned repos know what to set. Add .env to .gitignore and confirm with git check-ignore -v .env.