Tag Info

New answers tagged

0

For completeness, here is what I ended up with: temp = ds[[(Flatten@Position[fileContents, #1])]] & /@ (Range[ Length[fileContents]] - 1); GeoGraphics[ MapThread[{GeoStyling[#1], Normal[#2[All, "Geometry"]]} &, {col, temp}]] Using GeoStyling instead of FaceForm to make the colors much more bold.


1

It is a bug. although adding one non-polygon to the list makes everything work: GeoRegionValuePlot[ Join[{Entity["City", {"LosAngeles", "California", "UnitedStates"}] -> Quantity[577.6458106034206`, ("People")/("Miles")^2]}, Thread[nmpgons -> nmpopdensity]], ColorFunction -> ColorData["Rainbow"]]


3

I post this example in case it is helpful: africa = CountryData["Africa"]; col = RGBColor @@@ RandomReal[{0, 1}, {Length[africa], 3}]; GeoGraphics[ MapThread[{EdgeForm[Red], FaceForm[#1], Polygon[#2]} &, {col, africa}]]


5

As an example cities = EntityValue[CountryData["UnitedStates", "LargestCities"], "Name"]; first = First@cities rest = Rest@cities; data = WolframAlpha[ StringJoin["moving from ", first, " to ", #, " $42,500"], {{"PriceComparisons", 1}, "ComputableData"}, PodStates -> {"PriceComparisons__Show prices", ...


0

In 10.0.1 at least, the data does get cached (If you run, say, GeoRegionValuePlot[CountryData[] -> "PopulationDensity"] the second time is much faster with no download icons (although in this case it still takes ~3 sec to paint all the country polygons) Also notice that the first time, the first download is much faster than the second. it gets "Positions" ...


3

Ok, I had to tidy this answer up: Functional way to change coordinates in Mathematica is to use combination of GeoPosition and GeoGridPosition: GeoGridPosition[GeoPosition[{lat, long}], (*projection*) ] The answer should be done here but there is some unconsistency for older than V10 versions. There is different scalling applied to directly downloaded ...


4

Perhaps mpF = GeoGridPosition[GeoPosition[#], "Mercator"][[1]] &; g1 = Graphics[{Gray, CountryData["France", "Polygon"], PointSize[Large], Red, Point[parisCoords]}, ImageSize -> 300]; g2 = Graphics[{Gray, Polygon[mpF /@ CountryData["France", "Coordinates"]], Red, PointSize[Large], Point@mpF[Reverse@parisCoords]}, ...



Top 50 recent answers are included