This repository is simply a collection of other repositories that are designed to help you work more efficiently, plus a "how to help" section. I used my project template to start this up, so there are probably a bunch of extraneous bits. Consider this a table of contents.
- All sorts of information about the data in the NEFSC Oracle databases.
- A project template, full of fun stuff to get your project started on the right foot.
- Information about setting up github and extracting oracle data on the servers
- Some code to run R on the NEFSC Servers.
- A scraper for the NMFS foreign trade website.
- Code to extract external data from BLS, St. Louis Federal Reserve, and NMFS FOSS.
- Code to construct Affiliated Firms for the Regulatory Flexibility Act Analyses.
- Some code to run Call Stata from R.
- A semi-random jumble of code scraps.
- Code to assemble custom rasters.
- Code to work with the NCEP NARR reanalysis data .
- The offshoreWind package.
To just keep tabs on a repository for changes, you can watch it using the watch button on the top right. 
Please help make these more valuable and keep them up-to-date. To add your knowledge:
This will create your own fork and you will see something that looks like this: 
- Make your changes, and use the preview button to make sure it looks nice.

- Issue a Pull Request so the changes get into the document. It's a good idea to request a review so the maintainer knows that they need to review and commit.
- Fork - It's in the top right of github.

- Make a local copy of your fork.
- Commit your changes to your fork. Push the changes up to github
- Submit a Pull Request to bring your changes in to the main one.
Who doesn't like a little extra? Here are some resources on Git and Github:
- https://sethrobertson.github.io/GitFixUm/fixup.html : how to undo things in git
- https://rewind.com/blog/recovering-deleted-files-in-github): how to recover deleted files.
- Why bother with git
- Using Git with Rstudio
- Even more on Github with Rstudio
When merging Branch B <- Branch new_feature, there are sometimes merge conflicts. This happens when code has changed in both-- git cannot possibly know which to keep. I recommend using Github Desktop or the command line to deal with merge conflicts. The reason not to use Github's web interface is because github merges Branch new_feature <-Branch B when it resolves the conflicts. You may or may not want to do this. Resolving merge conflicts is probably the scariest part of using git, so ask for help if you are unsure of what to do.
To deal with merge conflicts in the command line from within Rstudio, click on the "Terminal" tab:
git pull
git checkout B
git merge new_feature
You will get a "merge conflict" message. Open all the files that are marked with a "U" and resolve the conflicts. Then save, commit, and push as usual.
When there's a merge conflict, git will create a combined file that has code from both. Code from one branch will show up between:
<<<<<<< HEAD
and
======
Code from the other branch shows up between
======
>>>>>>>
You have to figure out which you want and then delete these parts:
<<<<<<< HEAD
======
>>>>>>>
This is a way to go back to an earlier version of a file and remove any changes to the file from a specific commit ID. You'll want to do this in the Terminal if working in RStudio. More info can be found here.
- Find the Commit ID
- Find the File Path
- Revert the file using the following code:
git checkout [commit ID] -- path/to/file
- Commit the change:
git commit -m 'commit message'
You might want to delete local branches. Perhaps they no longer exist on github after they were pulled into main? To do this open a terminal. In the working directory type:
git branch
to list the names of your branches and then
git branch -d <branch_to_delete>
You will need to use the -D option if you are deleting a branch that has not been fully merged. Like if some of your new code is bad.
After you merge a branch in github, you should also delete it on your local machine. Although nothing bad will happen if you don't. To do so type:
git remote show origin
It will show how your local branches correspond to the remote branches on github. It will also tell you about stale branches (that your computer think exist, but are no longer on github). Stale branches can be deleted with
git remote prune origin
If you want to make a suggestion on a pull request, enclose your new code with
```[suggestion]
change
```
https://stackoverflow.com/questions/60311158/how-can-i-suggest-multiple-lines-be-changed-in-markdown
This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project code is provided on an ‘as is’ basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.”
- who worked on this project: Min-Yang Lee
- when this project was created: October, 2021
- what the project does: Brief directory of various bits of code that will help Social Science folks at NEFSC work more efficiently.
- why the project is useful: Helps people be a little more efficient
- how users can get started with the project: Just GoGoGo.
- where users can get help with your project: email me or open an issue
- who maintains and contributes to the project. Min-Yang
See here for the license file
