{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/46","labels_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/46/comments","events_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/46/events","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/issues/46","id":106583061,"number":46,"title":"Experiments with webapp","user":{"login":"Amy-Xu","id":10549597,"avatar_url":"https://avatars.githubusercontent.com/u/10549597?v=3","gravatar_id":"","url":"https://api.github.com/users/Amy-Xu","html_url":"https://github.com/Amy-Xu","followers_url":"https://api.github.com/users/Amy-Xu/followers","following_url":"https://api.github.com/users/Amy-Xu/following{/other_user}","gists_url":"https://api.github.com/users/Amy-Xu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amy-Xu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amy-Xu/subscriptions","organizations_url":"https://api.github.com/users/Amy-Xu/orgs","repos_url":"https://api.github.com/users/Amy-Xu/repos","events_url":"https://api.github.com/users/Amy-Xu/events{/privacy}","received_events_url":"https://api.github.com/users/Amy-Xu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/milestones/1","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/milestones/puf09","labels_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/milestones/1/labels","id":1300223,"number":1,"title":"puf09","description":"This is a milestone for changes we want to make to the webapp that will coincide with the use of the new 2009 PUF data on TaxBrain.","creator":{"login":"talumbau","id":1891418,"avatar_url":"https://avatars.githubusercontent.com/u/1891418?v=3","gravatar_id":"","url":"https://api.github.com/users/talumbau","html_url":"https://github.com/talumbau","followers_url":"https://api.github.com/users/talumbau/followers","following_url":"https://api.github.com/users/talumbau/following{/other_user}","gists_url":"https://api.github.com/users/talumbau/gists{/gist_id}","starred_url":"https://api.github.com/users/talumbau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talumbau/subscriptions","organizations_url":"https://api.github.com/users/talumbau/orgs","repos_url":"https://api.github.com/users/talumbau/repos","events_url":"https://api.github.com/users/talumbau/events{/privacy}","received_events_url":"https://api.github.com/users/talumbau/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":6,"state":"open","created_at":"2015-09-10T23:16:07Z","updated_at":"2015-09-15T19:44:55Z","due_on":"2015-09-29T05:00:00Z","closed_at":null},"comments":4,"created_at":"2015-09-15T15:35:03Z","updated_at":"2015-09-15T20:37:31Z","closed_at":null,"body":"To identify potential bizarre behaviors in webapp, I'm planning to do some experiments for each parameter in TaxBrain following these categories of value range:\r\n\r\n- theoretical reasonable range\r\n- extremely large values\r\n- negative values\r\n- other corner cases\r\n\r\nI'll list the results in this issue and keep updating as I go. I'm thinking to do it this way.\r\n\r\nIf the webapp's able to generate a result table, I would compare it with my local taxcalc and see whether they are the same and whether the results make economic sense. If neither of them makes sense, I would try to see if anything went wrong with taxcalc. If my local tables make sense, I would put down what I got from both webapp and my local taxcalc for later webapp debugging. \r\n\r\nFor some other errors that look similar, I would just put them into one big category if I can. It seems so far many errors I got are coming from extremely large values. I would just put all of them in a big category without adding a revenue table for each parameter. Specifically, at the moment there would be a key error category. In the category, I'll list all the parameter names with experiment values in the parenthesis. \r\n\r\nKey error from extremely large parameter inputs\r\n----------------------------------------------------------------\r\n* Max Taxable Earnings for Social Security (10^10)\r\n* Maximum foreign earned income exclusion (9000000)\r\n* Adjustment for self employed health insurance haircut (0.5)\r\n* Personal Exemption (4100)\r\n\r\nAny suggestions/thoughts on this? @talumbau @MattHJensen Please also help me tag any one relevant to this task as well. Thank you!"},"comment":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/comments/140530548","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/issues/46#issuecomment-140530548","issue_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/46","id":140530548,"user":{"login":"talumbau","id":1891418,"avatar_url":"https://avatars.githubusercontent.com/u/1891418?v=3","gravatar_id":"","url":"https://api.github.com/users/talumbau","html_url":"https://github.com/talumbau","followers_url":"https://api.github.com/users/talumbau/followers","following_url":"https://api.github.com/users/talumbau/following{/other_user}","gists_url":"https://api.github.com/users/talumbau/gists{/gist_id}","starred_url":"https://api.github.com/users/talumbau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talumbau/subscriptions","organizations_url":"https://api.github.com/users/talumbau/orgs","repos_url":"https://api.github.com/users/talumbau/repos","events_url":"https://api.github.com/users/talumbau/events{/privacy}","received_events_url":"https://api.github.com/users/talumbau/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T20:37:31Z","updated_at":"2015-09-15T20:37:31Z","body":"Couple of things here for @Amy-Xu and @MattHJensen :\r\n\r\nThere are definitely values of inputs that cause the calculations in `dropq` to fail. One example that we currently protect against in \"no changes\", which is the same thing as an empty \"user_mods\" dictionary. This inevitably leads to some columns of all zeros in the `dropq` calculation, which likely causes some pandas operation to fail, which raises an exception of some kind. This eventually results in the 'Key Error' that you are seeing, although I haven't looked in to the exact sequence of events.\r\n\r\nTo me, I see two activities that are worthwhile:\r\n\r\n1.  We create a general error screen, such that, if we don't get back good values from the dropq workers (for whatever reason) we display this error screen, although with the option of downloading the parameters that you chose. We could then link to the issues page on this repo or the Tax-Calculator repo. That covers us for bugs \"in the wild\"\r\n\r\n2. For your activity Amy, I would suggest that we set you up with a script that allows you to call dropq the way the webapp does, you could then script out all of the experiments you are running. The script that does this is `example.py` located at the top of the `dropq` repo. For example, it shows how to modify a tax bracket by creating a typical \"user_mods\" dictionary:\r\n\r\n```\r\nmyvars['_II_rt4'] = [0.39, 0.40, 0.41]\r\n```\r\n\r\nAs long as you know the names of the parameters you wan to modify, you can get the exact behavior of the webapp from this script. If something is broken, you likely won't get a KeyError, you'll probably get the underlying Exception that causes the KeyError. This should make your work faster."}}