| 1 |
15 |
art |
# forgottenislanderbot -- minimum instructions
|
| 2 |
|
|
# not intended to be used as a shell script
|
| 3 |
|
|
|
| 4 |
|
|
# download civic addresses from http://www.gov.pe.ca/civicaddress/
|
| 5 |
16 |
art |
wget -O "queens.tsv" "http://www.gov.pe.ca/civicaddress/download/dodownload.php3?county=QUN&street_nm=&downloadformat=tab&downloadfields%5B%5D=street_no&downloadfields%5B%5D=street_nm&downloadfields%5B%5D=comm_nm&downloadfields%5B%5D=apt_no&downloadfields%5B%5D=county&downloadfields%5B%5D=latitude&downloadfields%5B%5D=longitude&downloadfields%5B%5D=police&downloadfields%5B%5D=fire&downloadfields%5B%5D=ems"
|
| 6 |
|
|
wget -O "prince.tsv" "http://www.gov.pe.ca/civicaddress/download/dodownload.php3?county=PRN&street_nm=&downloadformat=tab&downloadfields%5B%5D=street_no&downloadfields%5B%5D=street_nm&downloadfields%5B%5D=comm_nm&downloadfields%5B%5D=apt_no&downloadfields%5B%5D=county&downloadfields%5B%5D=latitude&downloadfields%5B%5D=longitude&downloadfields%5B%5D=police&downloadfields%5B%5D=fire&downloadfields%5B%5D=ems"
|
| 7 |
|
|
wget -O "kings.tsv" "http://www.gov.pe.ca/civicaddress/download/dodownload.php3?county=KNS&street_nm=&downloadformat=tab&downloadfields%5B%5D=street_no&downloadfields%5B%5D=street_nm&downloadfields%5B%5D=comm_nm&downloadfields%5B%5D=apt_no&downloadfields%5B%5D=county&downloadfields%5B%5D=latitude&downloadfields%5B%5D=longitude&downloadfields%5B%5D=police&downloadfields%5B%5D=fire&downloadfields%5B%5D=ems"
|
| 8 |
15 |
art |
|
| 9 |
|
|
# make sqlite database from TSV files
|
| 10 |
|
|
python fib-cadb2sql.py database.sqlite queens.tsv kings.tsv prince.tsv
|
| 11 |
|
|
|
| 12 |
|
|
# run the bot. This will take 19 to 28 hours.
|
| 13 |
|
|
# If they've put in a robots.txt, you may be asked to override it; that is your choice.
|
| 14 |
|
|
# This will get every address on PEI.
|
| 15 |
|
|
# It will wait one second (the second '1') between single-threaded requests.
|
| 16 |
|
|
python fib-crawlbot.py database.sqlite 1 1 n
|
| 17 |
|
|
|
| 18 |
|
|
# I assume this won't hurt
|
| 19 |
|
|
sync
|
| 20 |
|
|
|
| 21 |
|
|
# run it again -- this might get any addresses which failed with errors
|
| 22 |
|
|
# the first time. Known addresses won't be checked again.
|
| 23 |
|
|
python fib-crawlbot.py database.sqlite 1 1 n
|
| 24 |
|
|
|
| 25 |
|
|
# find the totals -- the NODSL row is the interesting one...
|
| 26 |
18 |
art |
python fib.py --stats
|
| 27 |
|
|
# (new version) if the database has a different name than 'database.sqlite', append --db=file.sqlite
|
| 28 |
|
|
# older, deprecated version:
|
| 29 |
15 |
art |
python fib-dbutil.py database.sqlite --stats yyyy 1 n
|
| 30 |
|
|
|
| 31 |
|
|
# make a few variations of the KML for Google Earth
|
| 32 |
18 |
art |
python fib.py --kml # default dslmask=nyyy, default sparsity=40
|
| 33 |
|
|
# use the alternate icons
|
| 34 |
|
|
python fib.py --kml --dslmask=nynn --sparsity=1 --icontheme="icons/blob-*.png" --iconsize=0.5 --iconhotspot="16,16" --no-highlight
|
| 35 |
|
|
|
| 36 |
|
|
# deprecated older version:
|
| 37 |
15 |
art |
python fib-dbutil.py database.sqlite --kml nyyy 100 n map-all-sparse.kml
|
| 38 |
|
|
python fib-dbutil.py database.sqlite --kml nyyy 40 n map-all-dense.kml
|
| 39 |
|
|
python fib-dbutil.py database.sqlite --kml nynn 100 n map-nodsl-sparse.kml
|
| 40 |
|
|
python fib-dbutil.py database.sqlite --kml nynn 40 n map-nodsl-dense.kml
|
| 41 |
17 |
art |
# with current Google Maps icons:
|
| 42 |
|
|
# EMPTY: white, NODSL: yellow, BASIC: cyan, ULTRA: green
|
| 43 |
15 |
art |
|
| 44 |
|
|
# please email me a copy of database.sqlite at this point
|