Qiang Li
Reputation
441
Next privilege 500 Rep.
Access review queues
 Mar 25 awarded Popular Question Nov 8 awarded Popular Question Oct 4 awarded Popular Question Dec 30 awarded Popular Question Jul 2 awarded Curious Jul 1 awarded Popular Question May 14 asked Assuming seems not working and “Solve::svars: Equations may not give solutions for all ”solve“ variables.” issue Feb 5 awarded Yearling Jan 7 awarded Custodian Sep 15 accepted show density plot on US map Sep 11 comment show density plot on US map Even I did Reverse/@data, it still does not help. The map seems to be on a different scale than the lat/long. Sep 11 comment show density plot on US map @Anon, Please. I think I changed the non-essential part, in particular, the rotate is 0 degree. What do you mean by reverse the coordinates though? :) Sep 10 comment show density plot on US map hi Anon, I tried with the above code on US map, but it does not locate the cities correctly. Please help take a look. Thank you. Sep 10 comment show density plot on US map data={CityData[{"New York City", "USA"}, "Coordinates"],CityData[{"Boston", "Massachusetts", "USA"},"Coordinates"]} outline=ColorNegate@ Graphics[CountryData["UnitedStates", {"Shape", "Equirectangular"}]]; outline = Graphics[CountryData["UnitedStates", {"Shape", "Mercator"}]];density[data_, r_] := Blur[Graphics[Disk[#, 0.1] & /@ data], r];map[outline_, density_, col_] := ImageCrop@ImageMultiply[ ImageApply[(ColorData[col]@Mean[#] &@#) /.RGBColor[r_, g_, b_] :> {r, g, b} &, density], outline];map[outline, ImageRotate[density[data, 1], 0], "SunsetColors"] Please take a look. Sep 10 comment show density plot on US map I wonder why this does not work for US map. data = DeleteCases[ Reverse[CityData[#, "Coordinates"]] & /@ CityData[{All, "UnitedStates"}], Missing["NotAvailable"]]; Show[SmoothDensityHistogram[data, .3, ColorFunction -> "SunsetColors", PlotPoints -> 150, Mesh -> 20, MeshStyle -> Opacity[.1], PlotRange -> All], Graphics[{FaceForm[], EdgeForm[Directive[White, Opacity[.7]]], CountryData["UnitedStates", "Polygon"]}]] Sep 9 awarded Nice Question Sep 9 asked show density plot on US map Sep 3 accepted density/histogram plot for date-time data Sep 3 comment density/histogram plot for date-time data Yes. Or even by 10 minutes, when I have a lot of data. Oh, just upvoted. :) Sep 3 awarded Editor