{"action":"created","issue":{"url":"https://api.github.com/repos/ITSLeeds/stats19/issues/20","repository_url":"https://api.github.com/repos/ITSLeeds/stats19","labels_url":"https://api.github.com/repos/ITSLeeds/stats19/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/ITSLeeds/stats19/issues/20/comments","events_url":"https://api.github.com/repos/ITSLeeds/stats19/issues/20/events","html_url":"https://github.com/ITSLeeds/stats19/pull/20","id":386724476,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1Mzc0NzM5","number":20,"title":"allow multiple file downloads","user":{"login":"mpadge","id":6697851,"node_id":"MDQ6VXNlcjY2OTc4NTE=","avatar_url":"https://avatars1.githubusercontent.com/u/6697851?v=4","gravatar_id":"","url":"https://api.github.com/users/mpadge","html_url":"https://github.com/mpadge","followers_url":"https://api.github.com/users/mpadge/followers","following_url":"https://api.github.com/users/mpadge/following{/other_user}","gists_url":"https://api.github.com/users/mpadge/gists{/gist_id}","starred_url":"https://api.github.com/users/mpadge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpadge/subscriptions","organizations_url":"https://api.github.com/users/mpadge/orgs","repos_url":"https://api.github.com/users/mpadge/repos","events_url":"https://api.github.com/users/mpadge/events{/privacy}","received_events_url":"https://api.github.com/users/mpadge/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-03T09:19:32Z","updated_at":"2018-12-03T10:00:20Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ITSLeeds/stats19/pulls/20","html_url":"https://github.com/ITSLeeds/stats19/pull/20","diff_url":"https://github.com/ITSLeeds/stats19/pull/20.diff","patch_url":"https://github.com/ITSLeeds/stats19/pull/20.patch"},"body":"@layik @Robinlovelace Don't merge this yet, but this is a first response to my very first usage of the package. Doing so prompted the question of why the heck I couldn't just download data for a range of years, and so this code now allows that.\r\n\r\nIt then breaks most subsequent code, because that expects to handle just single years, but I first wanted to discuss here whether this was okay. I may have misunderstood and perhaps there was a reason why you were only permitting single years to be downloaded? But the code here works, and successfully downloads data for multiple years.\r\n\r\nYou can now do this:\r\n```\r\ndl_stats19(years = 2011:2017, type = \"a\")\r\n```\r\nA couple of other things have also been changed, including\r\n1. proper sanity check on the \"type\" argument\r\n2. auto-creation of `data_dir` if it does not exist\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/ITSLeeds/stats19/issues/comments/443653163","html_url":"https://github.com/ITSLeeds/stats19/pull/20#issuecomment-443653163","issue_url":"https://api.github.com/repos/ITSLeeds/stats19/issues/20","id":443653163,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzY1MzE2Mw==","user":{"login":"layik","id":408568,"node_id":"MDQ6VXNlcjQwODU2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/408568?v=4","gravatar_id":"","url":"https://api.github.com/users/layik","html_url":"https://github.com/layik","followers_url":"https://api.github.com/users/layik/followers","following_url":"https://api.github.com/users/layik/following{/other_user}","gists_url":"https://api.github.com/users/layik/gists{/gist_id}","starred_url":"https://api.github.com/users/layik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/layik/subscriptions","organizations_url":"https://api.github.com/users/layik/orgs","repos_url":"https://api.github.com/users/layik/repos","events_url":"https://api.github.com/users/layik/events{/privacy}","received_events_url":"https://api.github.com/users/layik/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T10:00:20Z","updated_at":"2018-12-03T10:00:20Z","author_association":"CONTRIBUTOR","body":"Great work Mark, thanks Robin.\r\n\r\n1. In principle, this is where we should be going next (definitely). The reason why I code so is because R is still not my default style of coding. I think I know the reason why I defaulted to single file downloads but not necessary here.\r\n2. As Robin just commented that is an enough good reason for keeping the directory structure intact, there is more.\r\n3. As for the other minor matters (1 and 2) I think the unzip does write to the `-p` underneath to create the `data_dir` if it does not exist. If not definitely needs to go in. Sanity checks, I am still learning R.\r\n\r\nFinally, I think this is a great piece of work, could we submit to CRAN as it is and then make the changes without breaking the functions already in? Get a simple/robust package in and then add functionality."}}
{"actor":{"display_login":"layik"}}