{"action":"created","comment":{"url":"https://api.github.com/repos/JGCRI/gcamdata/pulls/comments/173480658","pull_request_review_id":102684019,"id":173480658,"diff_hunk":"@@ -178,19 +187,23 @@ module_aglu_LB132.ag_an_For_Prices_USA_C_2005 <- function(command, ...) {\n     FAO_USA_For_Exp_t_USD_FORESTAT %>%\n       select(-countries, -country.codes, -item, -item.codes, -element.codes) %>%\n       gather_years %>%\n-      # Calculate a single unweighted average export value and a single unweighted average export quantity over price years\n       filter(year %in% aglu.MODEL_PRICE_YEARS) %>%\n-      group_by(element) %>%\n-      summarise_at(vars(value), mean, na.rm = TRUE) %>%\n-      ungroup() %>%\n       # Modify element names to one word so that they can be used as column names when spreading element and doing calculations\n       mutate(element = if_else(element == \"Export Quantity (m3)\", \"Exp_m3\", \"ExpV_USD\")) %>%\n       mutate(GCAM_commodity = \"Forest\") %>%\n       spread(element, value) %>%\n       # Calculate forest price as export value (in thous USD) divided by export quantity\n       mutate(Price_USDm3 = ExpV_USD * 1000 / Exp_m3) %>%\n+      # Convert nominal dollar year to constant 1975$\n+      left_join_error_no_match(conv_Price_DollarYear, by = \"year\") %>%\n+      mutate(Price_USDm3  = Price_USDm3 * deflator) %>%\n+      select(-deflator) %>%\n+      # Calculate a single unweighted average export value and a single unweighted average export quantity over price years\n+      group_by(GCAM_commodity) %>%\n+      summarize(Price_USDm3=mean(Price_USDm3)) %>%","path":"R/zchunk_LB132.ag_an_For_Prices_USA_C_2005.R","position":205,"original_position":191,"commit_id":"cca5b91e79c2e1cd63d99106db2f51085de7048e","original_commit_id":"979e3f385bae520f7d7871a08d777b67d42d0dde","user":{"login":"kvcalvin","id":11820268,"avatar_url":"https://avatars0.githubusercontent.com/u/11820268?v=4","gravatar_id":"","url":"https://api.github.com/users/kvcalvin","html_url":"https://github.com/kvcalvin","followers_url":"https://api.github.com/users/kvcalvin/followers","following_url":"https://api.github.com/users/kvcalvin/following{/other_user}","gists_url":"https://api.github.com/users/kvcalvin/gists{/gist_id}","starred_url":"https://api.github.com/users/kvcalvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvcalvin/subscriptions","organizations_url":"https://api.github.com/users/kvcalvin/orgs","repos_url":"https://api.github.com/users/kvcalvin/repos","events_url":"https://api.github.com/users/kvcalvin/events{/privacy}","received_events_url":"https://api.github.com/users/kvcalvin/received_events","type":"User","site_admin":false},"body":"Spacing","created_at":"2018-03-09T15:28:03Z","updated_at":"2018-03-09T15:28:03Z","html_url":"https://github.com/JGCRI/gcamdata/pull/876#discussion_r173480658","pull_request_url":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/JGCRI/gcamdata/pulls/comments/173480658"},"html":{"href":"https://github.com/JGCRI/gcamdata/pull/876#discussion_r173480658"},"pull_request":{"href":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876"}}},"pull_request":{"url":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876","id":173880251,"html_url":"https://github.com/JGCRI/gcamdata/pull/876","diff_url":"https://github.com/JGCRI/gcamdata/pull/876.diff","patch_url":"https://github.com/JGCRI/gcamdata/pull/876.patch","issue_url":"https://api.github.com/repos/JGCRI/gcamdata/issues/876","number":876,"state":"open","locked":false,"title":"Merge gcam 5 data system changes","user":{"login":"pralitp","id":7440455,"avatar_url":"https://avatars2.githubusercontent.com/u/7440455?v=4","gravatar_id":"","url":"https://api.github.com/users/pralitp","html_url":"https://github.com/pralitp","followers_url":"https://api.github.com/users/pralitp/followers","following_url":"https://api.github.com/users/pralitp/following{/other_user}","gists_url":"https://api.github.com/users/pralitp/gists{/gist_id}","starred_url":"https://api.github.com/users/pralitp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pralitp/subscriptions","organizations_url":"https://api.github.com/users/pralitp/orgs","repos_url":"https://api.github.com/users/pralitp/repos","events_url":"https://api.github.com/users/pralitp/events{/privacy}","received_events_url":"https://api.github.com/users/pralitp/received_events","type":"User","site_admin":false},"body":"Changes from a high level:\r\nPre 4.4 changes:\r\nUpdating LDS output to fix “amazon GLU mapping” issue\r\nFix GLU names for L181_yieldmult in L2252.land_input_5\r\nbugfix: include irrigation in yield lookup in order to differentiate irr/rfd yields\r\n\r\nPost 4.4:\r\nFrom a high level:\r\nNegative emissions budget constraints\r\nCapacity factor now part of technology instead of in each input\r\nRenewables capacity backup bug fix\r\nRegional ag price calibration\r\nFix Industry Price elasticity\r\nFix managed carbon carbon content (See #875)\r\nNon-CO2 updates\r\nBug fix unit conversions for GCAM-USA wind\r\n\r\nA checklist of actual file changes (note some of the energy system assumption files were just line ending changes so they did not get updates in DSR):\r\n[dsr_files_changed.txt](https://github.com/JGCRI/gcamdata/files/1795112/dsr_files_changed.txt)\r\n\r\nA diff of the R file changes in the old data system:\r\n[dsr_R_changes.txt](https://github.com/JGCRI/gcamdata/files/1795115/dsr_R_changes.txt)\r\n\r\nA checklist for update the `compdata` if that is helpful:\r\n[compdata-checklist.txt](https://github.com/JGCRI/gcamdata/files/1795117/compdata-checklist.txt)\r\n\r\n","created_at":"2018-03-08T23:27:48Z","updated_at":"2018-03-09T15:28:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f74b3e86798d1f16f7958c55cb686fd3476b5ce","assignee":null,"assignees":[],"requested_reviewers":[{"login":"bpbond","id":1956468,"avatar_url":"https://avatars2.githubusercontent.com/u/1956468?v=4","gravatar_id":"","url":"https://api.github.com/users/bpbond","html_url":"https://github.com/bpbond","followers_url":"https://api.github.com/users/bpbond/followers","following_url":"https://api.github.com/users/bpbond/following{/other_user}","gists_url":"https://api.github.com/users/bpbond/gists{/gist_id}","starred_url":"https://api.github.com/users/bpbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpbond/subscriptions","organizations_url":"https://api.github.com/users/bpbond/orgs","repos_url":"https://api.github.com/users/bpbond/repos","events_url":"https://api.github.com/users/bpbond/events{/privacy}","received_events_url":"https://api.github.com/users/bpbond/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":571302986,"url":"https://api.github.com/repos/JGCRI/gcamdata/labels/aglu","name":"aglu","color":"d4c5f9","default":false},{"id":571302845,"url":"https://api.github.com/repos/JGCRI/gcamdata/labels/emissions","name":"emissions","color":"d4c5f9","default":false},{"id":571303099,"url":"https://api.github.com/repos/JGCRI/gcamdata/labels/energy","name":"energy","color":"d4c5f9","default":false},{"id":571303248,"url":"https://api.github.com/repos/JGCRI/gcamdata/labels/gcam-usa","name":"gcam-usa","color":"d4c5f9","default":false},{"id":608079817,"url":"https://api.github.com/repos/JGCRI/gcamdata/labels/monster","name":"monster","color":"f9d0c4","default":false}],"milestone":{"url":"https://api.github.com/repos/JGCRI/gcamdata/milestones/2","html_url":"https://github.com/JGCRI/gcamdata/milestone/2","labels_url":"https://api.github.com/repos/JGCRI/gcamdata/milestones/2/labels","id":2172416,"number":2,"title":"Version 1","description":"All data system code rewritten. Outputs verified.","creator":{"login":"bpbond","id":1956468,"avatar_url":"https://avatars2.githubusercontent.com/u/1956468?v=4","gravatar_id":"","url":"https://api.github.com/users/bpbond","html_url":"https://github.com/bpbond","followers_url":"https://api.github.com/users/bpbond/followers","following_url":"https://api.github.com/users/bpbond/following{/other_user}","gists_url":"https://api.github.com/users/bpbond/gists{/gist_id}","starred_url":"https://api.github.com/users/bpbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpbond/subscriptions","organizations_url":"https://api.github.com/users/bpbond/orgs","repos_url":"https://api.github.com/users/bpbond/repos","events_url":"https://api.github.com/users/bpbond/events{/privacy}","received_events_url":"https://api.github.com/users/bpbond/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":200,"state":"open","created_at":"2016-12-03T00:13:10Z","updated_at":"2018-03-08T23:27:48Z","due_on":"2018-03-30T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876/commits","review_comments_url":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876/comments","review_comment_url":"https://api.github.com/repos/JGCRI/gcamdata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JGCRI/gcamdata/issues/876/comments","statuses_url":"https://api.github.com/repos/JGCRI/gcamdata/statuses/cca5b91e79c2e1cd63d99106db2f51085de7048e","head":{"label":"JGCRI:merge-gcam-5-DS","ref":"merge-gcam-5-DS","sha":"cca5b91e79c2e1cd63d99106db2f51085de7048e","user":{"login":"JGCRI","id":8431983,"avatar_url":"https://avatars1.githubusercontent.com/u/8431983?v=4","gravatar_id":"","url":"https://api.github.com/users/JGCRI","html_url":"https://github.com/JGCRI","followers_url":"https://api.github.com/users/JGCRI/followers","following_url":"https://api.github.com/users/JGCRI/following{/other_user}","gists_url":"https://api.github.com/users/JGCRI/gists{/gist_id}","starred_url":"https://api.github.com/users/JGCRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JGCRI/subscriptions","organizations_url":"https://api.github.com/users/JGCRI/orgs","repos_url":"https://api.github.com/users/JGCRI/repos","events_url":"https://api.github.com/users/JGCRI/events{/privacy}","received_events_url":"https://api.github.com/users/JGCRI/received_events","type":"Organization","site_admin":false},"repo":{"id":72801482,"name":"gcamdata","full_name":"JGCRI/gcamdata","owner":{"login":"JGCRI","id":8431983,"avatar_url":"https://avatars1.githubusercontent.com/u/8431983?v=4","gravatar_id":"","url":"https://api.github.com/users/JGCRI","html_url":"https://github.com/JGCRI","followers_url":"https://api.github.com/users/JGCRI/followers","following_url":"https://api.github.com/users/JGCRI/following{/other_user}","gists_url":"https://api.github.com/users/JGCRI/gists{/gist_id}","starred_url":"https://api.github.com/users/JGCRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JGCRI/subscriptions","organizations_url":"https://api.github.com/users/JGCRI/orgs","repos_url":"https://api.github.com/users/JGCRI/repos","events_url":"https://api.github.com/users/JGCRI/events{/privacy}","received_events_url":"https://api.github.com/users/JGCRI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JGCRI/gcamdata","description":"GCAM data system rewrite","fork":false,"url":"https://api.github.com/repos/JGCRI/gcamdata","forks_url":"https://api.github.com/repos/JGCRI/gcamdata/forks","keys_url":"https://api.github.com/repos/JGCRI/gcamdata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JGCRI/gcamdata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JGCRI/gcamdata/teams","hooks_url":"https://api.github.com/repos/JGCRI/gcamdata/hooks","issue_events_url":"https://api.github.com/repos/JGCRI/gcamdata/issues/events{/number}","events_url":"https://api.github.com/repos/JGCRI/gcamdata/events","assignees_url":"https://api.github.com/repos/JGCRI/gcamdata/assignees{/user}","branches_url":"https://api.github.com/repos/JGCRI/gcamdata/branches{/branch}","tags_url":"https://api.github.com/repos/JGCRI/gcamdata/tags","blobs_url":"https://api.github.com/repos/JGCRI/gcamdata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JGCRI/gcamdata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JGCRI/gcamdata/git/refs{/sha}","trees_url":"https://api.github.com/repos/JGCRI/gcamdata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JGCRI/gcamdata/statuses/{sha}","languages_url":"https://api.github.com/repos/JGCRI/gcamdata/languages","stargazers_url":"https://api.github.com/repos/JGCRI/gcamdata/stargazers","contributors_url":"https://api.github.com/repos/JGCRI/gcamdata/contributors","subscribers_url":"https://api.github.com/repos/JGCRI/gcamdata/subscribers","subscription_url":"https://api.github.com/repos/JGCRI/gcamdata/subscription","commits_url":"https://api.github.com/repos/JGCRI/gcamdata/commits{/sha}","git_commits_url":"https://api.github.com/repos/JGCRI/gcamdata/git/commits{/sha}","comments_url":"https://api.github.com/repos/JGCRI/gcamdata/comments{/number}","issue_comment_url":"https://api.github.com/repos/JGCRI/gcamdata/issues/comments{/number}","contents_url":"https://api.github.com/repos/JGCRI/gcamdata/contents/{+path}","compare_url":"https://api.github.com/repos/JGCRI/gcamdata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JGCRI/gcamdata/merges","archive_url":"https://api.github.com/repos/JGCRI/gcamdata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JGCRI/gcamdata/downloads","issues_url":"https://api.github.com/repos/JGCRI/gcamdata/issues{/number}","pulls_url":"https://api.github.com/repos/JGCRI/gcamdata/pulls{/number}","milestones_url":"https://api.github.com/repos/JGCRI/gcamdata/milestones{/number}","notifications_url":"https://api.github.com/repos/JGCRI/gcamdata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JGCRI/gcamdata/labels{/name}","releases_url":"https://api.github.com/repos/JGCRI/gcamdata/releases{/id}","deployments_url":"https://api.github.com/repos/JGCRI/gcamdata/deployments","created_at":"2016-11-04T01:09:57Z","updated_at":"2017-11-20T22:14:56Z","pushed_at":"2018-03-09T14:53:14Z","git_url":"git://github.com/JGCRI/gcamdata.git","ssh_url":"git@github.com:JGCRI/gcamdata.git","clone_url":"https://github.com/JGCRI/gcamdata.git","svn_url":"https://github.com/JGCRI/gcamdata","homepage":null,"size":640017,"stargazers_count":2,"watchers_count":2,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":110,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":110,"watchers":2,"default_branch":"master"}},"base":{"label":"JGCRI:master","ref":"master","sha":"7cb4ec0698c4a15102719c4e4fab0f479ba1a1fb","user":{"login":"JGCRI","id":8431983,"avatar_url":"https://avatars1.githubusercontent.com/u/8431983?v=4","gravatar_id":"","url":"https://api.github.com/users/JGCRI","html_url":"https://github.com/JGCRI","followers_url":"https://api.github.com/users/JGCRI/followers","following_url":"https://api.github.com/users/JGCRI/following{/other_user}","gists_url":"https://api.github.com/users/JGCRI/gists{/gist_id}","starred_url":"https://api.github.com/users/JGCRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JGCRI/subscriptions","organizations_url":"https://api.github.com/users/JGCRI/orgs","repos_url":"https://api.github.com/users/JGCRI/repos","events_url":"https://api.github.com/users/JGCRI/events{/privacy}","received_events_url":"https://api.github.com/users/JGCRI/received_events","type":"Organization","site_admin":false},"repo":{"id":72801482,"name":"gcamdata","full_name":"JGCRI/gcamdata","owner":{"login":"JGCRI","id":8431983,"avatar_url":"https://avatars1.githubusercontent.com/u/8431983?v=4","gravatar_id":"","url":"https://api.github.com/users/JGCRI","html_url":"https://github.com/JGCRI","followers_url":"https://api.github.com/users/JGCRI/followers","following_url":"https://api.github.com/users/JGCRI/following{/other_user}","gists_url":"https://api.github.com/users/JGCRI/gists{/gist_id}","starred_url":"https://api.github.com/users/JGCRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JGCRI/subscriptions","organizations_url":"https://api.github.com/users/JGCRI/orgs","repos_url":"https://api.github.com/users/JGCRI/repos","events_url":"https://api.github.com/users/JGCRI/events{/privacy}","received_events_url":"https://api.github.com/users/JGCRI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JGCRI/gcamdata","description":"GCAM data system rewrite","fork":false,"url":"https://api.github.com/repos/JGCRI/gcamdata","forks_url":"https://api.github.com/repos/JGCRI/gcamdata/forks","keys_url":"https://api.github.com/repos/JGCRI/gcamdata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JGCRI/gcamdata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JGCRI/gcamdata/teams","hooks_url":"https://api.github.com/repos/JGCRI/gcamdata/hooks","issue_events_url":"https://api.github.com/repos/JGCRI/gcamdata/issues/events{/number}","events_url":"https://api.github.com/repos/JGCRI/gcamdata/events","assignees_url":"https://api.github.com/repos/JGCRI/gcamdata/assignees{/user}","branches_url":"https://api.github.com/repos/JGCRI/gcamdata/branches{/branch}","tags_url":"https://api.github.com/repos/JGCRI/gcamdata/tags","blobs_url":"https://api.github.com/repos/JGCRI/gcamdata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JGCRI/gcamdata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JGCRI/gcamdata/git/refs{/sha}","trees_url":"https://api.github.com/repos/JGCRI/gcamdata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JGCRI/gcamdata/statuses/{sha}","languages_url":"https://api.github.com/repos/JGCRI/gcamdata/languages","stargazers_url":"https://api.github.com/repos/JGCRI/gcamdata/stargazers","contributors_url":"https://api.github.com/repos/JGCRI/gcamdata/contributors","subscribers_url":"https://api.github.com/repos/JGCRI/gcamdata/subscribers","subscription_url":"https://api.github.com/repos/JGCRI/gcamdata/subscription","commits_url":"https://api.github.com/repos/JGCRI/gcamdata/commits{/sha}","git_commits_url":"https://api.github.com/repos/JGCRI/gcamdata/git/commits{/sha}","comments_url":"https://api.github.com/repos/JGCRI/gcamdata/comments{/number}","issue_comment_url":"https://api.github.com/repos/JGCRI/gcamdata/issues/comments{/number}","contents_url":"https://api.github.com/repos/JGCRI/gcamdata/contents/{+path}","compare_url":"https://api.github.com/repos/JGCRI/gcamdata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JGCRI/gcamdata/merges","archive_url":"https://api.github.com/repos/JGCRI/gcamdata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JGCRI/gcamdata/downloads","issues_url":"https://api.github.com/repos/JGCRI/gcamdata/issues{/number}","pulls_url":"https://api.github.com/repos/JGCRI/gcamdata/pulls{/number}","milestones_url":"https://api.github.com/repos/JGCRI/gcamdata/milestones{/number}","notifications_url":"https://api.github.com/repos/JGCRI/gcamdata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JGCRI/gcamdata/labels{/name}","releases_url":"https://api.github.com/repos/JGCRI/gcamdata/releases{/id}","deployments_url":"https://api.github.com/repos/JGCRI/gcamdata/deployments","created_at":"2016-11-04T01:09:57Z","updated_at":"2017-11-20T22:14:56Z","pushed_at":"2018-03-09T14:53:14Z","git_url":"git://github.com/JGCRI/gcamdata.git","ssh_url":"git@github.com:JGCRI/gcamdata.git","clone_url":"https://github.com/JGCRI/gcamdata.git","svn_url":"https://github.com/JGCRI/gcamdata","homepage":null,"size":640017,"stargazers_count":2,"watchers_count":2,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":110,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":110,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876"},"html":{"href":"https://github.com/JGCRI/gcamdata/pull/876"},"issue":{"href":"https://api.github.com/repos/JGCRI/gcamdata/issues/876"},"comments":{"href":"https://api.github.com/repos/JGCRI/gcamdata/issues/876/comments"},"review_comments":{"href":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876/comments"},"review_comment":{"href":"https://api.github.com/repos/JGCRI/gcamdata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JGCRI/gcamdata/pulls/876/commits"},"statuses":{"href":"https://api.github.com/repos/JGCRI/gcamdata/statuses/cca5b91e79c2e1cd63d99106db2f51085de7048e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kvcalvin"}}