NWS radar images should stop using Flash

weather-mapTo be more accessible, I don’t think it would be that difficult to replace their existing system with one that just uses layered animated gifs with transparency. Even if you had to store a different gif for the different speeds that the radar data can playback, it at least allows for a short period of static file caching and allows for the full website experience on a mobile device. Don’t want to pre-generate the gifs of the radar data? OK. Instead use javascript to generate client-side gifs.

NWS radar image from Portland, ME.

 

Cool Shell One-Liner of the Day

awk -F, '{print $1}' CSV | sort | uniq -c | grep -vw 1 | tee /dev/tty | wc -l

UPDATE: I went back and saw this post and thought to myself, “Self, why didn’t you annotate this garbage, you cheeky bastard?” OK, so the first part is pretty clear: get the first (or whichever) column you want from a simple (unquoted) csv file, and then count dupes. The grep is where we remove non-dupes and should probably be grep -Ev '^ *1 ' to avoid matching any of the csv data. Now here’s the magic. The pipe to tee /dev/tty echoes everything to stdout, but one copy of the output can go through more pipes before being displayed. So the wc -l is actually counting the number of entries which have duplicates (not the total number of all duplicates!), and displays that number at the bottom.

Here’s the tail end of what I get from this on a sample csv: