Skip to content

Instantly share code, notes, and snippets.

@holgerd77
holgerd77 / get_farmsubsidy_data.sh
Last active August 29, 2015 14:01 — forked from stefanw/get_farmsubsidy_data.sh
Fixes for Farmsubsidy data files
# Fixes for Farmsubsidy data
# Order of countries is taken form the website:
# http://farmsubsidy.openspending.org/countries/
set -x verbose
#wget -O AT.zip "http://data.farmsubsidy.org/web/at20130501.zip"
#unzip -d AT AT.zip
# Generic fixes/helpers
# HTML encoding fix
sed 's/\&ouml;/ö/g; s/&Ouml;/Ö/g; s/&uuml;/ü/g; s/&Uuml;/Ü/g; s/&auml;/ä/g; s/&Auml;/Ä/g; s/&szlig;/ß/g; s/&quot;/"/g; s/&lt;/</g; s/&gt;/>/g; s/&amp;/\&/g; s/&#[0-9]*;//g' [COUNTRY_CODE]/recipient_bad.txt > [COUNTRY_CODE]/recipient.txt