This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(jsonlite) | |
| # retrieve all possible node access values which come up at least 10 times | |
| url <- "https://taginfo.openstreetmap.org/api/4/key/values?key=%s&filter=nodes&sortname=count&sortorder=desc&qtype=value&format=json_pretty" | |
| key <- "access" | |
| res <- fromJSON(sprintf(url, key)) | |
| df <- res[["data"]] | |
| # filter out combined and rare values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PRIORITY_CODE = c( | |
| WORST = 0, | |
| AVOID_AT_ALL_COSTS = 1, | |
| REACH_DEST = 2, | |
| AVOID_IF_POSSIBLE = 3, | |
| UNCHANGED = 4, | |
| PREFER = 5, | |
| VERY_NICE = 6, | |
| BEST = 7 | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| library(leaflet) | |
| library(openrouteservice) | |
| library(lubridate) #convert seconds to hh:mm | |
| # Precomputed random routes in Bayern | |
| load("routes.rda") | |
| lapply(res, function(routes) { | |
| sapply(routes, function(x) x$features[[1]]$properties$summary$distance/1000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| URL=https://download.geofabrik.de/europe/germany/baden-wuerttemberg/karlsruhe-regbez-latest.osm.pbf | |
| RELATION_ID=62691 | |
| RELATION_NAME=mannheim | |
| ### | |
| echo "Downloading $URL" | |
| SOURCE=$(basename "$URL") | |
| curl $URL -o $SOURCE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| output: html_document | |
| --- | |
| ```{r setup, include=FALSE} | |
| knit_hooks_source <- knitr::knit_hooks$get("source") | |
| knitr::knit_hooks$set(source = function (x, options) { | |
| if (!is.null(options$save)) | |
| writeLines(x, options$save) | |
| knit_hooks_source(x, options) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| library(leaflet) | |
| library(openrouteservice) | |
| ui <- bootstrapPage( | |
| includeScript("busy_indicator.js"), | |
| includeScript("lazy_sliders.js"), | |
| includeCSS("style.css"), | |
| leafletOutput("map", width = "100%", height = "100%"), | |
| absolutePanel(top = 10, right = 10, id="controls", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| library(leaflet) | |
| library(openrouteservice) | |
| ## User interface definition | |
| ui <- bootstrapPage( | |
| includeScript("busy_indicator.js"), | |
| includeCSS("style.css"), | |
| leafletOutput("map", width = "100%", height = "100%"), | |
| absolutePanel(top = 10, right = 10, id="controls", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "London Blitz Bombs" | |
| author: "Andrzej K. Oleś" | |
| output: html_document | |
| --- | |
| ```{r config, include=FALSE} | |
| ## set up knitr defaults | |
| knitr::opts_chunk$set(eval=TRUE, out.width='100%', out.height='560px') | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "London Blitz Bombs" | |
| author: "Andrzej K. Oleś" | |
| output: html_document | |
| --- | |
| ```{r config, include=FALSE} | |
| ## set up knitr defaults | |
| knitr::opts_chunk$set(eval=TRUE, out.width='100%', out.height='560px') | |
| ``` |
NewerOlder