How getting coordinates of geagraphical locations?
Mostra commenti meno recenti
Hi,
I have the following struct array.
data=struct('Position',[],'Value',[])
data(1).Position='London';
data(1).Value=20;
data(2).Position='Rome';
data(2).Value=100;
What I need is a bubble plot of values field with a map in the background and the bubble must be located where is the geographical location. I know this function http://www.mathworks.com/matlabcentral/fileexchange/27627-plot-google-map but I don't know how to get the coordinates of the locations. Does anyone have an idea?
Thanks
Cheers
Pietro
Risposta accettata
Più risposte (2)
Chad Greene
il 7 Ott 2014
1 voto
Do you have the mapping toolbox? If so, the inputm function lets you click on a map to get geographic coordinates.
As a matter of style, I strongly recommend against ever using bubble plots. Circles are two dimensional, but your variable, let's call it population, is one dimensional. As Edward Tufte points out, you should never let the dimensions of the display exceed the dimensions of the data. This is particularly important in the case of circles, because our eyes do not scale the size of circles linearly.
A question I always have when I see bubble plots: is the radius of the circle scaling with the data, or is the area of the circle scaling with the data? That is rarely clear. Even if you are explicit about which scaling you use, the way we perceive the size of a circle is not linear with radius or area.
Inevitably, if you place a giant circle over London to show its big population, some of that circle will overlap outlying towns that are not represented by that circle, and that just does not make any sense at all. It would be more insightful to plot population density with a color map or even contours. That way you'd preserve the nuance of the original data instead of distilling everything down and saying to your viewer, "look, this circle is bigger than this other circle". Just a personal preference, but I say leave bubble plots to the click bait sites.
7 Commenti
pietro
il 7 Ott 2014
Chad Greene
il 7 Ott 2014
See Geoff's solution. It's pretty darn cool.
pietro
il 8 Ott 2014
Chad Greene
il 8 Ott 2014
Ah, if all the circles are the same size that's fine. I thought you'd be scaling the size of the circles relative to some variable. No color map or heat map necessary. :)
pietro
il 10 Gen 2019
Sébastien MAILFERT
il 22 Gen 2019
Hi pietro,
it is clear that there is a huge problem if the website does not exist anymore.
Did you find a solution?
pietro
il 22 Gen 2019
Sébastien MAILFERT
il 21 Gen 2019
0 voti
Hi all,
the query.yahooapis.com site does not work anymore since few days.
Do you have an idea to bypass this yahoo queries?
Best regards.

2 Commenti
Serbring
il 18 Nov 2019
that is good resource. You can access to website to the API. I am not an expert on this.
Categorie
Scopri di più su Geographic Plots in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!