Python functions to process economic data