{"action":"created","issue":{"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1425","repository_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed","labels_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1425/labels{/name}","comments_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1425/comments","events_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1425/events","html_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1425","id":172224749,"number":1425,"title":"Retrieve and display weighted animal population","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},"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":5,"created_at":"2016-08-19T21:32:09Z","updated_at":"2016-08-23T21:50:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/pulls/1425","html_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1425","diff_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1425.diff","patch_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1425.patch"},"body":"This PR updates the \"Analyze\" tab results to include a livestock tab which displays the weighted animal population presented in terms of \"AEU per hectare\" and \"AEU Proportion\" -- e.g., what percentage each animal type comprises of the total animal AEU per hectare.\r\n\r\nThis works by making a database query with the input aoi to retrieve data from `ms_county_animals`, then appending it to the outgoing analyze results. There are a few commits here:\r\n\r\n- the first commit sets up the backend to retrieve and parse the animal data, then append it to the outgoing json results\r\n- the second updates some of the CSS to make the style rules amenable to displaying an analyze tab with just a table and no bar chart\r\n- third handles setting up a model, view, and template for the livestock tab in the front-end code\r\n- fourth is a fixup to remove code which retrieved what I believe is some unnecessary data pulled from the db in the first commit (I'll squash before merging)\r\n\r\nThe results currently look like this:\r\n\r\n![screen shot 2016-08-22 at 12 25 54 pm](https://cloud.githubusercontent.com/assets/4165523/17862740/8ee2b092-6864-11e6-8fbb-1a845ac26341.png)\r\n\r\n![screen shot 2016-08-22 at 12 26 19 pm](https://cloud.githubusercontent.com/assets/4165523/17862745/9451a10a-6864-11e6-9639-432e1b106cec.png)\r\n\r\n**Testing**\r\n- get this branch, `vagrant up`, `./scripts/bundle.sh`, then open the browser console and visit `localhost:8000`\r\n- select an aoi to analyze\r\n- verify that the results now includes a \"Livestock\" tab which displays AEU per hectare in one column and a percentage value in the other column\r\n- repeat with a few more aois\r\n- try looking at some of the other pre-existing analyze tabs and also modeling an aoi to verify that nothing has changed with them as a result of these changes\r\n- verify that you haven't seen any errors in the console.\r\n\r\nConnects #1424 "},"comment":{"url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/comments/241891327","html_url":"https://github.com/WikiWatershed/model-my-watershed/pull/1425#issuecomment-241891327","issue_url":"https://api.github.com/repos/WikiWatershed/model-my-watershed/issues/1425","id":241891327,"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-23T21:50:20Z","updated_at":"2016-08-23T21:50:20Z","body":"I pushed an update which revises this to use the existing MapShed implementation of `animal_energy_units` to retrieve the population data, then uses a wrapper function to prepare that data to be sent back to the front-end.\r\n\r\nThe table now looks like this on the front-end:\r\n\r\n![screen shot 2016-08-23 at 5 49 48 pm](https://cloud.githubusercontent.com/assets/4165523/17911112/0b75d5c6-695a-11e6-83f9-7e1cbf603015.png)\r\n"}}
{"actor":{"display_login":"kellyi"}}