Convert Latitude and Longitude from a Data sheet to points on canvas

Hi, I’m having an issue in my beginning coding class. I want to take the latitude and longitude for cave locations in Missouri and put them over an image of the state where they are. I have an excel sheet with the latitude and longitude, but I don’t know how to convert that into points for my 280x325 canvas.

It’s been a while since I’ve been in a math class and my coding teacher hasn’t gotten back to me on whether I can visualize this data like this. Is there a way to convert the points to show where they are in relation to each other? Is there some formula I can do either in the excel sheet or in processing to make this conversion so I can map these points?

Thank you!

Please check unfoldingmap library. It should allow you to do this. Start by running the simple demos. Make sure you are using the P2D renderer.

If you want to transform the value manually, you can do a quick google search and you will get the algorithm:

The first link shows the code in javascript.

Kf

The Unfolding Map unfortunately isn’t compatible with the version of Processing I have, so I can’t load any of the examples and watching the videos helped me understand the conversion, but the version of Processing I have also can’t read the function command so I don’t know how to translate the algorithm into the code.

Is there a way to make the Unfolding map compatible with what I have?

You could try to download an older version of processing

1 Like

Actually, you may change the renderer in Processing 3 :slight_smile:
Switch to FX2D instead and it will work!