Git Product home page Git Product logo

air's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

air's Issues

Json implementation of air.null.wind

Hi,
Thank you very much for Tokyo air and earth wind application. Can you please point me, how to run a JSON implementation of Tokyo air app. I can't able to run postgres based implementation, it saying no data found if I am running

 node server.js 8080 postgres://postgres:postgres@localhost:5432/air http://www.kankyo.metro.tokyo.jp

while initial data scrapping it gives error of no data found, the url

http://www.kankyo.metro.tokyo.jp/p160.cgi?no2===1==2====2=

scrapping is subjected is linked to 'sorry no data found'.

I am looking forward to apply, air null wind map for high resolution gfs (from weather Research Forecast (WRF) model downscaling to 1 km resolution) wind data which is used in earth.null.wind application for a urban area.

I think, clean json implementation of earth.null.wind is overweight for a urban level visualization. Please help.

local version, non-tokyo topojson, local data

Hi, i was testing the project to load a local topojson of another country, anoter points ot stations and local meteorology data.

This is what a did:

  • i truncated and inserted local stations data, stations with local geom x,y,
  • i truncated and inserted local meteo data at samples referencing station id,
  • i changed the public/data/tokyo-topo.json with my own tokyo-topo.json (same name, different geometry)

but i got this error:

nodejs server.js 8080 postgres://postgres:postgres@localhost/air
============================================================
2016-09-27T21:38:52.052Z - Starting
2016-09-27T21:38:52.226Z - info: Listening on port 8080...

module.js:485
    throw err;
          ^
SyntaxError: /opt/air/station-data.json: Unexpected number
    at Object.parse (native)
    at Object.Module._extensions..json (module.js:482:27)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/opt/air/server.js:21:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

my /opt/air/station-data.json:

[
        [1, "1", "1", -54.750000, -67.750000],
        [2, "2, "2", -54.750000, -67.750000],
        [3, "3", "3", -54.750000, -67.250000],
        [4, "4", "4",  -54.750000, -66.750000],
        [5, "5", "5", -54.750000, -66.250000],
        [6, "6", "6", -54.750000, -65.750000],
        [7, "7", "7", -54.750000, -65.250000],
        [8, "8", "8", -54.750000, -64.250000],
        [9, "9", "9", -54.250000, -68.250000],
        [10, "10", "10", -54.250000, -67.750000],
        [11, "11", "11", -54.250000, -67.250000]
]

topojson:
https://github.com/vlasvlasvlas/topojsons/blob/master/map-argentina.topojson

what could this be?

App cannot load data

Hi,

I am trying to get the air application running locally. Everything goes well, except launching the server. I am not sure what to use as . I filled in the url that is mentioned in the README where the data comes from, and I notice in the server output that it is trying to connect to http://www.kankyo.metro.tokyo.jp/p160.cgi?no2===1==2====2= but that results in a custom "page not found", and the server throws an "error: no data found". When I point my browser to the local application, it says "-1 Cannot load resource: /data/wind/current"

How should I go about this?

Thanks!

how to use inverseDistanceWeighting when result is a number not a vector

function inverseDistanceWeighting(points, k) {

    // Build a space partitioning tree to use for quick lookup of closest neighbors.
    var tree = kdTree(points, 2, 0);

    // Define special scratch objects for intermediate calculations to avoid unnecessary array allocations.
    var temp = [];
    var nearestNeighbors = [];
    for (var i = 0; i < k; i++) {
        nearestNeighbors.push({});
    }

    function clear() {
        for (var i = 0; i < k; i++) {
            var n = nearestNeighbors[i];
            n.point = null;
            n.distance2 = Infinity;
        }
    }

    // Return a function that interpolates a vector for the point (x, y) and stores it in "result".
    return function(x, y, result) {
        var weightSum = 0;

        clear();  // reset our scratch objects

// temp[0] = x;
// temp[1] = y;
temp = result;

        nearest(temp, tree, nearestNeighbors);  // calculate nearest neighbors

        // Sum up the values at each nearest neighbor, adjusted by the inverse square of the distance.
        for (var i = 0; i < k; i++) {
            var neighbor = nearestNeighbors[i];
            var sample = neighbor.point[2];
            var d2 = neighbor.distance2;
            if (d2 === 0) {  // (x, y) is exactly on top of a point.
                //result[0] = sample[0];
                //result[1] = sample[1];
            	result = sample;
                return result;
            }
            var weight = 1 / d2;
            //temp[0] = sample[0];
            //temp[1] = sample[1];
            temp = sample;
            result = addVectors(result, scaleVector(temp, weight));
            weightSum += weight;
        }

        // Divide by the total weight to calculate an average, which is our interpolated result.
        //return scaleVector(result, 1 / weightSum);
        return result/weightSum;
    }
}

I'm a student. I'm so sorry that how amateur am I. I don't know how to solve the temp and the "result = addVectors(result, scaleVector(temp, weight));" Can you tell me how to use inverseDistanceWeighting when result is a number not a vector?

error: Error: connect ECONNREFUSED

HI,very appreciate it that you develop this project, and I am trying to build a version of the Tokyo Wind Map on my machine. I have followed the steps in the readme.md, unfortunately some errors come up, could you help me to solve this problem. Here is the error.

2015-11-08T06:53:36.783Z - Starting
2015-11-08T06:53:37.397Z - info: Listening on port 8030...
2015-11-08T06:53:37.419Z - info: Preparing tables...
2015-11-08T06:53:37.423Z - info: Persisting...
2015-11-08T06:53:37.493Z - info: get: www.taiki.kankyo.metro.tokyo.jp/cgi-bin/bunpu1/p160.cgi?no2===1==2====2=
2015-11-08T06:53:37.499Z - info: get: www.taiki.kankyo.metro.tokyo.jp/cgi-bin/bunpu1/p160.cgi?no2===2==2====2=
2015-11-08T06:53:37.516Z - error: Error: connect ECONNREFUSED
at exports._errnoException (util.js:746:11)
at TCPConnectWrap.afterConnect as oncomplete
Potentially unhandled rejection [2] Error: connect ECONNREFUSED
at exports._errnoException (util.js:746:11)
at TCPConnectWrap.afterConnect as oncomplete
Thanks a lot!

nodejs version

Please let know that this works great with nodejs v6

i tried the npm install with debian wheezy + nodejs v4 and got loads of error (node-gyp rebuild, + )

Data loading

Hi Cambecc,

I am trying to setup a version of the Tokyo Wind Map on my machine. I have followed the steps in the description unfortunately I can't get it running properly. When I start the server I get the error 500 Internal Server Error.

When I look at the console, it gives an error:
"NetworkError: 500 Internal Server Error - http://localhost:8080/data/wind/current"

I started the server using this command:
node server.js 8080 postgres://postgres:12345@localhost:5432/air http://www.taiki.kankyo.metro.tokyo.jp

It does give back some errors:

2015-06-03T08:48:26.369Z - error: error: password authentication failed for user "postgres"
    at Connection.parseE (/Users/martinrisseeuw/Dropbox/Development projects/Windmap/node_modules/pg/lib/connection.js:526:11)
    at Connection.parseMessage (/Users/martinrisseeuw/Dropbox/Development projects/Windmap/node_modules/pg/lib/connection.js:371:17)
    at Socket.<anonymous> (/Users/martinrisseeuw/Dropbox/Development projects/Windmap/node_modules/pg/lib/connection.js:86:20)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:764:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:426:10)
    at emitReadable (_stream_readable.js:422:5)
    at readableAddChunk (_stream_readable.js:165:9)
    at Socket.Readable.push (_stream_readable.js:127:10)
2015-06-03T08:48:26.370Z - info: 127.0.0.1 - - GET /data/wind/current HTTP/1.1 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0" http://localhost:8080/ - gzip, deflate

I hope you can help me. I would like to use your project as a starting point for displaying flow and water quality.

Best,

Martin

Different Values

Hi Mr Cameron,

When selecting the overlay wind velocity, there is a difference in both values?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.