[HOT] Tagging schools in Kenya
Andrew Buck
andrew.r.buck at gmail.com
Fri Sep 6 14:02:49 UTC 2013
I wrote a short bash script to crunch through the schools csv file and
produce a summary of the values seen in each column, as well as a count of
how many times each value occurs. I ran the script and I have attached a
text file containing the results of running it (although I stripped out the
results for the pupils per teacher column and others where the results were
worthless). Below is the script itself in case anyone wants to run it on
their own computer or modify it, but I doubt there will be any need for
this as I think it has already done about everything it can. Also, someone
should look for a commandline tool (or other tool) that can fix the all
caps names and whatnot in the file and then the script can be re-run if
interested, although it should be easy enough to see how the names changed
when we write the final csv to OSM tagging conversion rules.
#!/bin/bash
for col in `seq 2 15`
do
head -n 1 schools.csv | cut -d ';' -f $col
sed -n '2,$p' schools.csv | cut -d ';' -f $col | sort | uniq -c | sort
-rn
echo ""
done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/hot/attachments/20130906/1d73f11d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Schools_summary.txt.zip
Type: application/zip
Size: 18495 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/hot/attachments/20130906/1d73f11d/attachment.zip>
More information about the HOT
mailing list