

{"id":3569,"date":"2015-07-29T09:20:31","date_gmt":"2015-07-29T14:20:31","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3569"},"modified":"2018-03-07T16:43:48","modified_gmt":"2018-03-07T21:43:48","slug":"introducing-the-nominatim-geocoding-package","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/","title":{"rendered":"Introducing the nominatim geocoding package"},"content":{"rendered":"<p>In the never-ending battle for truth, justice and publishing more R<br \/>\npackages than [Oliver](http:\/\/twitter.com\/quominus), I whipped out an R<br \/>\npackage for the [OpenStreetMap Nominatim<br \/>\nAPI](http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim). It actually hits the<br \/>\n[MapQuest Nominatim Servers](http:\/\/open.mapquestapi.com\/nominatim\/) for<br \/>\nmost of the calls, but the functionality is the same.<\/p>\n<p>The R package lets you:<\/p>\n<p>&#8211;   `address_lookup`: Lookup the address of one or multiple OSM objects<br \/>\n    like node, way or relation.<br \/>\n&#8211;   `osm_geocode`: Search for places by address<br \/>\n&#8211;   `osm_search`: Search for places<br \/>\n&#8211;   `osm_search_spatial`: Search for places, returning a list of<br \/>\n    `SpatialPointsDataFrame`, `SpatialLinesDataFrame` or a<br \/>\n    `SpatialPolygonsDataFrame`<br \/>\n&#8211;   `reverse_geocode_coords`: Reverse geocode based on lat\/lon<br \/>\n&#8211;   `reverse_geocode_osm`: Reverse geocode based on OSM Type &#038; Id<\/p>\n<p>Just like Google Maps, these services are not meant to be your<br \/>\nfreebie-access to mega-bulk-geocoding. You can and should pay for that.<br \/>\nBut, when you need a few items geocoded (or want to lookup some<br \/>\ninteresting things on OSM since it provides [special<br \/>\nphrases](http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim\/Special_Phrases)<br \/>\nto work with), Nominatim lookups can be just what&#8217;s needed.<\/p>\n<p>Let&#8217;s say we wanted to see where pubs are in the Seattle metro area.<br \/>\nThat&#8217;s a simple task for nominatim:<\/p>\n<pre lang='rsplus'># devtools::install_github(\"hrbrmstr\/nominatim\")\r\nlibrary(nominatim)\r\nlibrary(dplyr)\r\n\r\nsea_pubs <- osm_search(\"pubs near seattle, wa\", limit=20)\r\n\r\nglimpse(sea_pubs)\r\n\r\n## Observations: 20\r\n## Variables:\r\n## $ place_id     (chr) \"70336054\", \"82743439\", \"11272568\", \"21478701\", \"...\r\n## $ licence      (chr) \"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. htt...\r\n## $ osm_type     (chr) \"way\", \"way\", \"node\", \"node\", \"node\", \"node\", \"no...\r\n## $ osm_id       (chr) \"51460516\", \"96677583\", \"1077652159\", \"2123245933...\r\n## $ lat          (dbl) 47.64664, 47.63983, 47.60210, 47.62438, 47.59203,...\r\n## $ lon          (dbl) -122.3503, -122.3023, -122.3321, -122.3559, -122....\r\n## $ display_name (chr) \"Nickerson Street Saloon, 318, Nickerson Street, ...\r\n## $ class        (chr) \"amenity\", \"amenity\", \"amenity\", \"amenity\", \"amen...\r\n## $ type         (chr) \"pub\", \"pub\", \"pub\", \"pub\", \"pub\", \"pub\", \"pub\", ...\r\n## $ importance   (dbl) 0.201, 0.201, 0.201, 0.201, 0.201, 0.201, 0.201, ...\r\n## $ icon         (chr) \"http:\/\/mq-open-search-int-ls03.ihost.aol.com:800...\r\n## $ bbox_left    (dbl) 47.64650, 47.63976, 47.60210, 47.62438, 47.59203,...\r\n## $ bbox_top     (dbl) 47.64671, 47.63990, 47.60210, 47.62438, 47.59203,...\r\n## $ bbox_right   (dbl) -122.3504, -122.3025, -122.3321, -122.3559, -122....\r\n## $ bbox_bottom  (dbl) -122.3502, -122.3022, -122.3321, -122.3559, -122....<\/pre>\n<p>We can even plot those locations:<\/p>\n<pre lang='rsplus'>library(rgdal)\r\nlibrary(ggplot2)\r\nlibrary(ggthemes)\r\nlibrary(sp)\r\nlibrary(DT)\r\n\r\n# Grab a neighborhood map of Seattle\r\nurl <- \"https:\/\/data.seattle.gov\/api\/file_data\/VkU4Er5ow6mlI0loFhjIw6eL6eKEYMefYMm4MGcUakU?filename=Neighborhoods.zip\"\r\nfil <- \"seattle.zip\"\r\nif (!file.exists(fil)) download.file(url, fil)\r\nif (!dir.exists(\"seattle\")) unzip(fil, exdir=\"seattle\")\r\n\r\n# make it usable\r\nsea <- readOGR(\"seattle\/Neighborhoods\/WGS84\/Neighborhoods.shp\", \"Neighborhoods\")\r\n\r\n## OGR data source with driver: ESRI Shapefile \r\n## Source: \"seattle\/Neighborhoods\/WGS84\/Neighborhoods.shp\", layer: \"Neighborhoods\"\r\n## with 119 features\r\n## It has 12 fields\r\n\r\nsea_map <- fortify(sea)\r\n\r\n# Get the extenes of where the pubs are so we can \"zoom in\"\r\nbnd_box <- bbox(SpatialPoints(as.matrix(sea_pubs[, c(\"lon\", \"lat\")])))\r\n\r\n# plot them\r\ngg <- ggplot()\r\ngg <- gg + geom_map(data=sea_map, map=sea_map,\r\n                    aes(x=long, y=lat, map_id=id),\r\n                    color=\"black\", fill=\"#c0c0c0\", size=0.25)\r\ngg <- gg + geom_point(data=sea_pubs, aes(x=lon, y=lat),\r\n                      color=\"#ffff33\", fill=\"#ff7f00\",\r\n                      shape=21, size=4, alpha=1\/2)\r\n# decent projection for Seattle-y things and expand the zoom\/clip a bit\r\ngg <- gg + coord_map(\"gilbert\",\r\n                     xlim=extendrange(bnd_box[\"lon\",], f=0.5),\r\n                     ylim=extendrange(bnd_box[\"lat\",], f=0.5))\r\ngg <- gg + labs(title=\"Seattle Pubs\")\r\ngg <- gg + theme_map()\r\ngg <- gg + theme(title=element_text(size=16))\r\ngg<\/pre>\n<p><a href=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3570\" data-permalink=\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/seattle_map-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?fit=1344%2C960&amp;ssl=1\" data-orig-size=\"1344,960\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"seattle_map-1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?fit=300%2C214&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?fit=510%2C364&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?resize=510%2C364&#038;ssl=1\" alt=\"seattle_map-1\" width=\"510\" height=\"364\" class=\"aligncenter size-full wp-image-3570\" \/><\/a><\/p>\n<p>Of course you can geocode:<\/p>\n<pre lang='rsplus'>addrs <- osm_geocode(c(\"1600 Pennsylvania Ave, Washington, DC.\",\r\n                     \"1600 Amphitheatre Parkway, Mountain View, CA\",\r\n                     \"Seattle, Washington\"))\r\naddrs %>% select(display_name)\r\n\r\n## Source: local data frame [3 x 1]\r\n## \r\n##                                                                  display_name\r\n## 1                  Washington, District of Columbia, United States of America\r\n## 2 Mountainview Lane, Huntington Beach, Orange County, California, 92648, Unit\r\n## 3                  Seattle, King County, Washington, United States of America\r\n\r\naddrs %>% select(lat, lon)\r\n\r\n## Source: local data frame [3 x 2]\r\n## \r\n##        lat        lon\r\n## 1 38.89495  -77.03665\r\n## 2 33.67915 -118.02588\r\n## 3 47.60383 -122.33006<\/pre>\n<p>Or, reverse geocode:<\/p>\n<pre lang='rsplus'># Reverse geocode Canadian embassies\r\n# complete list of Canadian embassies here:\r\n# http:\/\/open.canada.ca\/data\/en\/dataset\/6661f0f8-2fb2-46fa-9394-c033d581d531\r\n\r\nembassies <- data.frame(lat=c(\"34.53311\", \"41.327546\", \"41.91534\", \"36.76148\", \"-13.83282\",\r\n                             \"40.479094\", \"-17.820705\", \"13.09511\", \"13.09511\"),\r\n                       lon=c(\"69.1835\", \"19.818698\", \"12.50891\", \"3.0166\", \"-171.76462\",\r\n                             \"-3.686115\", \"31.043559\", \"-59.59998\", \"-59.59998\"), stringsAsFactors=FALSE)\r\n\r\nemb_coded_coords <- reverse_geocode_coords(embassies$lat, embassies$lon)\r\n\r\nemb_coded_coords %>% select(display_name)\r\n\r\n## Source: local data frame [9 x 1]\r\n## \r\n##                                                                  display_name\r\n## 1                Embassy of Canada, Ch.R.Wazir Akbar Khan, Kabul, Afghanistan\r\n## 2 Monumenti i Sk\u00ebnderbeut, Skanderbeg Square, Lulishtja K\u00ebshilli i Europ\u00ebes, \r\n## 3 Nomentana\/Trieste, Via Nomentana, San Lorenzo, Salario, Municipio Roma II, \r\n## 4 18, Avenue Khalef Mustapha, Ben Aknoun, Da\u00efra Bouzareah, Algiers, Ben aknou\r\n## 5                               The Hole in the Wall, Beach Road, \u0100pia, Samoa\r\n## 6 Torre Espacio, 259 D, Paseo de la Castellana, Fuencarral, Fuencarral-El Par\r\n## 7 Leopold Takawira Street, Avondale West, Harare, Harare Province, 00263, Zim\r\n## 8                    Bishop's Court Hill, Bridgetown, Saint Michael, Barbados\r\n## 9                    Bishop's Court Hill, Bridgetown, Saint Michael, Barbados<\/pre>\n<p>It can even return `Spatial` objects (somewhat experimental):<\/p>\n<pre lang=\"rsplus\"># stock example search from OSM\r\nosm_search_spatial(\"[bakery]+berlin+wedding\", limit=5)[[1]]\r\n\r\n##            coordinates   place_id\r\n## 1 (13.34931, 52.54165)    9039748\r\n## 2 (13.34838, 52.54125) 2659941153\r\n## 3 (13.35678, 52.55138)   23586341\r\n## 4 (13.34985, 52.54158)    7161987\r\n## 5  (13.35348, 52.5499)   29179742\r\n##                                                                               licence\r\n## 1 Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright\r\n## 2 Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright\r\n## 3 Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright\r\n## 4 Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright\r\n## 5 Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright\r\n##   osm_type     osm_id      lat      lon\r\n## 1     node  939667448 52.54165 13.34931\r\n## 2     node 3655549445 52.54125 13.34838\r\n## 3     node 2299953786 52.55138 13.35678\r\n## 4     node  762607353 52.54158 13.34985\r\n## 5     node 2661679367 52.54990 13.35348\r\n##                                                                                    display_name\r\n## 1            Baguetterie, F\u00f6hrer Stra\u00dfe, Br\u00fcsseler Kiez, Wedding, Mitte, Berlin, 13353, Germany\r\n## 2 F\u00f6hrer Cafe & Backshop, F\u00f6hrer Stra\u00dfe, Br\u00fcsseler Kiez, Wedding, Mitte, Berlin, 13353, Germany\r\n## 3               K\u00f6rfez, Amsterdamer Stra\u00dfe, Leopoldkiez, Wedding, Mitte, Berlin, 13347, Germany\r\n## 4             Knusperb\u00e4cker, Torfstra\u00dfe, Br\u00fcsseler Kiez, Wedding, Mitte, Berlin, 13353, Germany\r\n## 5             Hofb\u00e4ckerei, M\u00fcllerstra\u00dfe, Br\u00fcsseler Kiez, Wedding, Mitte, Berlin, 13353, Germany\r\n##   class   type importance\r\n## 1  shop bakery      0.201\r\n## 2  shop bakery      0.201\r\n## 3  shop bakery      0.201\r\n## 4  shop bakery      0.201\r\n## 5  shop bakery      0.201\r\n##                                                                                                      icon\r\n## 1 http:\/\/mq-open-search-int-ls04.ihost.aol.com:8000\/nominatim\/v1\/images\/mapicons\/shopping_bakery.p.20.png\r\n## 2 http:\/\/mq-open-search-int-ls04.ihost.aol.com:8000\/nominatim\/v1\/images\/mapicons\/shopping_bakery.p.20.png\r\n## 3 http:\/\/mq-open-search-int-ls04.ihost.aol.com:8000\/nominatim\/v1\/images\/mapicons\/shopping_bakery.p.20.png\r\n## 4 http:\/\/mq-open-search-int-ls04.ihost.aol.com:8000\/nominatim\/v1\/images\/mapicons\/shopping_bakery.p.20.png\r\n## 5 http:\/\/mq-open-search-int-ls04.ihost.aol.com:8000\/nominatim\/v1\/images\/mapicons\/shopping_bakery.p.20.png\r\n##    bbox_left   bbox_top bbox_right bbox_bottom\r\n## 1 52.5416504 52.5416504  13.349306   13.349306\r\n## 2 52.5412496 52.5412496 13.3483832  13.3483832\r\n## 3 52.5513806 52.5513806 13.3567785  13.3567785\r\n## 4   52.54158   52.54158 13.3498507  13.3498507\r\n## 5 52.5499029 52.5499029 13.3534756  13.3534756<\/pre>\n<p>The lookup functions are vectorized but there's a delay built in to<br \/>\navoid slamming the free servers.<\/p>\n<p>Some things on the TODO list are:<\/p>\n<p>-   enabling configuration of timeouts<br \/>\n-   enabling switching Nominatim API server providers (you can host your<br \/>\n    own!)<br \/>\n-   better `Spatial` support<\/p>\n<p>So, give the [code a spin](https:\/\/github.com\/hrbrmstr\/nominatim) and<br \/>\nsubmit feature requests\/issues to github!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the never-ending battle for truth, justice and publishing more R packages than [Oliver](http:\/\/twitter.com\/quominus), I whipped out an R package for the [OpenStreetMap Nominatim API](http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim). It actually hits the [MapQuest Nominatim Servers](http:\/\/open.mapquestapi.com\/nominatim\/) for most of the calls, but the functionality is the same. The R package lets you: &#8211; `address_lookup`: Lookup the address of one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[721,706,91],"tags":[810],"class_list":["post-3569","post","type-post","status-publish","format-standard","hentry","category-cartography","category-maps","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introducing the nominatim geocoding package - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing the nominatim geocoding package - rud.is\" \/>\n<meta property=\"og:description\" content=\"In the never-ending battle for truth, justice and publishing more R packages than [Oliver](http:\/\/twitter.com\/quominus), I whipped out an R package for the [OpenStreetMap Nominatim API](http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim). It actually hits the [MapQuest Nominatim Servers](http:\/\/open.mapquestapi.com\/nominatim\/) for most of the calls, but the functionality is the same. The R package lets you: &#8211; `address_lookup`: Lookup the address of one [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-29T14:20:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T21:43:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Introducing the nominatim geocoding package\",\"datePublished\":\"2015-07-29T14:20:31+00:00\",\"dateModified\":\"2018-03-07T21:43:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/\"},\"wordCount\":307,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png\",\"keywords\":[\"post\"],\"articleSection\":[\"cartography\",\"maps\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/\",\"url\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/\",\"name\":\"Introducing the nominatim geocoding package - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png\",\"datePublished\":\"2015-07-29T14:20:31+00:00\",\"dateModified\":\"2018-03-07T21:43:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?fit=1344%2C960&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?fit=1344%2C960&ssl=1\",\"width\":1344,\"height\":960},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing the nominatim geocoding package\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rud.is\/b\/#website\",\"url\":\"https:\/\/rud.is\/b\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rud.is\/b\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\/\/rud.is\"],\"url\":\"https:\/\/rud.is\/b\/author\/hrbrmstr\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introducing the nominatim geocoding package - rud.is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/","og_locale":"en_US","og_type":"article","og_title":"Introducing the nominatim geocoding package - rud.is","og_description":"In the never-ending battle for truth, justice and publishing more R packages than [Oliver](http:\/\/twitter.com\/quominus), I whipped out an R package for the [OpenStreetMap Nominatim API](http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim). It actually hits the [MapQuest Nominatim Servers](http:\/\/open.mapquestapi.com\/nominatim\/) for most of the calls, but the functionality is the same. The R package lets you: &#8211; `address_lookup`: Lookup the address of one [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/","og_site_name":"rud.is","article_published_time":"2015-07-29T14:20:31+00:00","article_modified_time":"2018-03-07T21:43:48+00:00","og_image":[{"url":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png","type":"","width":"","height":""}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Introducing the nominatim geocoding package","datePublished":"2015-07-29T14:20:31+00:00","dateModified":"2018-03-07T21:43:48+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/"},"wordCount":307,"commentCount":4,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png","keywords":["post"],"articleSection":["cartography","maps","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/","url":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/","name":"Introducing the nominatim geocoding package - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png","datePublished":"2015-07-29T14:20:31+00:00","dateModified":"2018-03-07T21:43:48+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?fit=1344%2C960&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/07\/seattle_map-1.png?fit=1344%2C960&ssl=1","width":1344,"height":960},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Introducing the nominatim geocoding package"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-Vz","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3314,"url":"https:\/\/rud.is\/b\/2015\/03\/15\/simple-lower-us-48-albers-maps-local-no-api-citystate-geocoding-in-r\/","url_meta":{"origin":3569,"position":0},"title":"Simple Lower US 48 Albers Maps &#038; Local (no-API) City\/State Geocoding in R","author":"hrbrmstr","date":"2015-03-15","format":false,"excerpt":"I've been seeing an uptick in static US \"lower 48\" maps with \"meh\" projections this year, possibly caused by a flood of new folks resolving to learn R but using pretty old documentation or tutorials. I've also been seeing an uptick in folks needing to geocode US city\/state to lat\/lon.\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4527,"url":"https:\/\/rud.is\/b\/2016\/07\/12\/slaying-cidr-orcs-with-triebeard-a-k-a-fast-trie-based-ipv4-in-cidr-lookups-in-r\/","url_meta":{"origin":3569,"position":1},"title":"Slaying CIDR Orcs with Triebeard (a.k.a. fast trie-based &#8216;IPv4-in-CIDR&#8217; lookups in R)","author":"hrbrmstr","date":"2016-07-12","format":false,"excerpt":"The insanely productive elf-lord, @quominus put together a small package ([`triebeard`](https:\/\/github.com\/ironholds\/triebeard)) that exposes an API for [radix\/prefix tries](https:\/\/en.wikipedia.org\/wiki\/Trie) at both the R and Rcpp levels. I know he had some personal needs for this and we both kinda need these to augment some functions in our `iptools` package. Despite `triebeard`\u2026","rel":"","context":"In &quot;Cybersecurity&quot;","block_context":{"text":"Cybersecurity","link":"https:\/\/rud.is\/b\/category\/cybersecurity\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3880,"url":"https:\/\/rud.is\/b\/2016\/01\/08\/iptools-0-3-0-violet-packet-now-on-cran-with-windows-support\/","url_meta":{"origin":3569,"position":2},"title":"iptools 0.3.0 (&#8220;Violet Packet&#8221;) Now on CRAN with Windows Support!","author":"hrbrmstr","date":"2016-01-08","format":false,"excerpt":"`iptools` is a set of tools for working with IP addresses. Not just work, but work _fast_. It's backed by `Rcpp` and now uses the [AsioHeaders](http:\/\/dirk.eddelbuettel.com\/blog\/2016\/01\/07\/#asioheaders_1.11.0-1) package by Dirk Eddelbuettel, which means it no longer needs to _link_ against the monolithic Boost libraries and *works on Windows*! What can you\u2026","rel":"","context":"In &quot;Cybersecurity&quot;","block_context":{"text":"Cybersecurity","link":"https:\/\/rud.is\/b\/category\/cybersecurity\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3508,"url":"https:\/\/rud.is\/b\/2015\/07\/10\/r-package-to-access-the-open-movie-database-omdb-api\/","url_meta":{"origin":3569,"position":3},"title":"R Package to access the Open Movie Database (OMDB) API","author":"hrbrmstr","date":"2015-07-10","format":false,"excerpt":"It's not on CRAN yet, but there's a devtools-installable R package for getting data from the OMDB API. It covers all of the public API endpoints: find_by_id: Retrieve OMDB info by IMDB ID search find_by_title: Retrieve OMDB info by title search get_actors: Get actors from an omdb object as a\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3298,"url":"https:\/\/rud.is\/b\/2015\/03\/09\/new-r-package-ipapi-ipdomain-geolocation\/","url_meta":{"origin":3569,"position":4},"title":"New R Package &#8211; ipapi (IP\/Domain Geolocation)","author":"hrbrmstr","date":"2015-03-09","format":false,"excerpt":"I noticed that the @rOpenSci folks had an interface to [ip-api.com](http:\/\/ip-api.com\/) on their [ToDo](https:\/\/github.com\/ropensci\/webservices\/wiki\/ToDo) list so I whipped up a small R package to fill said gap. Their IP Geolocation API will take an IPv4, IPv6 or FQDN and kick back a ASN, lat\/lon, address and more. The [ipapi package](https:\/\/github.com\/hrbrmstr\/ipapi)\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4490,"url":"https:\/\/rud.is\/b\/2016\/07\/05\/a-simple-prediction-web-service-using-the-new-firery-package\/","url_meta":{"origin":3569,"position":5},"title":"A Simple Prediction Web Service Using the New fiery Package","author":"hrbrmstr","date":"2016-07-05","format":false,"excerpt":"[`fiery`](https:\/\/github.com\/thomasp85\/fiery) is a new `Rook`\/`httuv`-based R web server in town created by @thomasp85 that aims to fill the gap between raw http & websockets and Shiny with a flexible framework for handling requests and serving up responses. The intent of this post is to provide a quick-start to using it\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=3569"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3569\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}