All examples By author By category About

timelyportfolio

R htmlwidget listviewer look at Afghanistan topojson

listviewer, an R htmlwidget can help us see the structure of topojson data.

### experiment with topojson

# install if necessary
#  devtools::install_github("timelyportfolio/listviewer")

library(httr)
library(pipeR)
library(listviewer)

# topojson for Afghanistan
url_path = "https://gist.githubusercontent.com/markmarkoh/8856417/raw/6178d18115d9f273656d294a867c3f83b739a951/customAfghanMap.topo.json"

url_path %>>%
  GET %>>%
  content( as = "text") %>>%
  jsonedit