Asnarc takes a text dump of BGP data from a standard Cisco router, parses it, and gives a report of the interconnections between ASNs (upstream and downstream peers). This utility was specifically developed for looking at the dumps archived with the Route Views project.
The source can be checked out using:
svn co http://splunge.cs.uoregon.edu/public/src/asnarcor you can browse it by clicking on the underlined address in a web browser.
It is a Perl utility. Run asnarc --man for instructions.
The route views 2 project uses MRT (Zebra) format dumps. This utility can be used to load these dumps into a PostgreSQL database for complex analysis using SQL.
NOTE: This source code has been pretty well-tested, but it has a few dependencies that you must tinker with before it will do anything for you, and you must still do the thinking when it comes to how you want to structure your queries. If you are interested in using this, here are the basic steps:
The source can be checked out using:
svn co http://splunge.cs.uoregon.edu/public/src/rviewor you can browse it by clicking on the underlined address in a web browser. You only need load_update.pl and ANALYSIS.html. The other files are things that I have played with, but are not dependencies.