Mauricio "Pachá" Vargas Sepúlveda

About me | Research | Open source | Datasets | Books | R and Shiny training

About me

I am an MA student in Political Science at the University of Toronto. My research interests include international relations, public policy and political economy, with a focus on the politics of trade, international institutions, and trade agreements. My research is motivated by the central question: Which are the consequences of decomposed trade policy effects?

I am particularly interested in changes in production and consumption prices, internal and external multi-lateral resistances and how these changes create trade-induced changes in employment and other measures of economic welfare. Such changes can be understood as costs that justify an incumbent government to justify opposition to trade based on electoral calculations, even if it is economically inefficient, and protect organized or unorganized industries.

These interest areas are directly linked to the Sustainable Development Goals (SDGs) of Industry, Innovation and Infrastructure and Peace, Justice and Strong Institutions.

I have a Master in Statistics from the Catholic University and an Engineering degree from the University of Chile. I can provide my CV (academic/profesional) upon request.

You can reach me at hello+spam@pacha.dev or mv.sepulveda+spam@mail.utoronto.ca (please remove the +spam or your messages will go to the spam folder).

Research

Research Interests

International Political Economy: Politics of Trade, Market Access, Tariff and Non-Tariff Measures.

Public Policy: Public-Private Trade Programs, Exports Diversification and Sustainability, Labour Reconversion.

Research Methods: Quantitative Methods, General Equilibrium Estimation, Generalized Linear Models.

Published Articles

Wölwer, A.L., Burgard, J.P., Kunst, J., and Vargas Sepúlveda, M. "Gravity: Estimation Methods for Gravity Models in R." Journal of Open Source Software 3, no. 31 (November 19, 2018): 1038. https://doi.org/10.21105/joss.01038.

Vargas Sepúlveda, M. "Economiccomplexity: Computational Methods for Economic Complexity." Journal of Open Source Software 5, no. 46 (February 19, 2020): 1866. https://doi.org/10.21105/joss.01866.

Pre-Prints

Vargas Sepúlveda, M. "Economic Effects of Chile FTAs and an Eventual CTPP Accession." arXiv, September 28, 2022. https://doi.org/10.48550/arXiv.2209.14748.

Thesis

Master in Political Science

Vargas Sepúlveda, M. "Disaggregated Economic Effects of FTAs." University of Toronto, 2023 (Expected).

Master in Statistics

Vargas Sepúlveda, M. "Gravity Modelling Into R: Strengthening Analytical Capacity of ESCAP Member States." UN ESCAP and P. U. Católica de Chile, 2021.

Open source

Selected R packages

CRAN

I maintain the WebTechnologies view and the official mirror for Chile.

LaTeX

I created the R package varsityblues, which allows you to write assignments, presentations and thesis in RStudio by following UofT formatting. This allows the user to avoid copy-pasting tables or plots from R outputs into Word/LaTeX documents. Instead, it allows the user to work with notebooks that they can export to PDF, and it configures the LaTeX setup automatically.

This package is based on the LaTeX style files that were sent to me by the late Professor Kim C. Border.

Cloud computing

I created images for RStudio Server and RStudio Server + Kubernetes, which allows you to create virtual machines on DigitalOcean and to skip the setup time to install the Tidyverse and other packages. With these images, it takes around 30 seconds to have a ready to go setup for Data Science. This combines well with analogsea as I explained in my blog.

In simple terms, this allows you to rent a supercomputer, for example, with 48 cores and 200 GB in RAM, for a reasonable price and minimal waiting.

Datasets

Open Trade Statistics

Since 2017 I've maintained Open Trade Statistics, a project created with the intention to lower the barrier to working with international economic trade data. It includes a public API, a dashboard, and an R package for data retrieval. The project started when I was affected by the fact that many Latin American Universities have limited or no access to the United Nations Commodity Trade Statistics Database (UN COMTRADE).

OTS provides a curated database derived from UN COMTRADE. I can provide a full SQL dump of the database or share subsets of the database for the period 2002-2020 aggregated by countries or by products up to a detail of six digits in the Harmonised System revision 2012.

After contacting UN COMTRADE, and suggesting to them my idea of sharing trade data but keeping commercial purposes out of the scope of the project, I got an authorization to share curated versions of their datasets.

SQL Databases for students and educators

Check SQL Databases for students and educators if you need access to PostgreSQL, MySQL and SQL Server databases (in strictly descending order of preference!).

Publicly accessible databases often impose query limits or require registration. Even when I maintain public and limit-free APIs, I never wanted to host a public database because the connection string can be problematic for users.

I’ve hosted different light/medium size databases by using PostgreSQL and MariaDB (a modern fork of MySQL) backends. I tend to prefer PostgreSQL because it is easier to configure on the client and server side, without strange tricks (see the Problems with MySQL/Maria and SQL Server section).

Why these database backends? I think there are an abundance of small edge cases when moving between DB back ends and so testing mnany with live databases is quite valuable. With this resource you can benchmark speed, compression, and DDL types.

Books

Vargas Sepúlveda, M. Solutions Manual for An Advanced Guide to Trade Policy Analysis in R. 2nd ed. Bangkok: UN ESCAP, 2022. https://r.tiid.org/R_structural_gravity/.

Burchell, J. and Vargas Sepúlveda, M. The Hitchhiker's Guide to Plotnine. 1st ed. Victoria: Leanpub, 2019. https://leanpub.com/ggplot-guide.

Quiroga, R. Sandoval, G., Vargas Sepúlveda, M. R para Ciencia de Datos: Soluciones de los ejercicios. 1st ed. Santiago: Self-Published, 2019. https://r4ds-soluciones.netlify.app/.

Quiroga, R., et al. R Para Ciencia de Datos (Translation). 1st ed. Santiago: Self-Published, 2019. https://es.r4ds.hadley.nz/.

Burchell, J. and Vargas Sepúlveda, M. The Hitchhiker's Guide to Ggplot2. 1st ed. Victoria: Leanpub, 2016. https://leanpub.com/ggplot-guide.

R and Shiny training

I offer short courses for groups and individual personalized sessions at Buy Me a Coffee. I am a certified Tidyverse and Shiny instructor by RStudio and a Software Carpentry Instructor with a Carpentries certification.

Valid HTML 4.01 Transitional