Posts Tagged ‘how-to’

Meet Map Practical, a new carto blog

Tuesday, February 9th, 2010

Kevin McManigal (also of Adventure Cycling) is teaching intro to cartography in Montana and has a new blog focused on getting into mapping. First posts focus on Google My Maps, Vector versus Raster, and Purpose and Audience.

Welcome to Map Practical, where the cartography gets done. These are the cartographic trenches, the domain of greasy hands, busted knuckles, and sore mouse fingers. This is the home of techniques, tutorials, and tricks of all things map. Here’s how we do it; your job is to make it look good!

Are you a cartographer or studying to be one? How many tricks have you found that slipped your memory and had to be re-learned? How many hours have you spent on Google looking for that long lost tutorial? Thinking back on my first mapping class, there were so many things that I figured out by trial and error, blindly groping for the right keywords in “Help.” There has to be a better way!

So, here I am teaching cartography now and thought, “What if all those tips could be in one convenient place?” Well here it is, Map Practical! This will be an ongoing process; a tip a week, a link here, a comment there, and a video tutorial when I find the time. After a semester or two it should be a good resource.

Please contribute, and it will only get better.

Thanks, Kevin

Check out Map Practical . . .

How to Make a US County Thematic Map Using Free Tools (FlowingData)

Friday, November 20th, 2009

[Editor's note: If you don't have an expensive GIS license but still want to make pretty maps, Flowing Data has a tutorial to get you started. They even use ColorBrewer when setting up the data classes!]

Republished from Flowing Data.
Posted by Nathan / Nov 12, 2009.

There are about a million ways to make a choropleth map. You know, the maps that color regions by some metric. The problem is that a lot of solutions require expensive software or have a high learning curve…or both. What if you just want a simple map without all the GIS stuff? In this post, I’ll show you how to make a county-specific choropleth map using only free tools.

The Result

Here’s what we’re after. It’s the most recent unemployment map from last week.

Unemployment in the United States

Step 0. System requirements

Just as a heads up, you’ll need Python installed on your computer. Python comes pre-installed on the Mac. I’m not sure about Windows. If you’re on Linux, well, I’m sure you’re a big enough nerd to already be fluent in Python.

We’re going to make good use of the Python library Beautiful Soup, so you’ll need that too. It’s a super easy, super useful HTML/XML parser that you should come to know and love.

Continue reading at Flowing Data . . .

Visual Language and Data Analysis (Visual Business Intelligence)

Wednesday, September 23rd, 2009

head-first-data-analysis visual-language-for-designers

[Editor’s note: Two new books, one from Connie Malamed titled “Visual Language for Designers: Principles for Creating Graphics that People Understand” and the other called “Head First Data Analysis” by Michael Milton are endorsed by Stephen Few on his Visual Business Intelligence blog. Check em out.]

Republished from Stephen Few ‘s Visual Business Intelligence blog.

If you’ve been reading this blog regularly for awhile, you know that I occasionally bemoan the sad state of most information graphics (infographics). Most of the folks who produce infographics lack guidelines based on solid research. In their attempt to inform, describe, or instruct, most of the infographics that I’ve seen fail-many miserably. I’m thrilled to announce, however, that a new book is now available that takes a great step toward providing the guidelines that are needed for the production of effective infographics.

Continue reading about Visual Language or Data Analysis at Visual Business Intelligence . . .

Using Live Paint to Build Polygons Out of Line Segments in Adobe Illustrator (Kelso)

Wednesday, August 5th, 2009

I remember spending hours in my introduction to computer cartography lab class at Humboldt State University “building polygons” in the Adobe Illustrator design software package. We started with state “lines” and, one by one, duplicated and joined them into polygons by painstakingly selecting matching endpoints and cursing the Illustrator error dialogs that kept coming up. Fast forward 5 software versions and 10 years and we can now accomplish the same workflow in seconds using the new “Live Paint” feature available in version CS2 and newer. Maybe this is old news, but it’s sure makes things easier on the Natural Earth Vector project!

Download native Illustrator CS3 file and follow along with sample linework.

Step 1: Start with lines for 1st order, country, and hydro coast, rivers on separate layers (like you’d normally layer your map file).

live_paint_step1

Step 2: Duplicate all related lines onto one “building” layer (the next step would group originals if you don’t do here).

live_paint_step2

Step 3: Select all those duplicated “building” lines (interior state boundaries, exterior country boundary, and exterior shorelines for that country, the more linework, the slower it goes), choose the live paint tool livepainticon and click on the selection. It will turn into a “live paint group”. If  you are viewing the bounding box, it will appear slightly differently than normal handles (see below).

live_paint_step3

Step 4: Make sure the toolbox fill is a color like yellow (the default is set to no fill, so you won’t get the tool to work unless you change it). Click and drag the live paint tool over all implied polygons between lines. Watch them turn into filled polys!!!! If you don’t get an implied polygon to fill, try adjusting the gap tolerance at Object > Live Paint > Gap Options. The default settings worked fine for me, though. Not shown here are the reddish thick highlight around target polygons as the Live Paint tool is dragged acros the artwork.

live_paint_step4

Step 5: Once you’re done and all your implied polygons are colored in like a coloring book, expand the live paint group (Object > Live Paint > Expand, or use the Expand button on the control panel button strip). Ungroup twice (Object > Ungroup). The polys, lines, and hydro will all be on the building layer. Use select by similar to select just the filled polys you just made and move them to the First_order_admin_polys layer. Delete the left over country and hydro lines (you have originals elsewhere).

live_paint_step5

Step 6: Color code new state polygons and compound path related admin units (none in this instance). That’s it!

live_paint_step6

Problems? Try this tutorial video from Layers magazine and, separately, from Mordy Golding.

Problems Dissolving in ArcMap, Try Repairing Geometry First

Tuesday, July 14th, 2009

[Editor’s note: I was having trouble last week dissolving a shapefile based on a common attribute. I kept getting the following error: “Invalid Topology [INCOMPLETE_VOID_POLY]“. Not entirely helpful! A little Google searching turned up the following tip from ESRI.]

Republished from ESRI.

Problem:  Some Overlay Tools, such as Intersect, return unexpected results or fail

Description

Results do not look correct or operations fail with strange errors such as:

“Invalid Topology [INCOMPLETE_VOID_POLY]“.

If this type of error has occurred, it is most likely to occur when using one of the following:
Clip, Erase, Identity, Intersect, Symmetrical Difference, Union, Update, Split Featureclass to Coverage, Dissolve, Feature to Line, Feature To Polygon, Integrate, or ValidateTopology.

Cause

It is possible that tool outputs may be strange or incorrect because one or more features in the input feature class have geometry problems. Some examples of geometry problems are:

· short segments
· null geometry
· incorrect ring ordering
· incorrect segment orientation
· unclosed rings
· self-intersections or empty parts

Solution or Workaround

If such errors occur or the output looks incorrect, the first step in assessing the situation is to run the ArcToolbox tool Data Management Tools > Features > Check Geometry. -show me

[O-Image] Check Geometry

This tool provides a list of the invalid features in the feature class and a short description of the problem. Features with problems can be fixed in one of two ways:

  • Editing the feature class with the geometry problem, and fixing each individual problem identified. Some of these problems, like non-simple geometry, can be fixed by double-clicking the feature in the editor and saving the edits.
  • Running the ArcToolBox tool Data Management Tools > Features > Repair Geometry on the feature class containing the problem features. -show me

Shapefiles, Actionscript 3.0, and Google Maps (Box Shaped World)

Monday, June 8th, 2009

[Editor's note: Tutorial for using the vanrikom classes to read in shapefiles in Flash and Flex AS3 and display them on a Google Maps mashup.]

Republished from the Box Shaped World blog. 28 April 2009.

I’m working an Adobe AIR application and I wanted to be able to have the user select a shapefile, and then parse it to create a KML file.  I didn’t want to have the user be responsible for creating a KML file.  I thought I might try and crack the shapefile enigma since it is a well documented format, but that would have taken time and I suddenly realized I’m not actually a developer :).  Instead, I found this set of Actionscript Classes to parse a shapefile in Flash.  Unfortunately, I didn’t find a very good tutorial on how to work with the classes.  The example is a little confusing (at least for me) and also uses a far file.  I’d never heard of far compressed files.  So I took the classes and created my own parser.  I thought I would post a tutorial on how to use these shapefile classes in conjunction with AIR and the Google Maps API for flash.  This technique would work with flex as well, I just didn’t want to have to write the code to upload a file.  I presume a few things with this.  The shapefile you are using for this should already have a geographic projection (e.g. latitude and longitude Geographic NAD 83).  In order to use the Google Maps API with AIR, you need a URL with a key associated with it.  Below are two zipfiles available for download.  The testfile.zip is the shapefile I was using.  The vanrikom.zip is the downloaded actionscript classes from the Google Code repository.  I had trouble downloading the using an svn so I did it manually.  I’ll save you the time by making it available here…unless the original author asks me to remove them.  There are parts that I find confusing with the way the reader was set up.  For some reason polyline inherits from polygon.  Intuitively to me it should be the other way around…but like I said, I’m not a developer.

This was all done using FlashDevelop and the Flex SDK 3.  There are 4 custom classes in addition to the mxml file.  Each are shown here.

Continue reading at Box Shaped World . . .

Density Mapping in Google Maps with HeatMapAPI (GeoChalkboard)

Monday, April 27th, 2009

[Editor's note: Heat maps are a useful way to qualitatively represent densely clustered point locations on a map. This post from GeoChalkboard walks thru how to create using the Google Maps API and the HeatMap API.]

Republished from GeoChalkboard, there on March 11, 2009.

In the GIS world heat maps are a graphical representation of point data on a map through the use of colors that indicate the density of some variable such as crime incidents or traffic accidents.  Heat maps let users quickly visualize the density of locations. Being able to understand the density of point locations makes it much easier to see patterns in your data, especially when using colors. In this post we’re going to examine the HeatMapAPI, a JavaScript API for creating heat maps in Google Maps.


(Above) 2009 Starbucks Store Closures

Introduction
HeatMapAPI can be used over the Internet or as a .NET DLL that runs in a local environment and allows you to integrate heat map images into Google Maps or other GIS systems.  In this post we’re going to use HeatMapAPI to visualize the density of recent Starbucks store closures.  In a recent statement, Starbucks announced the closure of 600+ stores in the United States due to economic conditions.

Continue reading at GeoChalkboard . . .

Tóth Graphix Blog

Wednesday, March 4th, 2009

Tibor Tóth has been creating shaded relief maps (see examples below) for many years for National Geographic among others and has made himself a little blog talking about some of his projects to make the occasion of his seventy-second birthday.

Post topics include:

Continue reading to Tóth Graphix Blog . . .

Creating the District Taxi Fare Estimator (Google Maps Mashup)

Thursday, March 20th, 2008

taxi yellow cab I published a Google Maps mashup for The Washinton Post on January 20th (view at washingtonpost.com/taxifares/) that allows a consumer-focused price comparison between the current zone-based fare structure and the planned time-distance meter system. The tool allows a user to enter their own route or try a sample route.

The approximate route is plotted on a Google Map and the prices are shown and compared to calculate the taxi rider’s savings (or loss). The map is fully interactive: markers can be repositioned if the user don’t know a street address but does know a map or satellite image location. The switchover to time-distance meters is now scheduled for May.

This blog post will describe how and why the interactive taxi fare estimator was created and share who’s using the tool and determine if the zone or meter system would be cheaper based on actual usage with a sample pool of nearly 17,500 unique visitors and over 50,000 trips calculated.

 

taxi washington post dc taxi estimator

Screenshot of final Washington Post District Taxi Fare Estimator interactive.

Background

One of my bosses, Larry Nista, approached me late in 2007 about building an online tool to compare estimated prices between the zone and meter taxi fare systems. Our department had already been experimenting with simple online content this seemed like a good project to create a more complex Web 2.0 site where a user was given a higher level of interaction and meaningful, customized results. A non-work friend and I had previously talked of making a cell phone text based service for determining zone fares so this projected peaked my curiosity.

My previous experience were relatively simple projects like:

Most these projects are very procedural, 1, 2, 3 style projects with a limited set of outcomes that could be hand designed and linked. The taxi project required a more general solution. I had already been programming in ActionScript for Flash and was fairly competent at that (several unpublished projects) and my experience with the Dog Parks project showed me how similar ActionScript was to JavaScript, which is the language Google Maps API is written in.

It became obvious this project should be done using the Google Maps API early on and I set about learning all the different data structures and functions. At first I thought I could use web services provided by the District of Columbia GIS mapping team online, but it would still have needed to combine that with the Google Maps map tiles so I decided to do all the mapping with the Google Maps API.

Project Phases

  1. Conceptualization of the project:

    Compare fares between meter and zone taxi fare rate structures

  2. Discovery.
  3. DC GIS web services, Flash, Google Maps API, HTML, CSS

  4. Design.

    Mockup in Illustrator of basic features and design

  5. Implementation.
  6. Dreamweaver HTML, Javascript coding, more discovery of Maps API routine

  7. Redesign

    Increase user interactivity (draggable map markers)

  8. Redesign based on comments
  9. Price comparison, look and feel & bug squashing (cross-browser compatibility)

  10. Final implementation and release

    Including tracking code via Google Analytics

Why Google Maps API?

I used Google Maps API as it could quickly calculate route distance and estimated travel time. I could use the API to draw the map and the route line and icons interactively. Finally, I could use it to do basic map algebra like “is the start point in what taxi zone polygon” which was needed to determine the zone-based fare.

(more…)