I have a list of latitude/longitude coordinates that I'd like to plot to a US Map (the one used in Ben Fry's Visualizing book). I followed most of the steps he used in Chapter 6, including the Albers equal-area projection. Unfortunately, what i get out of it is the image below (not as squished though). I'm not sure how to fix it....thanks so much in advance! And sorry there's so much code here, I wanted to include all of it.
Table data;
import processing.xml.*;
PImage img;
float mapX1 = 0;
float mapY1 = 0;
float mapX2 = 640;
float mapY2 =400;
float[][] coords = new float[3000][2];
float minX = 1;
float maxX = -1;
float minY = 1;
float maxY = -1;
void setup() {
size(640,400);
// Make a new instance of a PImage by loading an image file
img = loadImage("map.png");
data = new Table ("UFO-data.csv");
for (int i=1; i<data.getRowCount(); i++) {
float lat = data.getFloat(i,3);
float lon = data.getFloat(i,4);
// Albers equal-area conic projection.
// USGS uses standard parallels at 45.5°N and 29.5°N