Message Boards Message Boards

4
|
2958 Views
|
0 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How can access to curated data needed by GeoRegionValuePlot be speeded up?

Posted 10 years ago

Seems that GeoRegionValuePlot requests data from the internet multiple times to process its plot.

As an example, let's graph smoking per capita worldwide.

smokers = 
  Import["http://en.wikipedia.org/wiki/List_of_countries_by_cigarette_consumption_per_capita", "Data"];
table = Rest@smokers[[1, 1, 2]][[All, 2 ;;]]; 
rule = "Republic of Macedonia" -> "Macedonia"; 
GeoRegionValuePlot[
  {CountryData[StringTrim@#[[1]] /. rule], Interpreter["Number"][#[[2]]]} & /@ table, 
  ImageSize -> Large, 
  PlotLabel -> "Cigarrete Consumption Per Capita"]

While waiting for the plot to be graphed, you can see that mathematica accesses servers for information at least twice (Message below shows up twice, then takes additional time to process).

enter image description here

After cycling twice throught this message, it is delayed further by some type of background activity (total time around 8 seconds).

enter image description here

Is there a way to preload all necessary information to the local drive so as to obtain better performance? Current performance forbids it use for interactive application.

POSTED BY: Diego Zviovich
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract