Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Question about Tally on a list of lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99267] Question about Tally on a list of lists
  • From: bleeckerj <bleeckerj at gmail.com>
  • Date: Fri, 1 May 2009 05:23:55 -0400 (EDT)

Hi,

So, I'm an on-and-off Mathematica user, just now looking at version 7,
fussing with a challenge. I have data that represents geo tracks of
latitude and longitude pairs. I want to turn this array of pairs into
a heatmap covering the geography of the tracks.

My first thought was to run Tally on the list and get counts for
latitude/longitude pairs. That was an immediate fail because the pairs
of data are mostly all different, of course. I thought if I could
BinList things, piling them into "quadrants" of such-and-so dimensions
(say, 1 kilometer square, or whatever) I could then count the number
of bins.

Alternatively, I'd even be happy to somehow reduce the precision of
the numbers in the list, but after a few hours . I have not been able
to figure out how to coax Mathematica to somehow truncate the numbers
down to, say, 4 digits after the decimal point. This would create a
kind of artificial Bin'ing of the data, which would be fine for my
purposes. Removing the accuracy would allow me to effectively turn the
data into a checkerboard of "hits."

But, frankly, I'm not sure how to actually implement any of this,
either the "truncating" or the Tally technique running over a list of
lists with a SameQ sort of consideration to allow "close enough" to
count in a Tally.

I would be grateful for any pointers or suggestions as to how I might
implement this.

Julian Bleecker
http://www.nearfuturelaboratory.com


  • Prev by Date: DumpSave of InterpolatingFunction increases its execution times
  • Next by Date: Re: Export Mathematica->Excel [specific sheet]
  • Previous by thread: Re: DumpSave of InterpolatingFunction increases its execution times
  • Next by thread: Re: Question about Tally on a list of lists