Posts tagged XSLT

The Stockholm International Peace Research Institute offers very detailed data about the international arms trade on their website. Using some shell scripts, sed and XSLT I converted some of it to the Google Earth KML-Format, resulting in this:

Screenshot
See it.

I thought, exploding the countries off the surface, relatively to the amount of weapons they trade was a nice metaphor. But using a linear scale, the USA and Russia would be at moon-distance (which Google Earth does not display correctly, oddly) while most of the others would stick to the ground. Thus the logarithmic scale, still impressive. The spikes over the capitals are in linear scale, though.

Another Screenshot
Still 24MiB. Coming soon.

Far more interesting, though is this other dataset, also from said site: it contains individual transactions, often with commentary, always with source and target country, the time and estimated worth. Here the arcs represent individual transactions between two countries, their height shows the size. Thanks to Earth’s cool timeline feature, you can select a timespan between 1950 (where the data starts) and 2006, as, unfortunately, the view will become enormously cluttered…

Should I succeed to shrink the file and color the arcs according to countries, it too will be released.

So, gestern wurden also endlich die Nebentätigkeiten der Bundestagsabgeordneten veröffentlicht. Und ich habe schnell mal eine Sicherheitskopie davon gemacht. Lustigerweise meldet der völlig überlastete Bundestags-Server einfach 404, wenn er ein Problem hat…

Die angeblich “behindertengerechten” und in XHTML abgefassten Websites sind natürlich von keinem XML-Parser lesbar, da die faulen Webdesigner gerne mal IDs mehrfach vergeben. Ausserdem sind die Tätigkeitslisten nicht wirklich maschinenlesbar: Ich habe den relevanten Block aus der Seite gegreppt und dann per XSLT weiterverarbeitet. In einer Mußestunde wird daraus wohl mal ein Graph, der die Abhängigkeiten schöner darstellen soll.

Fürs erste ist es also eine Tabelle mit Fehlern: Nebentätigkeiten der Abgeordneten des 16. Bundestages (Stand 05.07.07)