{"action":"created","issue":{"url":"https://api.github.com/repos/ALShum/rwunderground/issues/27","repository_url":"https://api.github.com/repos/ALShum/rwunderground","labels_url":"https://api.github.com/repos/ALShum/rwunderground/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/ALShum/rwunderground/issues/27/comments","events_url":"https://api.github.com/repos/ALShum/rwunderground/issues/27/events","html_url":"https://github.com/ALShum/rwunderground/pull/27","id":260819159,"number":27,"title":"history when data is missing, as is common with pws: locations","user":{"login":"CraigMohn","id":28156233,"avatar_url":"https://avatars3.githubusercontent.com/u/28156233?v=4","gravatar_id":"","url":"https://api.github.com/users/CraigMohn","html_url":"https://github.com/CraigMohn","followers_url":"https://api.github.com/users/CraigMohn/followers","following_url":"https://api.github.com/users/CraigMohn/following{/other_user}","gists_url":"https://api.github.com/users/CraigMohn/gists{/gist_id}","starred_url":"https://api.github.com/users/CraigMohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraigMohn/subscriptions","organizations_url":"https://api.github.com/users/CraigMohn/orgs","repos_url":"https://api.github.com/users/CraigMohn/repos","events_url":"https://api.github.com/users/CraigMohn/events{/privacy}","received_events_url":"https://api.github.com/users/CraigMohn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-27T01:32:43Z","updated_at":"2017-09-27T03:49:24Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ALShum/rwunderground/pulls/27","html_url":"https://github.com/ALShum/rwunderground/pull/27","diff_url":"https://github.com/ALShum/rwunderground/pull/27.diff","patch_url":"https://github.com/ALShum/rwunderground/pull/27.patch"},"body":"Return NULL instead of failing when there are no data records returned for a date.\r\nSet fields which are missing in the data to NA so that dplyr won't error.\r\n\r\nThese two circumstances are rare for airport data, but common for Personal Weather Stations.\r\n\r\nThe code adds two functions: as.numeric.nonempty(x) which returns as.numeric(x) if len(x)>0, otherwise NA_numeric_.  Similarly, nonempty(x) return either x or NA.  These are applied to all non-date history variables returned from wunderground.com.\r\n\r\nIf the final dataframe is empty, return NULL rather having encode_NA() choke.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ALShum/rwunderground/issues/comments/332401007","html_url":"https://github.com/ALShum/rwunderground/pull/27#issuecomment-332401007","issue_url":"https://api.github.com/repos/ALShum/rwunderground/issues/27","id":332401007,"user":{"login":"CraigMohn","id":28156233,"avatar_url":"https://avatars3.githubusercontent.com/u/28156233?v=4","gravatar_id":"","url":"https://api.github.com/users/CraigMohn","html_url":"https://github.com/CraigMohn","followers_url":"https://api.github.com/users/CraigMohn/followers","following_url":"https://api.github.com/users/CraigMohn/following{/other_user}","gists_url":"https://api.github.com/users/CraigMohn/gists{/gist_id}","starred_url":"https://api.github.com/users/CraigMohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraigMohn/subscriptions","organizations_url":"https://api.github.com/users/CraigMohn/orgs","repos_url":"https://api.github.com/users/CraigMohn/repos","events_url":"https://api.github.com/users/CraigMohn/events{/privacy}","received_events_url":"https://api.github.com/users/CraigMohn/received_events","type":"User","site_admin":false},"created_at":"2017-09-27T03:49:24Z","updated_at":"2017-09-27T03:49:24Z","author_association":"NONE","body":"Sorry, I had to leave my computer as I started to submit my pull request, then when I got back hours later didn't notice the other pull request submitted in the interim which addresses the harder of the two issues addressed in this one.\r\n\r\nIn looking at the other pull request I updated this code to also check history_daily() for empty data fields.\r\n\r\nProbably need to check the other commands in the package in a similar way...."}}
{"actor":{"display_login":"CraigMohn"}}