Skip to content

Scenarios and Prediction Updates #4043

Open
ananyak534 wants to merge 3 commits into
PecanProject:developfrom
ananyak534:add_transition_matrix
Open

Scenarios and Prediction Updates #4043
ananyak534 wants to merge 3 commits into
PecanProject:developfrom
ananyak534:add_transition_matrix

Conversation

@ananyak534

Copy link
Copy Markdown
Contributor

The scripts "scenarios.R" and "predict_and_store.R" now include updates that use the CARB scenarios sheet and produce county-level outputs.

@mdietze mdietze left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a readme for the overall folder that others could read to understand how to use the different scripts and how they relate to one another

@@ -0,0 +1,310 @@
setwd("/projectnb/dietzelab/ananyak")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the first line of code, would be good to have some lines of documentation explaining what each script is for and the key variables that need to be set

#normal stats are skewed when dates cluster around New Year - ex) 365 and 5 are actually close but
#numerically far apart

fix_wrap_doy = function(x, low_cutoff = 45, high_cutoff = 320) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend roxygen style documentation for functions


##--------load lookup table---------

lookup = fread("/projectnb/dietzelab/ccmmf/management/LandIQ_cropCode_lookup_table.csv")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, try to put local variables that a user might need to redefine at the top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants