Pour la version en française, cliquer ici.
I am a PhD student in Political Science at the University of Toronto, specializing in International Relations and Public Policy. My research primarily focuses on the political dynamics of trade agreements and sanctions. Due to this interest, I am a Fellow at the Munk School of Global Affairs and Public Policy.
My academic background includes a Master of Arts in Political Science from the University of Toronto, a Master of Science in Statistics from the Catholic University of Chile, and an Engineering degree from the University of Chile. Should you need it, I can provide my academic and professional CV upon request. For any queries or further information, please contact me at .
I am convinced that a comprehensive understanding of economic and financial sanctions between countries can be achieved by integrating ideas, interests, institutions, and structures. I aim at studying this combining Natural Language Processing (NLP) and Econometrics to analyze and quantify the economic repercussions of sanctions. This is detailed in the Research section.
My research interest has led me to develop advanced R, Python, and C++ skills. My GitHub profile showcases my open-source projects, predominantly focused on gravity estimation, data wrangling in R, and data visualization using Shiny. More details can be found in the Open Source section.
Additionally, I maintain a blog ( pacha.dev/blog), where I post various notes and tutorials. Some highlights include "Creating LaTeX Figures with Inkscape", "A Crash Course on PostgreSQL for R Users", and "A Step-by-Step Guide to Write an R Package that Uses C++ Code (Ubuntu)". These posts reflect my ongoing commitment to both learning and sharing knowledge in the field.
Trivia: My blog post Comparing SQLite, DuckDB and Arrow with UN Trade Data made it to the top ten on Hacker News.
For the english version, click here.
Je suis doctorant en sciences politiques à l'Université de Toronto, spécialisé dans les Relations Internationales et les Politiques Publiques. Mes recherches portent principalement sur la dynamique politique des accords commerciaux et des sanctions. En raison de cet intérêt, je suis boursier à la École Munk des Affaires Mondiales et des Politiques Publiques.
Je suis titulaire d'un master en sciences politiques de l'Université de Toronto, d'un master en statistiques de l'Université Catholique du Chili et d'un diplôme d'ingénieur de l'Université du Chili. Si vous le souhaitez, je peux vous fournir mon CV académique et professionnel sur demande. Pour toute question ou information complémentaire, veuillez me contacter à .
Je suis convaincu qu'une compréhension globale des sanctions économiques et financières entre les pays peut être obtenue en intégrant les idées, les intérêts, les institutions et les structures. Je cherche à étudier cela en combinant le Traitement du Langage Naturel (NLP) et l'Économétrie pour analyser et quantifier les répercussions économiques des sanctions. Ceci est détaillé dans la section Recherche.
Mon intérêt pour la recherche m'a amené à développer des compétences avancées en R, Python et C++. Mon profil GitHub présente mes projets open-source, principalement axés sur l'estimation de les modèles de gravité, le traitement des données en R et la visualisation des données à l'aide de Shiny. Pour plus de détails, voir la section Open-Source.
En outre, je tiens un blog ( pacha.dev/blog), où je publie diverses notes et tutoriels. Parmi les principaux, citons "Creating LaTeX Figures with Inkscape", "A Crash Course on PostgreSQL for R Users", et "A Step-by-Step Guide to Write an R Package that Uses C++ Code (Ubuntu)". Ces articles reflètent mon engagement permanent à apprendre et à partager mes connaissances dans le domaine.
Trivia : Mon article de blog Comparing SQLite, DuckDB and Arrow with UN Trade Data est entré dans le top 10 de Hacker News.
International Relations: Trade Agreements, Sanctions, Tariff and Non-Tariff Measures.
Canadian Politics: Advocacy Coalitions, Federal Hubs, CAN-USA-MEX Transnational Policymaking.
Public Policy: Public-Private Trade Programs, Exports Diversification and Sustainability, Labour Reconversion.
Research Methods: Generalized Linear Models, Structural Gravity Model, General Equilibrium Estimation.
Vargas Sepúlveda, Mauricio. 2020. "Economiccomplexity: Computational Methods for Economic Complexity." Journal of Open Source Software 5 (46): 1866. https://doi.org/10.21105/joss.01866.
Cited by
Ondoš, Slavomír, Žofia Sinčáková, and Hudec Oto. 2024. "The Re-Emergence of Left-behind Regions: The End of Spatial Equity and the Rise of Dynamic Movements in Slovakia, 1990-2020." Regional Statistics 14 (02): 258-82. https://www.ceeol.com/search/article-detail?id=1239396.
Guerzoni, Marco, Massimiliano Nuccio, and Federico Tamagni. "Pre- entry knowledge base complexity and post-entry growth: evidence from Italian firms." Industrial and Corporate Change 33, no. 1 (2024): 126-151. https://doi.org/10.1093/icc/dtad037.
Vallim, Alberto, and Leonardo Monasterio. 2023. "Crescimento econômic regional e complexidade: o papel das microempresas e dos MEI." Revista Brasileira de Estudos Regionais e Urbanos 17 (1): 131-54. https://doi.org/10.54766/rberu.v17i1.992.
Sankot, Ondřej, Tereza De Castro, Jana Vlčková, and Cristina Procházková Ilinitchi. 2023. "Mapping of Capabilities and Export Opportunities of Czechia." Prague Economic Papers 32 (2): 159-83. https://doi.org/10.18267/j.pep.829.
Guerzoni, Marco, Massimiliano Nuccio, and Federico Tamagni. 2022. "Discovering Pre-Entry Knowledge Complexity with Patent Topic Modeling and the Post-Entry Growth of Italian Firms." LEM Papers Series. Laboratory of Economics and Management (LEM), Sant’Anna School of Advanced Studies, Pisa, Italy. https://econpapers.repec.org/paper/ssalemwps/2022_2f25.htm.
Ondoš, Slavomír, Žofia Sinčáková, and Oto Hudec. 2022. "Advancement and New Spatial Patterns of the Creative Sector in the Old Industrial Structure." In The Creative Class Revisited, 241–67. World Scientific. https://doi.org/10.1142/9789811267659_0009.
Plessis, Michael du, and Wouter Bam. 2022. "Iops: A Python Package for the Input-Output Product Space Methodology." In 2022 IEEE 28th International Conference on Engineering, Technology and Innovation (ICE/ITMC) & 31st International Association For Management of Technology (IAMOT) Joint Conference, 1–8. https://doi.org/10.1109/ICE/ITMC-IAMOT55089.2022.10033299.
Meier, M. 2020. "Green Growth in the Technology Space – Regional Diversification Pathways in Europe." Master Thesis. https://studenttheses.uu.nl/handle/20.500.12932/38037.
Pérez-Hernández, Carla Carolina, Blanca Cecilia Salazar-Hernández, Jessica Mendoza-Moheno, Erika Cruz-Coria, and Martín Aubert Hernández-Calzada. 2021. "Mapping the Green Product-Space in Mexico: From Capabilities to Green Opportunities." Sustainability 13 (2): 945. https://doi.org/10.3390/su13020945.
Wölwer, Anna-Lena, Jan Pablo Burgard, Joshua Kunst, and Mauricio Vargas Sepúlveda. 2018. "Gravity: Estimation Methods for Gravity Models in R." Journal of Open Source Software 3 (31): 1038. https://doi.org/10.21105/joss.01038.
Cited by
Lenormand, Maxime. "TDLM: An R package for a systematic comparison of trip distribution laws and models." Journal of Open Source Software 8, no. 88 (2023): 5434. https://doi.org/10.21105/joss.05434.
Oshan, Taylor. "12. Spatial interaction modeling." Handbook of spatial analysis in the social sciences (2022): 208. https://www.e-elgar.com/shop/gbp/handbook-of-spatial-analysis-in-the-social-sciences-9781789903935.html.
Moravec, Petr. 2022. "Impacts of Brexit Referendum on European Banks: Evidence from Country-by-Country Reporting." Univerzita Karlova, Fakulta sociálních věd. https://dspace.cuni.cz/handle/20.500.11956/174029.
Oshan, Taylor M. 2022. "Spatial Interaction Modeling." OSF Preprints. https://doi.org/10.31219/osf.io/m3ah8.
Herman, Peter. 2021. "Gegravity: General Equilibrium Gravity Modeling in Python." SSRN Scholarly Paper. Rochester, NY. https://doi.org/10.2139/ssrn.3832208.
Ha, Le. 2021. "Impacts of COVID-19 Pandemic on International Trade in Goods of OECD Countries." VNU Journal of Economics and Business 1 (2). https://js.vnu.edu.vn/EAB/article/view/4574.
Porto, Massimiliano. 2020. "The Gravity Model of Trade." In Using R for Trade Policy Analysis: R Codes for the UNCTAD and WTO Practical Guide, edited by Massimiliano Porto, 65–81. SpringerBriefs in Economics. Cham: Springer International Publishing. https://doi.org/10.1007/978-3-030-34529-7_4.
Vargas Sepúlveda, Mauricio. 2024. "Replicating The Log of Gravity." arXiv. https://doi.org/10.48550/arXiv.2409.09066.
Vargas Sepúlveda, Mauricio. 2024. "Welding R and C++: A Tale of Two Programming Languages." arXiv. https://doi.org/10.48550/arXiv.2409.00568.
Vargas Sepúlveda, Mauricio. 2024. "Kendallknight: Efficient Implementation of Kendall's Correlation Coefficient Computation." arXiv. https://doi.org/10.48550/arXiv.2408.09618.
Vargas Sepúlveda, Mauricio, and Jonathan Schneider Malamud. 2024. "cpp11armadillo: An R Package to Use the Armadillo C++ Library." arXiv. https://doi.org/10.48550/arXiv.2408.11074.
Vargas Sepúlveda, Mauricio. 2022. "Economic Effects of Chile FTAs and an Eventual CTPP Accession." arXiv. https://doi.org/10.48550/arXiv.2209.14748.
Vargas Sepúlveda, Mauricio. "NAFTA is the Worst Trade Deal in the History of Trade Deals, Maybe Ever." University of Toronto, 2023.
Vargas Sepúlveda, Mauricio. "Gravity Modelling Into R: Strengthening Analytical Capacity of ESCAP Member States." UN ESCAP and P. U. Católica de Chile, 2021.
Since the end of World War II, sanctions have increased in number, but their effectiveness has decreased (The Economist 2021), which raises the question whether policy makers implement sanctions to satisfy domestic coalitions or achieve other goals. The economic consequences of sanctions can be explored at the sectoral level, distinguishing categories such as agriculture, energy, manufacturing, mining, and services. The current political and economic order justifies the need to account for the interdependence between different sectors of a national economy in global trade (Sbragia 2010; Vargas Sepúlveda 2020).
I proposed the thesis project "Trade Sanctions and Rule-Making," where I shall answer the question "Who wins and who loses with sanctions?" I will focus on trade sanctions between political allies and the variation of effects between industries. This will uncover general patterns about how these mechanisms work, and to explain why and when policymakers deviate from World Trade Organization practices that reduce global trade uncertainty. The project is relevant due to the spiking complexity of global sanctions (Morgan, Syropoulos, and Yotov 2022; Coates 2022; Ossa 2014) and the rise of protectionism (Walter 2021; Fajgelbaum et al. 2020).
I intend to explore how Generalized Linear Models, in particular the Structural Gravity Model (Burgard et al. 2018), can be used to computationally simulate the impact of political decisions, such as a sanction being implemented. The model shows how the resulting changes in one sector in one country causes a chain reaction with consequences in GDP and other measures of economic welfare for third party countries (Vargas Sepúlveda 2021; Larch et al. 2016).
I aim to corroborate and expand existing sanctions databases (Felbermayr et al. 2020) and commodities trade data (Borchert et al. 2021). I intend to produce accurate sectoral trade databases for most of or all UN countries. One core feature of my work will be correcting mismatches in the data between importers and exporters, and cover as many gaps as possible by using administrative data from the UN and state-of-the-art linear models for imputation.
A comprehensive depiction at the sectoral level will enable me to study specific sanctions’ impact and explore how policy toolkits affect different actors, ideas, and institutions (Lasswell 1970), and to balance theory and information-gathering (Simeon 1976). My contribution will be to integrate our political and economic understanding of sanctions, by creating a methodology to estimate the impact of sanctions that policy makers could use to evaluate the effectiveness, success, and impact of their agendas.
Borchert, Ingo, Mario Larch, Serge Shikher, and Yoto V. Yotov. 2021. "The International Trade and Production Database for Estimation (ITPD-E)." International Economics (Paris) 166: 140–66. https://doi.org/10.1016/j.inteco.2020.08.001.
Burgard, Jan Pablo, Joshua Kunst, Mauricio Vargas Sepúlveda, and Anna Lenna Woelwer. 2018. "Gravity: Estimation Methods for Gravity Models in R." Journal of Open Source Software 31 (3): 1038. https://doi.org/10.21105/joss.01038.
Coates, Benjamin. 2022. "A Century of Sanctions." Origins. https://origins.osu.edu/article/economic-sanctions-history-trump-global?language_content_entity=en.
Fajgelbaum, Pablo D., Pinelopi K. Goldberg, Patrick J. Kennedy, and Amit K. Khandelwal. 2020. "The Return to Protectionism." The Quarterly Journal of Economics 135 (1): 1–55. https://doi.org/10.1093/qje/qjz036.
Felbermayr, Gabriel, Aleksandra Kirilakha, Constantinos Syropoulos, Erdal Yalcin, and Yoto V. Yotov. 2020. "The Global Sanctions Data Base." European Economic Review 129: 103561–61. https://doi.org/10.1016/j.euroecorev.2020.103561.
Larch, Mario, José-Antonio Monteiro, Roberta Piermartini, and Yoto V Yotov. 2016. An Advanced Guide to Trade Policy Analysis: The Structural Gravity Model. World Trade Organization Geneva. https://vi.unctad.org/tpa/web/vol2/vol2home.html.
Lasswell, Harold D. 1970. "The Emerging Conception of the Policy Sciences." Policy Sciences 1 (1): 3–14. https://doi.org/10.1007/BF00145189.
Morgan, T. Clifton, Constantinos Syropoulos, and Yoto Yotov. 2022. "Economic Sanctions: Evolution, Consequences, and Challenges." School of Economics Working Paper Series, November. https://ideas.repec.org//p/ris/drxlwp/2022_012.html.
Ossa, Ralph. 2014. "Trade Wars and Trade Talks with Data." American Economic Review 104 (12): 4104–46. https://doi.org/10.1257/aer.104.12.4104.
Sbragia, Alberta. 2010. "The EU, the US, and Trade Policy: Competitive Interdependence in the Management of Globalization." Journal of European Public Policy 17 (3): 368–82. https://doi.org/10.1080/13501761003662016.
Simeon, Richard. 1976. "Studying Public Policy." Canadian Journal of Political Science/Revue Canadienne de Science Politique 9 (4): 548–80. https://doi.org/10.1017/S000842390004470X.
The Economist. 2021. "Sanctions Are Now a Central Tool of Governments’ Foreign Policy." The Economist. https://www.economist.com/finance-and-economics/2021/04/22/sanctions-are-now-a-central-tool-of-governments-foreign-policy.
Vargas Sepúlveda, Mauricio. 2020. Leontief: Input-Output Analysis. https://CRAN.R-project.org/package=leontief.
———. 2021. Solutions Manual for An Advanced Guide to Trade Policy Analysis in R. 2nd ed. UN ESCAP. https://r.tiid.org/R_structural_gravity/.
Walter, Stefanie. 2021. "The Backlash Against Globalization." Annual Review of Political Science 24 (1): 421–42. https://doi.org/10.1146/annurev-polisci-041719-102405.
I maintain the WebTechnologies view and the official mirror for Chile.
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.
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.
I have provided an Excel version of the Freedom House datasets in the R package "freedomhouse" here. The added value is that it tidied the data from their spreadsheets and I added the ISO codes fo the countries and the justification text for each sub-item where those were available. Check here for more details.
The tables provided here were reshaped under Cobb's Normal Form, and in some cases contain corrections that I explain in the project repository. The specific sources are the Gravity database from the Center for Prospective Studies and International Information (CEPII), the International Trade and Production Database for Estimation (ITPD-E) and the Dynamic Gravity Database (DGD) from the US International Trade Commission (USITC), and the Structural Gravity Database (SGD) from the World Trade Organization (WTO).
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.
Check SQL Databases for students and educators if you need access to PostgreSQL databases.
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.
Vargas Sepúlveda, M. The Hitchhiker's Guide to Econometrics. 1st ed. Victoria: Leanpub, 2023. https://leanpub.com/econometrics-guide.
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.
I organized the notes I took as a student in ECE244 (Programming Fundamentals) at the University of Toronto. The notes cover the C++ language and are available at pacha.dev/ece244-class-notes.
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.
I tend to replicate all the articles and books I read. This usually involves redoing all the math when something is not clear (i.e., not clear to me) or trying to recreate tables with R or Python.
Here are some of the articles and books I have replicated:
Feenstra, Robert C. 2004. Advanced International Trade: Theory and Evidence. Princeton, N.J: Princeton University Press. Tables replication with R.
Melitz, Marc J. 2003. "The Impact of Trade on Intra-Industry Reallocations and Aggregate Industry Productivity." Econometrica 71 (6): 1695–1725. https://doi.org/10.1111/1468-0262.00467. Math step by step.
Santos Silva, Joao, and Silvana Tenreyro. 2006. "The Log of Gravity." The Review of Economics and Statistics 88 (4): 641–58. https://doi.org/10.1162/rest.88.4.641. Tables replication witn R.
Yotov, Yoto V., Roberta Piermartini, José-Antonio Monteiro, and Mario Larch. 2017. An Advanced Guide to Trade Policy Analysis: The Structural Gravity Model. United Nations. https://doi.org/10.18356/57a768e5-en. Tables and figures replication with R.