6 ms·
Creating maps using R, Deedle and F# type providers
- minimaxir 13y agoA great and easier package to work with for creating maps using pure R is ggmaps: http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf http://journal.r-project.org/archive/2013-1/kahle-wickham.pd... Here's an example map of San Francisco I made using ggmaps: http://i.imgur.com/zdetaKw.png http://i.imgur.com/zdetaKw.png (The map was made for http://minimaxir.com/2014/04/san-francisco/ http://minimaxir.com/2014/04/san-francisco/ if you want more context.)
- kvb 13y agoWhat makes it easier?
- minimaxir 13y agoLooking at the code used in the OP, ggmaps does not require a dependy on a different program (and it also used a .dll, which may make it difficult to use cross-platform as well.). ggmaps also used ggplot2 syntax, making it easy for style customization which I don't see in the original code. Although, using a shapefile adds another R package dependency, but not much more LOC. Alternatively, use the maps package, which also contains data for reconstructing popular maps like the world map used.
- sremani 13y agoI am a novice in F# and pretty much have no idea about R, but what I can see here is that World Bank Type provider is providing the OP with the data.
- minimaxir 13y agoCorrect in this case, but you could use a simple CSV to get World Bank data as well.
- tonyabell 13y agoF# and its Type Providers have a strong cross platform story. http://fsharp.org/use/linux/ http://fsharp.org/use/linux/ All the dlls referenced in the OP work on non windows platforms.
- rjzzleep 13y agomainly talking about f# here... this looks like the classic example for f# type providers. there are a few talks tomas petricek[1] has given on that topic. the relevant talk is one of the skillsmatter talks[2] i'm not sure if they're all publically available, but they used to be at least. edit: but basically the summary is that you can do really cool things with type providers and have your ide(visual studio) give you full completion on parts of data you want to analyze. kinda like re# but without having to generate half a million lines of xml for web services. there's also book coming up with chapters about it from tomas [3] [1] http://tomasp.net/ http://tomasp.net/ [2] https://skillsmatter.com/members/tomasp#skillscasts https://skillsmatter.com/members/tomasp#skillscasts [3] http://www.manning.com/petricek2/ http://www.manning.com/petricek2/
- platz 13y agoI've heard a lot about the amazing-ness of type providers, but no-one seems to know how they work aside from saying something betwen they generate types for you, and they generate intellisense for you. I'm sure it all makes sense once you go ahead and play with it, but it looks like I'll have to be watching some videos to grok what is really going on.
- kvb 13y agoAre you curious about using them or implementing them? What level of detail are you looking for?
- platz 13y agoI think its knowing what's reasonable to expect from them and what's not reasonable i.e. what is static, what is dynamic, if there are artifacts how do they get created, what if the data schema is dirty... some of these questions I can answer myself just playing around with them, but I think I'd have to be comfortable implementing them before being comfortable using them.
- mmavnn 13y ago
- dalek2point3 13y agoand remember if you need a basemap that is more than simply all the countries in the world, you can use openstreetmap.org! Downloads of raw data in various forms can be found at : download.geofabrik.de/