Pages

Browser Cartography: Some Safehouses for ESRI Refugees

Wednesday, May 30, 2012
"Island" by Konstantin Kafer

A Primer for Getting Started With Open-Source Web Maps


Now that you know why I care about telling compelling stories with widely-distributed maps, let's look at a few of the many tools that are out there to help the process. I confess to narrow experience here; I use MapBox and CartoDB for the majority of my projects, and there are plenty of alternatives to those. But as a starting point I think that these open-source web map design platforms are perfect - they minimize the amount of code required, they use the best graphic rendering engine in the field, and they are extremely cheap (or free) to use, even in an enterprise or high-traffic environment. I'm avoiding ESRI's "ArcWhatever Online for Server" options because of a.) the high price tag, and b.) the actual user-facing sites are only as robust as the javascript or flash developer who builds them. My preferred options give you a lot more to work with out of the box, for free.

I am not going to walk you step-by-step through the process below - I'll point you to resources that will - but rather I mean to sketch the structure that can get your map applications up and running. If you're stumbling and need some help, drop me a line through the GeoSprocket contact page or on Twitter

Step 1: Data


Data in this context can mean a lot of different things. The tools we're using aren't picky, so this includes:

  • Shapefiles (but this will need to be in a compressed folder)
  • Spreadsheets (CSV, XLS, DBF, you name it)
  • KML or KMZ
  • GPX or in many cases raw text from various GPS units

Desktop GIS isn't dead. Those who say so aren't paying attention. You still need some form of spatial data manipulator to analyze and prepare your source information, and if you can do that with pure GDAL hacking at the command line of a virtual machine, you have no need for my advice. Yes, "Desktop Platform" includes ArcMap, but if you want to make a clean break I recommend Quantum GIS for robust, open-source geoprocessing potential.


Step 2: Choose a Platform and Get a Hosting Account

Your data should live on the web somewhere - where, exactly?
  • Option 1: MapBox - Most advantageous for its speed and complete cartographic design potential. However, once you've rendered your map into tiles (in step 3), there's not much you can do to change them on the fly. Use this option if you have a specific vision of symbology in mind to present to your users, if you have a lot of information to present interactively (i.e. text/charts/images that pop up when a feature is clicked), and also if the underlying data will be accurate for more than a few weeks. Sign up here for the free starter account.
  • Option 2: CartoDB - This is a user-friendly, cloud-based adaptation of the popular PostGIS database architecture. It can run a bit slower than MapBox (since it's rendering on the go), and the cartography options are more limited. However, the provided SQL API means that you can sort, filter and process your data basically in the browser. Go with this option if your application will have a lot of user-generated queries (i.e. "how many points are within 50 miles of this one?"), or if you regularly update the data being mapped. Sign up here for the free starter account (notice the pattern of freeness).


Step 3: Mapping Your Data




At this point using either option, you should now have maps that are ready to be launched.

Step 4: Serving Your Map to the World




Step 4a: Embedding - By far the easiest way to get a URL that you can distribute to your audience. Both Mapbox and Cartodb have fantastically-easy embed interfaces for plugging maps into your blog or website content management system, and in each case they essentially host a full-page map website for you as well. Examples:


Racial Breakdown of Census Blocks in Burlington, VT Using Mapbox


Participatory Farm Mapping in Vermont with CartoDB



Step 4b: The World of Pages, Javascript and Beyond - This creeps a bit further beyond the scope of what I hope to cover here, but this is the ultimate destination for most of my map applications. There is simply greater flexibility in a website or mobile application that you can manage yourself, though it requires some knowledge of HTML, CSS and Javascript.

I say "some" knowledge - I didn't know the first thing about code when I got into this world, but it was amazing how easy it was to adapt a little bit. The resources available in the open-source software community are spectacular; the help and guidance offered to me by experienced developers out of sheer goodwill has been uniformly superior to the high-priced support of proprietary vendors (Trimble and ESRI, I'm looking at you). I am no developer, but with community help I've been able to explore and utilize some of the most exciting tools available to cartographers in our time. And things are only getting better from here . . .

Here are a smattering of places to start for customizing a page of your own:

  • Mapbox Templates - these require a bit of github knowledge, but otherwise they are as close to plug-and-play map sites as you'll find. 
  • CartoDB Examples - Plenty of code available for re-purposing and adapting. In many cases this just involves changing a line or two to point to your own data.
  • Codecademy - Might as well learn how to do this stuff for real . . .


Read more ...

Browser Cartography: A Manifesto

Tuesday, May 29, 2012
Hear me out for a minute . . .


"Toner" tiles by Stamen Design

. . . I'd like you to make maps intended for online viewing. 

This is partially a selfish impulse; I'm going to throw a rock through the window if I see another "PDF Download" link masquerading as a web map. I'd also like you to do this to save a few trees from their 24"-by-36"-poster fate, but mostly it's because we're at an inflection point in cartography . . .


View Larger Map
Routing application with Google Maps

. . . I think the public - the folks who show up to input forums for development projects, and who want to know how far it is to the next lean-to on the trail - are now fully-literate in maps. Mapquest started this process and Google advanced it, but now there are tools beyond those to help you engage your audience on computers and mobile devices (No, Trimble, I am not referring to the Juno. Screw that.). Many of these tools happen to be open-source . . .


Ecoregions of New Zealand, hosted by Github

. . . If you currently describe yourself as a "GIS Analyst/Technician/Monkey" - as I did not long ago - your day largely consists of desktop GIS, and 95% of you are working entirely with some combination of ESRI products. I frequently slag ESRI for bugginess and closed-ness, but they do just fine making a desktop platform for geospatial analysis. However they have never known what "Cartography" means (that's right, you take it to Illustrator if you want your map to look good), and they're just starting to realize that they don't know what "Web Mapping" means either. . .


Population Change in South American Cities, using Mapbox 

. . . The "open-source alternatives" are not replacements for ArcGIS. But through advances in cartography and and browser-based distribution, open tools are unearthing the truth that the rest of us forgot about while sorting through ArcToolBox: that maps tell stories. That your data can be weighted, decoupled, buffered and regressed twenty ways and it means nothing if your cartography is crap. That you can drop cash on a printed poster with a sweet imagery background and it's lost to the ether if two people show up to your hearing, then you post it publicly as a PDF.

These are issues that bedevil public and private sectors, academic and amateur alike. But I say that you can make accurate yet artistic maps and deliver them in a way that is almost universally accessible (at least in the developed world). Let's make maps that people care about.

With the 'Why' of it behind, my next post will be an introduction to the 'How.'

Read more ...