lynaghk / vomnibus

Assortment of useful geographic data, color schemes, &c.
8 stars 5 forks source link

vomnibus.geo.us, vomnibus.geo.world, vomnibus.loader and vomnibus.r (in their current state) probably ought not be cross-compiled to clojurescript #4

Open rm-hull opened 11 years ago

rm-hull commented 11 years ago

The functions in those namespaces rely on vomnibus.loader/load-resource which uses the ClassLoader#getSystemResource, which is a javaland class only, and doesn't make any sense for clojurescript;

Anything that relies on the load-resource function (including that) would be better defined in the clj directory with a .clj extension.

lynaghk commented 11 years ago

Ohh, it looks like you're right. I guess I've never actually tried using that stuff in ClojureScript. Did you run into this on a project of yours? Do you have any preference for how you'd like to see them changed?

Presumably they could be rewritten as macros so that they'd work properly with cljs.

rm-hull commented 11 years ago

I'd written a simple bl.ocks.org like gist viewer specifically for compiling & running clojurescript with data visualisations in mind, and yesterday I used your choropleth demo* (I hope you don't mind) to make sure the C2 stuff was working (had fun getting singult to play nicely), but of course the geo.data.us/states didn't work for the reasons outlined above. In the end I just added it as another file in the gist.

For me, simplest would be just to have the .cljx files have the raw hashmaps embedded much like the D3 datasets do.

If there are formatting issues that need cleaning up or some data mounting needed, I can help with that.

Also I noticed that there are no resources for world countries and R datasets in github.


*-The demo is at http://programming-enchiladas.destructuring-bind.org/rm-hull/5514551