{"action":"created","issue":{"url":"https://api.github.com/repos/inbo/inborutils/issues/19","repository_url":"https://api.github.com/repos/inbo/inborutils","labels_url":"https://api.github.com/repos/inbo/inborutils/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/inbo/inborutils/issues/19/comments","events_url":"https://api.github.com/repos/inbo/inborutils/issues/19/events","html_url":"https://github.com/inbo/inborutils/issues/19","id":279405360,"number":19,"title":"Create function to query INBO gisservices","user":{"login":"peterdesmet","id":600993,"avatar_url":"https://avatars3.githubusercontent.com/u/600993?v=4","gravatar_id":"","url":"https://api.github.com/users/peterdesmet","html_url":"https://github.com/peterdesmet","followers_url":"https://api.github.com/users/peterdesmet/followers","following_url":"https://api.github.com/users/peterdesmet/following{/other_user}","gists_url":"https://api.github.com/users/peterdesmet/gists{/gist_id}","starred_url":"https://api.github.com/users/peterdesmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterdesmet/subscriptions","organizations_url":"https://api.github.com/users/peterdesmet/orgs","repos_url":"https://api.github.com/users/peterdesmet/repos","events_url":"https://api.github.com/users/peterdesmet/events{/privacy}","received_events_url":"https://api.github.com/users/peterdesmet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-12-05T14:57:39Z","updated_at":"2017-12-06T15:39:12Z","closed_at":null,"author_association":"OWNER","body":"## Use case\r\n\r\nfor publishing occurrence records, we sometimes have the IFBL or UTM code and want to retrieve the centroid coordinates of those squares. Would be nice if can do this using the reference layers provided via http://gisservices.inbo.be/arcgis/rest/services (rather than some file).\r\n\r\nWould like to have:\r\n\r\n* a function to get the data from the datasets provided at http://gisservices.inbo.be/arcgis/rest/services, with stable names for the datasets\r\n* a tutorial on how to link occurrences -> ref dataset -> calculate centroid coordinates.\r\n\r\n---\r\n\r\nProviding access to this official (?) layers would help R/Python users make better use of these public datasets. Note: right now, this is a *nice to have*, not a real need."},"comment":{"url":"https://api.github.com/repos/inbo/inborutils/issues/comments/349677295","html_url":"https://github.com/inbo/inborutils/issues/19#issuecomment-349677295","issue_url":"https://api.github.com/repos/inbo/inborutils/issues/19","id":349677295,"user":{"login":"stijnvanhoey","id":754862,"avatar_url":"https://avatars1.githubusercontent.com/u/754862?v=4","gravatar_id":"","url":"https://api.github.com/users/stijnvanhoey","html_url":"https://github.com/stijnvanhoey","followers_url":"https://api.github.com/users/stijnvanhoey/followers","following_url":"https://api.github.com/users/stijnvanhoey/following{/other_user}","gists_url":"https://api.github.com/users/stijnvanhoey/gists{/gist_id}","starred_url":"https://api.github.com/users/stijnvanhoey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stijnvanhoey/subscriptions","organizations_url":"https://api.github.com/users/stijnvanhoey/orgs","repos_url":"https://api.github.com/users/stijnvanhoey/repos","events_url":"https://api.github.com/users/stijnvanhoey/events{/privacy}","received_events_url":"https://api.github.com/users/stijnvanhoey/received_events","type":"User","site_admin":false},"created_at":"2017-12-06T15:39:11Z","updated_at":"2017-12-06T15:39:11Z","author_association":"COLLABORATOR","body":"@milotictanja, the `ggplot` version of the plot as well ;-)\r\n(*remark*: this has indeed nothing to do with the YX/XY issue above, but just an illustration and reminder we should add the `prepare_spatial_for_ggplot` function to the package)\r\n\r\n```\r\nlibrary(ggplot2)\r\n\r\n#' Prepare a SpatialLinesDataFrame or SpatialPolygonsDataFrame for ggplot2\r\n#' plotting\r\n#'\r\n#' @param spatial_df SpatialLinesDataFrame or SpatialPolygonsDataFrame\r\n#' @return data.frame\r\nprepare_spatial_for_ggplot <- function(spatial_df){\r\n    \r\n    df <- fortify(spatial_df)\r\n    merge(df, as.data.frame(spatial_df))\r\n}\r\n\r\nutm_f <- prepare_spatial_for_ggplot(utm10)\r\nggplot(data = utm_f, aes(x = long, y = lat, group = group)) +\r\n    geom_path() +\r\n    coord_fixed()\r\n```\r\n"}}
{"actor":{"display_login":"stijnvanhoey"}}