I have a list of lat/long coordinates. I'd like to plot them on a US state (say New York). These coordinates include locations outside New York, but I'd like to get a map of just New York with these points shown.

I used an answer from How do I plot coordinates (latitude and longitude pairs) on a geographic map? that allows me to plot these on the US. It limits the US by using

 coords = CountryData["UnitedStates", "Coordinates"];

I tried using

coordsNY = 
  Entity["AdministrativeDivision", {"NewYork", "UnitedStates"}][

But this seems to only give me one point - perhaps the centroid of the state?

Clearly I don't really understand the answer that I was trying to copy. Perhaps there's another way to plot points on a specific US state.

  • $\begingroup$ try nypolygon= Entity["AdministrativeDivision", {"NewYork", "UnitedStates"}][ "Polygon"]; Geographics@nypolygon? $\endgroup$
    – kglr
    May 6 at 12:37
  • $\begingroup$ Take a look at GeoGraphics, e.g. this example $\endgroup$
    – Lukas Lang
    May 6 at 12:51
  • $\begingroup$ Thanks kglr and Lukas I'm starting to get the hang of it. $\endgroup$ May 6 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.