Sorting latitudes and longitudes
Thank you both. The second post is more along the lines of what I want to do
as I just want to bin the data by latitude and longitude.
I do have some clarifying questions:
With the following data I produce the first 3 columns, using the suggested
formula,
Lat Long Bin
-77.85 166.67 947 -90 1
-70.77 11.83 1064 -88 2
-68.58 77.97 1156 -86 3
-67.67 45.85 1160 -84 4
-67.6 62.87 1127 -82 5
-67.57 -68.13 1168 -80 6
-66.55 93.02 1228 -78 7
-65.25 -64.27 1330 -76 8
-62.5 -59.68 1330 -74 9
-62.2 -58.93 1433 -72 10
The last two colums are the bin and the bin values for latitude that I would
expect the formula to produce for the latitude portion of the bin. For
instance, I would expect that the first row would fall in bin 747 rather than
947. Could you explain the formula a bit?
Thank you!
Ian
"MyVeryOwnSelf" wrote:
I have a large dataset (~5000 rows) that is tied to latitdue and
longitude (small portion below). For each latitude/longitude reading I
have between 8 and 10 columns of other data (not shown). I would like
to sort the data into latitude/longitude bins and then analyze it. The
bin size I'm looking for is 2 degrees latitude (from -90 to 90) and 4
degrees longitude (-180 to 180). This will produce 8100 bins. Only
about 1/5 of these bins will have data (I'm interested in data over
continents only). In each bin I plan to average numbers in the other
columns to come up with standard values for each bin.
latitude longitude
-38.35 141.6
-38.27 144.67
-25.63 118.72
49.05 51.87
28.63 121.42
25.85 -81.38
29.75 -81.53
29.92 -90.13
34.42 -119.68
38.57 -76.07
43.42 -124.25
One way to get started is to add a helper column that assigns each row to a
bin. For example, you might insert a new row C, put
=100*INT((INT(A2)+90)/2)+INT((INT(B2)+180)/4)
in C2 and copy down. With this formula, the first two digits split up the
latitudes; the second two, the longitudes.
What to do next depends on what kind of averaging you want. Maybe a pivot
table report would be useful.
|