The sky can give us much information , it will be analyzed usig the images that are sent from a mobile device and the result will be stored in a database. This database will be accesible through a web application.
A colaborative Application to measure the aerosol particles in the air by images taken with a mobile device. Those images will be process and store into a server. The data extracted from images will be compared with the nearest AERONET Station (AEROSOL ROBOTIC NETWORK). Both, data and images, will be available to public on a web.
The demo online of SkyAerosol_API with the Daily Average of AERONET
This are the parts of the whole project:
- Backend based on SailsJS and serving AERONET data with a mongoDB
- Frontend is a web page Bootstrap + D3js + DataMaps
- (work in progress) Image processing
- (work in progress) App for Android
In order to install the backend and serve your own data. You must install the back end, based on SailsJS. This is located at GItHub repository as backend
In Debian:
$ sudo apt-get install curl
$ curl -sL https://deb.nodesource.com/setup | bash -
$ sudo apt-get install nodejs
$ sudo npm -g install sails
For other distros follow this link http://sailsjs.org/#!/getStarted
In Debian:
$ sudo apt-get install mongodb
In order to have an install granulated follow the instructions of this link http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/ In the other hand is highly recomended to run a 64bits version of mongoDB to have a good performance on import operations and run a production server
In Debian:
$ sudo npm install forever -g
$ git clone https://github.com/davidgt/SkyAerosolAnalyzer.git
$ cd SkyAerosolAnalyzer/backend
$ sudo npm install
First of all go to AERONET web page and download de Level 2.0 AOD Daily Average http://aeronet.gsfc.nasa.gov/cgi-bin/combined_data_access_new
Second unpackage the file downloaded.
$ tar -xzvf INV_Level2_Daily_V2.tar.gz
Go to the scripts directory, and there do:
$ ./skyAerosolAnalyzer_importer_mongodb.sh INV_Level2_Daily_V2/INV/DUBOV/DAILY/*
In order to execute the above script, skyAerosolAnalyzer_importer_mongodb.sh must have execute permission, to do that:
$ sudo chmod a+x skyAerosolAnalyzer_importer_mongodb.sh
$ cd backend/
$ sails lift
Or to run the server non stop use forever:
$ forever start backend/app.js
In Debian case, if you want to add a service to start and stop the server, copy the script skyAerosol_service.sh located at scripts/ directory on this repository to /etc/init.d/ on your Debian, give it executions permission (command above). And if you wish to start on boot (to get more info about this subject of booting on Debian):
$ sudo update-rc.d skyAerosol_service.sh defaults
You can retrieve data in json:
- Retrieve all records from Location called Burjassot
http://[serverIP]:[PORT]/days/find?Locations=Burjassot
- Retrieve all data from Location called Burjassot certain day
http://[serverIP]:[PORT]/days/find?Locations=Burjassot&Date(dd-mm-yyyy)=15:07:2003
- Retrieve all data from all location to certain day
http://[serverIP]:[PORT]/days/find?Date(dd-mm-yyyy)=15:07:2003
- Retrieve all data from points with elevation >= 1000 meters
http://[serverIP]:[PORT]/days?where={"elev":{">=":1000}}
- Retrieve all data from points with elevation >= 1000 meters and certain day
http://[serverIP]:[PORT]/days?where={"Date(dd-mm-yyyy)":"04:07:2003","elev":{">=":1000}}
- Retrieve all data Water(cm) variable is equal or greater than 2.5 cm
http://[serverIP]:[PORT]/days?where={"Water(cm)":{">=":2.5}}