Wednesday, February 19, 2014

get the row with matched words in .csv or .xls

So, need to do the PM data for different states?Here is how

The first line is to curl the url data

We only want the rows with   "PM2.5 - Local Conditions", which can be extracted from the database by simply executing these last two lines
xargs -n 1 curl -O -L < urls.txt

head -n 1 34-041-0006 > testdata.csv
grep "PM2.5" 34-041-0006 >> testdata.csv

Saturday, February 1, 2014

Plot the spatial grid on map in matlab

We will need the latgrid and longitude grid with equal size to that of the variable, say newT
 latlim = [37,45 ]; lonlim = [-82 ,-70];
 ax = worldmap(latlim, lonlim);
 states = shaperead('usastatehi','UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
geoshow(ax, states, 'Facecolor', [1 1 0.9]);