1

I have a csv file in R that has coordinates of Kansas City, however, the values at these points aren't in any traditional longitude/latitude formatting that I am aware of. My data looks like this:

Tract            X               Y
218.01       2797574          1143595
218.01       2799346          1144802
133.02       2786207           998301
...

Is there anyway that I can generate a map from this type of data that will also eventually allow for the visualization of other variables such as population or crime rate?

migrated from stackoverflow.com Nov 25 '13 at 18:27

This question came from our site for professional and enthusiast programmers.

  • 3
    They look like projected coordinates. You'll need to know the exact projection, at which point you can convert them back to lat/lon or re-project them. The R tools for that are proj4string and spTransform. – Ari B. Friedman Nov 25 '13 at 14:21
  • Thanks. I am a bit confused as to how I would go about obtain the exact projection. The strange thing is that I can plot the X and Y points and it comes up with the Kansas City area as a display of points. – user2969279 Nov 25 '13 at 15:19
  • If the data source didn't provide it, your only real option is to try to figure out which projection it is by transforming a known point using a bunch of common projections and see how it goes. – Ari B. Friedman Nov 25 '13 at 15:47
  • Can you at least work out what the units of distance are? You know how big Kansas City is, so can you tell if these are exactly metres or feet, for example? If they seem to be nothing like that then I think you should go back to the source and get a shapefile with a proper coordinate system, eg worldmap.harvard.edu/data/geonode:KC_Census_Tracts1_y8o or some other source. – Spacedman Dec 5 '13 at 10: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.