{"action":"created","issue":{"url":"https://api.github.com/repos/everypolitician/everypolitician/issues/244","labels_url":"https://api.github.com/repos/everypolitician/everypolitician/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/everypolitician/everypolitician/issues/244/comments","events_url":"https://api.github.com/repos/everypolitician/everypolitician/issues/244/events","html_url":"https://github.com/everypolitician/everypolitician/issues/244","id":121672831,"number":244,"title":"countries.json: Provide full URLs for data","user":{"login":"tmtmtmtm","id":57483,"avatar_url":"https://avatars.githubusercontent.com/u/57483?v=3","gravatar_id":"","url":"https://api.github.com/users/tmtmtmtm","html_url":"https://github.com/tmtmtmtm","followers_url":"https://api.github.com/users/tmtmtmtm/followers","following_url":"https://api.github.com/users/tmtmtmtm/following{/other_user}","gists_url":"https://api.github.com/users/tmtmtmtm/gists{/gist_id}","starred_url":"https://api.github.com/users/tmtmtmtm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmtmtmtm/subscriptions","organizations_url":"https://api.github.com/users/tmtmtmtm/orgs","repos_url":"https://api.github.com/users/tmtmtmtm/repos","events_url":"https://api.github.com/users/tmtmtmtm/events{/privacy}","received_events_url":"https://api.github.com/users/tmtmtmtm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-11T09:44:15Z","updated_at":"2015-12-11T09:55:04Z","closed_at":null,"body":"In `countries.json` we currently provide lots of individual pieces from which a consuming app can determine where to find all the data they might want. \r\n\r\nIf we provided full URLs, it would make this simpler in most cases, and would also enable slightly more flexibility in changing things later (e.g. if we were to move away from having everything in a single `everypolitician-data` github repo) \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/everypolitician/everypolitician/issues/comments/163893909","html_url":"https://github.com/everypolitician/everypolitician/issues/244#issuecomment-163893909","issue_url":"https://api.github.com/repos/everypolitician/everypolitician/issues/244","id":163893909,"user":{"login":"tmtmtmtm","id":57483,"avatar_url":"https://avatars.githubusercontent.com/u/57483?v=3","gravatar_id":"","url":"https://api.github.com/users/tmtmtmtm","html_url":"https://github.com/tmtmtmtm","followers_url":"https://api.github.com/users/tmtmtmtm/followers","following_url":"https://api.github.com/users/tmtmtmtm/following{/other_user}","gists_url":"https://api.github.com/users/tmtmtmtm/gists{/gist_id}","starred_url":"https://api.github.com/users/tmtmtmtm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmtmtmtm/subscriptions","organizations_url":"https://api.github.com/users/tmtmtmtm/orgs","repos_url":"https://api.github.com/users/tmtmtmtm/repos","events_url":"https://api.github.com/users/tmtmtmtm/events{/privacy}","received_events_url":"https://api.github.com/users/tmtmtmtm/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T09:55:04Z","updated_at":"2015-12-11T09:55:04Z","body":"We'd need to maintain the existing fields (at least for a while), so this would involve adding new ones. Perhaps something like:\r\n\r\nCurrent:\r\n```json\r\n  {\r\n    \"name\": \"Algeria\",\r\n    \"country\": \"Algeria\",\r\n    \"code\": \"DZ\",\r\n    \"slug\": \"Algeria\",\r\n    \"legislatures\": [\r\n      {\r\n        \"name\": \"People's National Assembly\",\r\n        \"slug\": \"Majlis\",\r\n        \"sources_directory\": \"data/Algeria/Majlis/sources\",\r\n        \"popolo\": \"data/Algeria/Majlis/ep-popolo-v1.0.json\",\r\n        \"names\": \"data/Algeria/Majlis/names.csv\",\r\n        \"lastmod\": \"1448466499\",\r\n        \"person_count\": 478,\r\n        \"sha\": \"8a94d0b\",\r\n        \"legislative_periods\": [\r\n          {\r\n            \"id\": \"term/7\",\r\n            \"name\": \"7th National Assembly\",\r\n            \"start_date\": \"2012\",\r\n            \"slug\": \"7\",\r\n            \"csv\": \"data/Algeria/Majlis/term-7.csv\"\r\n          }\r\n        ]\r\n      }\r\n    ]\r\n  }\r\n```\r\n\r\nSuggested:\r\n```json\r\n  {\r\n    \"name\": \"Algeria\",\r\n    \"country\": \"Algeria\",\r\n    \"code\": \"DZ\",\r\n    \"slug\": \"Algeria\",\r\n    \"legislatures\": [\r\n      {\r\n        \"name\": \"People's National Assembly\",\r\n        \"slug\": \"Majlis\",\r\n        \"sources_directory\": \"data/Algeria/Majlis/sources\",\r\n        \"popolo\": \"data/Algeria/Majlis/ep-popolo-v1.0.json\",\r\n        \"popolo_url\": \"https://cdn.rawgit.com/everypolitician/everypolitician-data/8a94d0b/data/Algeria/Majlis/ep-popolo-v1.0.json\",\r\n        \"names\": \"data/Algeria/Majlis/names.csv\",\r\n        \"names_url\": \"https://cdn.rawgit.com/everypolitician/everypolitician-data/8a94d0b/data/Algeria/Majlis/names.csv\",\r\n        \"lastmod\": \"1448466499\",\r\n        \"person_count\": 478,\r\n        \"sha\": \"8a94d0b\",\r\n        \"legislative_periods\": [\r\n          {\r\n            \"id\": \"term/7\",\r\n            \"name\": \"7th National Assembly\",\r\n            \"start_date\": \"2012\",\r\n            \"slug\": \"7\",\r\n            \"csv\": \"data/Algeria/Majlis/term-7.csv\",\r\n            \"csv_url\": \"https://cdn.rawgit.com/everypolitician/everypolitician-data/8a94d0b/data/Algeria/Majlis/term-7.csv\"\r\n          }\r\n        ]\r\n      }\r\n    ]\r\n  }\r\n```\r\n\r\nOr, rather than appending \"_html\" to some fields, we could perhaps have a nested hash of URLs:\r\n```\r\n      {\r\n        \"name\": \"People's National Assembly\",\r\n        \"slug\": \"Majlis\",\r\n        \"sources_directory\": \"data/Algeria/Majlis/sources\",\r\n        \"popolo\": \"data/Algeria/Majlis/ep-popolo-v1.0.json\",\r\n        \"names\": \"data/Algeria/Majlis/names.csv\",\r\n        \"sources\": { \r\n            \"popolo\": \"https://cdn.rawgit.com/everypolitician/everypolitician-data/8a94d0b/data/Algeria/Majlis/ep-popolo-v1.0.json\",  \r\n            \"names\": \"https://cdn.rawgit.com/everypolitician/everypolitician-data/8a94d0b/data/Algeria/Majlis/names.csv\",\r\n        }\r\n        …\r\n```\r\n(perhaps with a different name than `sources`)\r\n\r\n@chrismytton any thoughts?"}}