Nabin K. Malakar, Ph.D.

NASA JPL
I am a computational physicist working on societal applications of machine-learning techniques.

Research Links

My research interests span multi-disciplinary fields involving Societal applications of Machine Learning, Decision-theoretic approach to automated Experimental Design, Bayesian statistical data analysis and signal processing.

Linkedin


Interested about the picture? Autonomous experimental design allows us to answer the question of where to take the measurements. More about it is here...

Hobbies

I addition to the research, I also like to hike, bike, read and play with water color.

Thanks for the visit. Please feel free to visit my Weblogs.

Welcome to nabinkm.com. Please visit again.

Showing posts with label trend. Show all posts
Showing posts with label trend. Show all posts

Monday, June 30, 2014

Monitoring in-situ PM2.5 in NYC metro area using #matlab #trendy

Matlab's Trendy feature can be used to monitor and collect hourly air quality station data directly from the source url. The data can be feed into the trendy app using the urlfilter and updatetrend commands.

Here is the basic code that gets the job done for the CCNY location. If you are interested to get multiple data, just append it to the update trend array:
% Get the data from CCNY, update the trendy
url = 'http://www.dec.ny.gov/airmon/stationStatus.php?stationNo=73';
count = urlfilter(url, 'PM25C'); % reading
PMccny = count; % PM at CCNY
updatetrend([PMccny]);
The Trendy then can be used to plot the gathered data. I had to let it gather data for few days before I could plot some nice trends. You can already see the diurnal variation in the data below.
PM2.5 trend in NYC. If the image is not available, follow the link below.

http://www.mathworks.com/matlabcentral/trendy/plots/1349
The plots can be made with the following code (the time and data will be different for your code):
% PM2.5 hourly measurements in CCNY
%   time vector is: time2322
%   data vector is: data2322
plot(time2322,data2322, 'o-');
datetick
hleg = legend('PM2.5(ug/m3)', 'Location', 'SouthWest');
set(hleg, 'FontSize', 8);
title('Air Quality at CCNY station');
I can also set up an email alert if the PM2.5 reading gets higher than some threshold, say 35ugm/m3. Now you can think about the useful applications of such tools!!

Update: well, it has been deprecated! and replaced with "trendy"