I have an entry in a CSV file like this (piece of data):
"","x","y","sim1","sim2","sim3","sim4","sim5","sim6","sim7","sim8","sim9","sim10","sim11","sim12"
"1",181180,333740,5.56588745117188,6.29487752914429,7.4835410118103,5.75873327255249,6.62183284759521,5.81478500366211,4.85671949386597,5.90418815612793,6.32611751556396,6.99649047851562,6.52076387405396,5.68944215774536
"2",181140,333700,6.36264753341675,6.5217604637146,6.16843748092651,5.55328798294067,7.00429201126099,6.43625402450562,6.17744159698486,6.72836923599243,6.38574266433716,6.81451606750488,6.68060827255249,6.14339065551758
"3",181180,333700,6.16541910171509,6.44704437255859,7.51744651794434,5.46270132064819,6.8890323638916,6.46842670440674,6.07698059082031,6.2140531539917,6.43774271011353,6.21923875808716,6.43355655670166,5.90692138671875
The x and y represents the longitude and latitude for each point in a simulation. I have to store this in an array. I thought to find the min and max for each x and y and them create a matrix with this dimension and after this do some scale to discover what value should be at the (0,0) (0,1) (0,2) and so on in my matrix.
In D3, there is a function that do all of this:
scaleX = d3.scale.linear().domain([d3.min(simulationDataset, function(d) {return d.x;}), d3.max(simulationDataset, function(d) { return d.x; })]);
scaleY = d3.scale.linear().domain([d3.min(simulationDataset, function(d) {return d.y;}), d3.max(simulationDataset, function(d) { return d.y; })]);
There is something similar in Python or I should all of this from zero?
Thanks in advance.