2
$\begingroup$

I have some current data that I want to plot in Mathematica. The first two columns are the latitude and longitude respectively (longitudes are negative b/c it is west of the prime meridian and all latitudes are positive since it is north of the equator.) The third column is the u speed whereby a positive number indicates that this component is going towards the east and negative towards the west. The fourth column is the v speed whereby a positive number indicates towards the north and negative is towards the south. All values are in cm/second.

59.666667 -37.333333 -4.232386 -12.291741
59.666667 -37.000000 -4.232386 -12.291741
59.666667 -36.666667 -4.232386 -12.291741
52.666667 -42.666667 18.513031 4.274070
52.666667 -42.333333 19.890438 2.090569
52.666667 -42.000000 19.696155 3.472964

$\endgroup$
3
  • $\begingroup$ What version of Mathematica do you have? $\endgroup$ – Zviovich Feb 18 '15 at 14:47
  • $\begingroup$ Try looking at the documentation for GeoGraphics, GeoPosition, and GeoDisplacement if you're using v10. $\endgroup$ – 2012rcampion Feb 18 '15 at 14:51
  • $\begingroup$ I have Mathematica 9 unfortunately. $\endgroup$ – lwcarani Feb 18 '15 at 20:37
4
$\begingroup$

Mathematica v 10

data = {{59.666667, -37.333333, -4.232386, -12.291741}, {59.666667, \
-37., -4.232386, -12.291741}, {59.666667, -36.666667, -4.232386, \
-12.291741}, {52.666667, -42.666667, 18.513031, 
   4.27407}, {52.666667, -42.333333, 19.890438, 
   2.090569}, {52.666667, -42., 19.696155, 3.472964}};
Manipulate[
 GeoGraphics[
  Arrow[{GeoPosition[{#[[1]], #[[2]]}], 
      GeoPosition[{#[[1]] + scale #[[3]], #[[2]] + 
         scale #[[4]]}]}] & /@ data, 
  GeoRange -> Quantity[range, "Miles"], GeoProjection -> "Albers", 
  GeoGridLines -> Automatic], {{scale, 0.5}, .2, 1}, {{range, 1500}, 
  200, 2000, 100}, SynchronousUpdating -> False]

enter image description here

$\endgroup$
1
  • $\begingroup$ This is perfect. Thank you again. Would you mind stepping through the code line by line and explaining what each line is doing? Thanks! $\endgroup$ – lwcarani Feb 19 '15 at 12:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.