NYC schools and SAT scores

Concept: Shade New York using high school SAT scores. Schools have a bigger effect on nearby points.

I decided to do this sketch when I stumbled upon the SAT scores and city achievement grades for NYC high schools while browsing The New York Times data sets. This project was implemented in C++ using openFrameworks.

To retrieve the geographic coordinates of each high school, I used the beautiful geocoding capabilities of the Google Maps API. A small PHP makes cURL requests using queries of the form “high_school_name,+New+York,+NY” and outputs the latitude and longitude coordinates.

Two arrays, num and den, each store one number for every output pixel. The final color of pixel i, j is calculated by num[i][j] / den[i][j]. A loop iterates through each high school and calculates its effect on every output pixel.

double sx = ofMap(data[i]->longitude, minLongitude, maxLongitude, 0, 1024);
double sy = ofMap(data[i]->latitude, minLatitude, maxLatitude, 768, 0);

for (int x = 0; x < 1024; x++) {
    for (int y = 0; y < 768; y++) {
        double d = ofDist(x, y, sx, sy);
        if (d > 0.0) {
            double t = 1.0/d;
            den[x][y] += t;
            num[x][y] += t * ofMap(data[i]->sat, 700, 2400, 0, 255);
I know you have something to say