Analyzing mobility patterns