Advertisements

Archive for November, 2014

Pearson correlation and GIS

2014/11/28


pearson-01
Do these two variables have a correlation?. To answer this important question first of all we have to know that only if it’s a linear relationship and there are no outliers we can take advantage of Mr Pearson’s correlation statiscal tool.

If i love chocolate, does this mean i have tendency of being chuby? or on the other hand there’s no relationship at all. Let’s figure it out.

For this particular occasion, input data XY are two DTM heights, my guess is the following: if correlation is too big, i may deduce they’re not independent products and one might been created from the other, in other words, we might have tried to cheat and we are using a different source that the one we have stated… In GIS sometimes things are not exactly as expected and there’s need to be assertive and making a plan for discovering this minor issues.

 

 

 

Let’s start from the beginning, if source 1 is the same as source 2, the correlation would be perfect, is this correct?. The answer is yes. r (Person correlation) would be = 1. So yes, if this was asking about chocolate and fleshiness this would be 100% right but this hardly or never happens in real life (direct and no other explanation or variable interaction… why is always so0o complicated?).

pearson-formula

pearson-04

With real data, you would not expect to get values of r of exactly -1, 0, or 1. For example, the data for spousal ages (white couples) has an r of 0.97. Don’t ask me where i got this weird source (well, just in case: http://onlinestatbook.com/2/describing_bivariate_data/intro.html)

age_scatterplot

If i fill source 2 with a random number, the correlation would be almost none accordingly (in this case r=0.17)

pearson-06

Now if we see the diagram of the first two sources and we get the Pearson correlation coefficient (r=0.24) which means the correlation is very weak.

pearson-03

But that was only a very small part of the table (only 30 iterations), so if i do the same calculation out of the +13,000 iterations i really need, i get these figures (by the way, theres no need to use such a complicated formula above, you can use this one in EXCEL: =PEARSON(A1:An;B1:Bn))

pearson-07

So the correlation now its moderate, which makes me deduct at least the sources seem different and i’d need more clues to think my customer might have tried to actually cheat me using the same source for both datasets.

Summarizing:

r=1, correlation is PERFECT

0.75<r<1, correlation is STRONG

0.5<r<0.75, correlation is MODERATE

0.25<r<0.5, correlation is WEAK

<0.25, almost NO correlation, both variables are hardy related

I hope you guys have found this post interesting,
looking forward to hear where could you use it and/or your feedback,

Regards,

Alberto Concejal
MSc GIS

Advertisements

Comparing France Meteo and Spain Meteo from the visualization point of view

2014/11/24

After living in France for four years i have to tell i am always aware of Meteo information on TV (well, i live in Brittany, i guess this makes sense!). It was the same in Spain or anywhere else in the world where i had lived and the reason why is i have always loved Meteo and statistiques, mostly after working as an aerial surveying photographer in the late nineties… but that’s another history.

Weather forecast its quantitative data that distributes spatially, meaning every single spot will have a different figure, even if it’s separated no more than 1 mm, at least in theory. So the question is: as its impossible showing predictions for every single square mm of the area of interest, we need to estimate them using different models. Still if we point anywhere at the map we should know if the icon or figure applies or not to the spot i want to know about.

Let’s make it easier to understand, lets use images!!!

First of all, i know its difficult but it’s important, please don’t have into account Meteo news are presented (in this particular case) by Anaïs BAYDEMIR, which is a beautiful TV journalist at France 2… Let’s not focus on this (but if you happen to want to know more about her i hereby copy a couple of links to both wikipedia and youtube:

http://fr.wikipedia.org/wiki/Ana%C3%AFs_Baydemir

spain-meteo

Having said that, le’s take a look the way this is shown in Spain (TVE 2014). Well, again let’s not focus on the guy’s grey suit but…

 

 

 

 

 

spain-meteo-02

Information it’s kind of OK but what happens if we want to know about a spot in the middle of two icons?. Is the partly cloud icon which applies to my place or it’s the ‘sun and flies’ one?. How can i be sure of the forecast if i live in this this big region in the SW of Spain?…

 

 

 

 

france-meteo

On the other hand let’s focus on Anaïs_Baydemir, ops, meaning let’s focus on the way France 2 shows this information:

france-meteo-02

Every single square mm is perfectly defined, if we want to know the forecast in a particular place we know the icon that corresponds to the spot and we don’t have to guess…

france-meteo-03

I know it’s kind of nothing too important, mostly if introduced this saucy way but think about it, wouldn’t you prefer to read Meteo this way? (again i’m not asking if you prefer the way the french beauty is showing the info compared to the way the spanish guy does, that’s completely irrelevant… right?)

Regards,
Alberto CONCEJAL
MSc GIS and Meteo fan

Remote Sensing, Photogrammetry, Lidar and Landuse IGN Spain

2014/11/18

teledeteccion-fotogrametria-lidar-usos-del-suelo-ign-20141118b

A few more lines for leting you know again that i passed this other course just now in Instituto Geográfico of Spain (IGN).

Remote Sensing, Photogrammetry, Lidar and Landuse, a comprehensive 40h update on relevant information i need tu use on a daily basis. This ‘update’ helps me to better understand what i am working with and this way, being able to properly describe it for my daily analysis,

Advanced Thematic Cartography IGN Spain

2014/11/14

cartografia-tematica-avanzada-20141118b

A few lines for leting you know i passed this course last year 2013 in Instituto Geográfico of Spain (IGN). Spatial analysis, Spatial stats, proper simbolization, data mining and geovisualization. A very interesting 40h online course that helps me on a daily basis to be able to show geodata in a more professional way.

Because we normally need to deepen our geodata without making too complex to understand the result of our analysis.

HTML High resolution DTM visualization using Quantum GIS (Qgis)

2014/11/03

This QGIS Plugin, Qgis2threejs, exports terrain data, map canvas image and vector data to your web browser!!

3dvisualizatio-DTM-QGIS-20141103

All you have to do is opening the DTM in Qgis (2.4.0 Chugiak), go to plugins library and install Qgis2threejs.

3dvisualizatio-DTM-QGIS-20141103-03

Once its installed you will see this icon on screen iconand you will need to clic on it.

3dvisualizatio-DTM-QGIS-20141103-04

Then choosing the parameters of the visualization and voilá!!

I have used a 5m DTM which source was LIDAR so the quality is very good

3dvisualizatio-DTM-QGIS-20141103-05

Hope you guys like it. Feedback would be greatly appreciated.

Alberto Concejal
MSc GIS and Quality Control
albertoconcejal [at] gmail.com