Hands on analysing Ecuador fiscal data with Alphacast

alphacast_logo_1.png

Hands on analysing Ecuador fiscal data with Alphacast

By Milagros Ricchini (mricchini@alphacast.io)


Read more Alphacast Highlights here


In this hands-on guide, we will show you how to use Alphacast Pipelines to automatize Latin American economies' analysis. In this case, we are going to make a graph of Ecuador's fiscal result and calculate its primary expenditure, which is not a variable of the dataset.

First, we look for the dataset which contains the variables we need: Fiscal - Ecuador - BCE - Non Financial Public Sector Operations.

The data excerpt in the overview of the dataset shows it contains multiple entities, this is useful information for the next steps in this guide, where we are going to transform the data using pipelines and create the graphs we need.

So, the next step is to transform de data by clicking on the right top button "Transform Data" image.png

Now it's time for action!

As we saw the dataset has multiple entities, first we are going to filter the ones we are interested in, which are overall result, primary result, total expenditures and total revenue included into the entity "Totals":

image.png

image.png

When we click "Save & Preview Data" we can see the dataset we have now:

image.png

As the entities "Fist Level" and "Second Level" don't add information we are going to take them out by regrouping those entities, in this way the dataset will get easier to transform. Therefore, we add a new step, select "Regroup Entities" and proceed.

image.png

image.png

We only leave the entities we are interested in and in Grouping Function in this case it doesn't change anything because there will still be only one row of information for each date, we leave the one for default:

image.png

Once we get this clean dataset we can unstack it, so we have the variables as columns and make the variable calculations we need:

We look fot this step when we add a new one image.png

And then we unstack the entity "Totals"

image.png

Now we have gotten a wide dataset with the variables we are interested in as columns, and we can calculate the primary expenditure as I said at the beginning by adding a new step and clicking image.png

The difference between the primary and the overall result is the interests, so we are going to subtract those interests from the total expenditure and get the primary expenditure:

image.png

Now we have all the variables we wanted and can adjust them seasonally to then create the charts we wanted:

image.png

image.png

And then we create the charts with the variables we choose and can customize them as we desire:

You can check the full pipeline here, clone it, add steps and transformations and create and customize charts as you like!

image.png

In this case, Ecuador shows an important fiscal effort, mostly because total income has grown at a faster pace than primary expenditure, achieving a financial surplus in the last quarters of 2022.

Related insights

  • Read more...

    How to convert a series to the official USD or Blue Chip Swap?

    The pipeline engine "Apply Transform" step incorporates a new transformation that allows changing the source unit: Convert to dollar official or to Blue Chip Swap (for Argentina only).

    The pipeline is separated into Two steps

    1. Select ("Fetch") the dataset and its columns
    2. "Apply transform"
  • Read more...

    How is a Time Series seasonally adjusted?

    Removing seasonality from time series is always complicated and laborious. The standard deseasonalization method is X-13ARIMA-SEATS or some other version of the methodologies maintained by the United States Census Bureau. Denationalizing usually includes using some application such as Eviews, Demetra or Stata or Python, combining it with the files that are downloaded

  • Read more...

    How to merge the content of two datasets?

    Surely in your usual work with data, you needed to join several data sources and if your calculation tool is Excel you may solve it with some combination of the VLOOKUP, HLOOKUP, and/or MATCH formulas. Excel is a great solution in many cases, but it can be difficult in some scenarios.

  • Read more...

    How to calculate a monthly end-of-period series?

    Pipelines are an easy way to apply transformations to datasets that update automatically every time data is updated.

    Suppose we have a daily data series for which we need only the last value of each month. It is possible to do that in Excel. For example, an auxiliary column is added that