Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-22 Thread Barry Rowlingson
On Sat, Dec 21, 2013 at 4:18 AM, Tom Buckley wrote: > Nice to see some kindred spirits out there! > > TopoJSON --> SP presents some interesting challenges/questions. > > I've been writing some amateurish code to address some of these here: > > https://github.com/buckleytom/topojson/ > > Comments/q

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-20 Thread Tom Buckley
Nice to see some kindred spirits out there! TopoJSON --> SP presents some interesting challenges/questions. I've been writing some amateurish code to address some of these here: https://github.com/buckleytom/topojson/ Comments/questions welcome. Sorry for the rough shape its in. On Wed, Dec 1

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-18 Thread Barry Rowlingson
Here you are: https://github.com/barryrowlingson/rtopojson its very alpha at the moment, and its shortcomings are hopefully fully spelled out in the README file! Barry On Tue, Dec 17, 2013 at 7:48 PM, Ahmadou Dicko wrote: >> I suppose if I pushed it to github all of you could help out... > >

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-17 Thread Ahmadou Dicko
> > I suppose if I pushed it to github all of you could help out... Sure, I can give a try. Just let me know when you push it On Tue, Dec 17, 2013 at 6:10 PM, Barry Rowlingson < b.rowling...@lancaster.ac.uk> wrote: > On Mon, Dec 16, 2013 at 7:03 PM, Rowlingson, Barry > wrote: > > > I might

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-17 Thread Barry Rowlingson
On Mon, Dec 16, 2013 at 7:03 PM, Rowlingson, Barry wrote: > I might try and bash out a converter based on RJSONIO if I get a spare hour > tomorrow or if anyone wants to pledge some cold hard cash! I've done a chunk of work on this, the problem now is just working round the fiddly bits of variou

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-16 Thread Barry Rowlingson
On 16 Dec 2013 18:44, "Ahmadou Dicko" wrote: > > I didn't try a topojson but you can read geojson file using OGR through > rgdal Yes, and as I said before, once ogr/gdal reaches version 2 everywhere then this should work with topojson too. Topojson is such a new format that support is a bit thin

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-16 Thread Ahmadou Dicko
I didn't try a topojson but you can read geojson file using OGR through rgdal require(rgdal) any(grepl("GeoJSON", ogrDrivers()$name)) ### TRUE url <- " https://raw.github.com/johan/world.geo.json/master/countries.geo.json"; world <- readOGR(dsn = url, layer = "OGRGeoJSON") plot(world) sessionIn

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-16 Thread Miguel Fiandor GutiƩrrez
HI, thanks Barry, I am also one of those converters, I started with an shp file, and optimized it into topojson, what I mean is that i also have that shp file. The problem is that it is huge. Right, as a json, I could use a json r library, so then my question is more: *does exists a r library that

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-16 Thread Barry Rowlingson
On a more positive note, topojson, like geojson, is just a JSON file, so you can read it with any of the R JSON interface packages (I've just read a us.json file using package:RJSONIO). The job is then to unweave the structure into something plottable. topojson works by defining features as seque

Re: [R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-16 Thread Barry Rowlingson
The geoJSON driver in gdal/ogr will read it from version 2 of OGR: http://www.gdal.org/ogr/drv_geojson.html but I think that's very leading-edge (I seem to have v 1.10 on my system). So the solution would seem to be to convert your topojson to something that your gdal/ogr can handle, and then r

[R-sig-Geo] how to create maps from topojson files and csv data?

2013-12-15 Thread Miguel Fiandor GutiƩrrez
Hi, I do have some maps in topojson format, and I would like to display data on them that i have in .CSVs and access database. So far I play with them with d3.js,but i'd like to learn too with R. My question is not about the c