I have a travel diary survey dataset that I am attempting to transform into more useful information. Currently, the data comes in the format of:

Survey# ,  PlaceVisited#,  TravelMode, TripPurpose, LocationType

1,      1,       NA,        NA,         home

1,      2,       auto,  doctor,     office

1,      3,       auto,  shop,       grocery_store

1,      4,       auto,  NA,     home            

where each place the survey respondent visits is a separate record (row) in the survey table, but this is really one multipurpose trip. What I would like to do with the data is separate each actual trip into a route with various points and purpose information included as (i think) a line using shortest path on a road network (I don't have the route actually taken). Currently, if a respondent leaves their house, and travels to several different stores by car, each store is entered as a separate record, as is their home starting location.

What I would like to have is one "trip" for each time the respondent leaves their house and comes back, regardless of how many places they visit while preserving the information about each place they visit. I am wondering what the best way to tackle this problem would be. I have so far struck out finding prepackaged tools to perform such a task in QGIS, GRASS, ArcGIS, Maptitude, and PostGIS. Should I approach this as a scripting problem using SQL, scripting a shortest path tool in a GIS, or is there another more efficient way to do it. Many thanks in advance!

  • Welcome to gis.SE. It might help us make more sense of this question if you can explain what the end-purpose of the data will be. Converting the records is presumably a step towards some later analysis, but you haven't told us what. Please edit your question to explain this. Also, does "LocationType == home" always indicate the start/end of a trip? If not, what defines a trip? Do you have a road network already? Do you want distances, or turn-by-turn instructions, or time? How do you need the purpose information encoded (e.g. property of the point or the leg in or leg out of the point)? – BradHards May 19 '13 at 14:27
  • I would like to have travel trips that I can later measure based on other layers, such as walking time, biking time, driving time to different amenities, and characteristics about the route, such as tree cover, elevation profile, crossing of major streets, etc. My research is on walkability and the effects of the built environment on travel mode preferences. I have a relatively detailed road network presumably created in ArcGIS network analyst, and could also use OSM data for the road network. All of my data except the survey comes from Denver's open data catalog. data.denvergov.org – EconGeo Mar 21 '14 at 5:28
  • My understanding is that the next version of Maptitude has some improved routing capabilities. Contact Caliper to see if it will do what you want. – winwaed Sep 23 '14 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.