Creating Spectral Heat maps or Intensity maps from CDIP data using Ruby -
background
per coastal information data program (cdip), generating spectral heat/intensity map wave swell @ http://cdip.ucsd.edu/?nav=recent&sub=observed&units=metric&tz=utc&pub=public&map_stati=1,2,3&stn=100&stream=p1&xitem=dir_spectrum.
this dynamically generated data containing energy density, duration (in seconds) & direction (in degrees 180 degrees representing south).
data sample
here's explanation of data: http://cdip.ucsd.edu/data_access/mem_2dspectra.cdip
here's data sample buoy 100 (same buoy shown in heat/intensity/spectral map: http://cdip.ucsd.edu/data_access/mem_2dspectra.cdip?100
question
how take 2-dimensional data , create heat/intensity map ensuring overlaid on polar coordinate map (and appropriate scale), example url per cdip's site?
ultimately, need done in ruby, preferably using ruby-gd or rmagick, appreciate language-agnostic solutions, too.
i in rush, can't finish right now, nobody answered yet, here first approach:
code in mathematica (sorry, said no time right now):
a = import["http://cdip.ucsd.edu/data_access/mem_2dspectra.cdip?100", "table"]; graphics@flatten[table[ (*colors, dont mind*) {colordata["cmykcolors"][(a[[r, t]] - .000007)/(.0003 - 0.000007)], (*point size, dont mind*) pointsize[1/sqrt[r]/10], (*coordinates points "a" data matrix *) point[ {(rr =log[.025 + (.58 - .25)/64 r]) cos@(tt = t 5 degree), rr sin@tt}] } (*values iteration*) , {r, 7, 64}, {t, 1, 72}], 1] (*rotation, dont mind*) /. gg : graphics[___] :> rotate[gg, pi/2]
i still can't right color scale:
Comments
Post a Comment