Fork me on GitHub

Arturo Volpe

I am a software engineer. Interested in open source, open data and devops.

Currency evolution in Paraguay

08 Feb 2016 » open-data

The Central Bank of Paraguay publish the most relevant currency quotes every month in their Cotización Referencia Mensual page.

The page has two options to get the data, a pdf per month and year, or a ajax request per month and year. Because the pdf option require manual labor to extract and process the data, I choose the ajax way.

The request is very simple, something like this:

var request = {
  url       : "https : //www.bcp.gov.py/webapps/web/cotizacion/monedas-mensual",
  form_data : {
    anho : YEAR,
    mes  : MES
  }
}

With this simple python script I can get all the quotes from

To get the updated data, execute:

python3 scrapper.js > full_data.csv

This script generates a csv with one line per quote per month and per year, so you need to convert the data to use a service la Plot.ly. For example, I use LibreOffice with the PivotTable feature to group the data by currency and year, and then plot the data:

Note that the plot don’t show all the available currencies, to show an specific currency, click the name in the right menu.