Skip to content

Instantly share code, notes, and snippets.



  • Oakland
View GitHub Profile
jsvine /
Created Nov 18, 2015
How to download SIPRI arms transfer data as a CSV file instead of a rich-text file.

The Stockholm International Peace Research Institute's Arms Transfers Database provides a tool to download the data. By default, that output is an .rtf rich-text file — not so easy to analyze with your favorite spreadsheet or statistics software. Luckily, getting a CSV of the data isn't very difficult. Here's how.

To get all transfers for 2014, by seller, run this command in your terminal:

curl --compressed \
    --data 'low_year=2014' \
    --data 'high_year=2014' \
    --data 'seller_country_code=' \
    --data 'buyer_country_code=' \
You can’t perform that action at this time.