{"action":"created","issue":{"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1423","repository_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed","labels_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1423/labels{/name}","comments_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1423/comments","events_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1423/events","html_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1423","id":171511558,"number":1423,"title":"Use Precalculated LS, C, and P for Agricultural Land Uses","user":{"login":"rajadain","id":1430060,"avatar_url":"https://avatars.githubusercontent.com/u/1430060?v=3","gravatar_id":"","url":"https://api.github.com/users/rajadain","html_url":"https://github.com/rajadain","followers_url":"https://api.github.com/users/rajadain/followers","following_url":"https://api.github.com/users/rajadain/following{/other_user}","gists_url":"https://api.github.com/users/rajadain/gists{/gist_id}","starred_url":"https://api.github.com/users/rajadain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajadain/subscriptions","organizations_url":"https://api.github.com/users/rajadain/orgs","repos_url":"https://api.github.com/users/rajadain/repos","events_url":"https://api.github.com/users/rajadain/events{/privacy}","received_events_url":"https://api.github.com/users/rajadain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"kellyi","id":4165523,"avatar_url":"https://avatars.githubusercontent.com/u/4165523?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyi","html_url":"https://github.com/kellyi","followers_url":"https://api.github.com/users/kellyi/followers","following_url":"https://api.github.com/users/kellyi/following{/other_user}","gists_url":"https://api.github.com/users/kellyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyi/subscriptions","organizations_url":"https://api.github.com/users/kellyi/orgs","repos_url":"https://api.github.com/users/kellyi/repos","events_url":"https://api.github.com/users/kellyi/events{/privacy}","received_events_url":"https://api.github.com/users/kellyi/received_events","type":"User","site_admin":false},"assignees":[{"login":"kellyi","id":4165523,"avatar_url":"https://avatars.githubusercontent.com/u/4165523?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyi","html_url":"https://github.com/kellyi","followers_url":"https://api.github.com/users/kellyi/followers","following_url":"https://api.github.com/users/kellyi/following{/other_user}","gists_url":"https://api.github.com/users/kellyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyi/subscriptions","organizations_url":"https://api.github.com/users/kellyi/orgs","repos_url":"https://api.github.com/users/kellyi/repos","events_url":"https://api.github.com/users/kellyi/events{/privacy}","received_events_url":"https://api.github.com/users/kellyi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-08-16T20:38:02Z","updated_at":"2016-08-16T21:44:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/pulls/1423","html_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1423","diff_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1423.diff","patch_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1423.patch"},"body":"## Overview\r\n\r\nOriginal MapShed uses a Flow Accumulation method to calculate the LS factor for a given area of interest. However, due to missing data, we have been using the Stream Flow method. Unfortunately, this is less accurate, especially for agricultural land uses such as Hay/Pasture and Cropland.\r\n\r\nTo alleviate this, Dr. Barry Evans has provided us with an updated county data file, which we import to the `ms_county_animals` table, that includes these new columns:\r\n\r\n+    `crop_ls` numeric(6,3),\r\n+    `hp_ls` numeric(6,3),\r\n+    `crop_c` numeric(6,3),\r\n+    `crop_p` numeric(6,3),\r\n+    `hp_c` numeric(6,3),\r\n+    `hp_p` numeric(6,3)\r\n\r\nWhich correspond to the LS, C and P factor values for Hay/Pasture and Cropland for each county.\r\n\r\nOur new approach is to calculated the area-weighted average of each of these values for all counties in an area of interest, and use them instead of the regular calculations. Regular calculations are still used for all other land use types.\r\n\r\n## Testing Instructions\r\n\r\nChoose a standard shape, such as a HUC-12, on `develop`, create a MapShed project and export a GMS file from the Current Conditions scenario.\r\n\r\nCheck out this branch. Update the `ms_county_animals` dataset to include the new columns:\r\n\r\n```bash\r\n$ vagrant ssh app -c 'cd /vagrant && ./scripts/aws/setupdb.sh -f ms_county_animals.sql.gz'\r\n```\r\n\r\nRun Celery in the debugger to make sure it picks up new changes:\r\n\r\n```bash\r\n$ ./scripts/debugcelery.sh\r\n```\r\n\r\nCreate a new MapShed project with the same standard shape as before, and export another GMS file from the Current Conditions scenario. You should see differences in the LS, C, and P values of Hay/Pasture and Cropland:\r\n\r\n```diff\r\n--- Little_Neshaminy_develop_20160816__Current_Conditions.gms\t2016-08-16 13:32:14.000000000 -0400\r\n+++ Little_Neshaminy_with_Corrected_LS_C_P__Current_Conditions.gms\t2016-08-16 15:51:56.000000000 -0400\r\n@@ -17,8 +17,8 @@\r\n Oct,1.0457270621091717,10.8,0,0.091,0,0,1.385\r\n Nov,1.0087081300568108,9.7,0,0.091,0,0,1.385\r\n Dec,0.9872371494664416,9.1,0,0.091,0,0,1.385\r\n-Hay/Past,803.1,75,0.2714132968948771,0.22836631257618079,0.03,0.45\r\n-Cropland,571.1,82,0.27604142433856804,0.22735773644384383,0.42,0.45\r\n+Hay/Past,803.1,75,0.2714132968948771,0.849484581102515,0.01,1\r\n+Cropland,571.1,82,0.27604142433856804,0.738799109654387,0.258101173614922,0.773079185225836\r\n Forest,2071.0,73,0.27157785493664266,0.2151564164245495,0.002,0.45\r\n Wetland,364.7,88.5,0.31307519406197576,0.20441617849311078,0.01,0.1\r\n Disturbed,0.0,0,0,0,0.08,0.1\r\n```\r\n\r\n## Deployment Notes\r\n\r\nThe `ms_county_animals` table will have to be reloaded on Staging and Production whenever this is deployed. This should be very straightforward as nothing links to that table, and the `DROP` will be handled by the script itself. Run the deployment equivalent of this Vagrant command:\r\n\r\n```bash\r\n$ vagrant ssh app -c 'cd /vagrant && ./scripts/aws/setupdb.sh -f ms_county_animals.sql.gz'\r\n```\r\n\r\nConnects #1418 "},"comment":{"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/comments/240249210","html_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1423#issuecomment-240249210","issue_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1423","id":240249210,"user":{"login":"kellyi","id":4165523,"avatar_url":"https://avatars.githubusercontent.com/u/4165523?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyi","html_url":"https://github.com/kellyi","followers_url":"https://api.github.com/users/kellyi/followers","following_url":"https://api.github.com/users/kellyi/following{/other_user}","gists_url":"https://api.github.com/users/kellyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyi/subscriptions","organizations_url":"https://api.github.com/users/kellyi/orgs","repos_url":"https://api.github.com/users/kellyi/repos","events_url":"https://api.github.com/users/kellyi/events{/privacy}","received_events_url":"https://api.github.com/users/kellyi/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T21:44:18Z","updated_at":"2016-08-16T21:44:18Z","body":"These changes look good to me. The logic in the `ag_ls_c_p` seems to implement what was described in the google doc above, and the output value from the two AOIs above has changed as a result. +1 from me.\r\n\r\nI think you mentioned asking BME whether the Little Neshaminy values appeared to be accurate? Should we send values from another known AOI to get another point of comparison?"}}
{"actor":{"display_login":"kellyi"}}