NAFTA trade dashboard

Tradewatch is a dashboard, written in R using the flexdashboard framework. Visualizations are made possible thanks to highcharter and other packages. The main purpose of the dashboard is to monitor trade, mostly from the Mexican perspective, of goods and commodities with countries that are in NAFTA. In the age of fake news and policy-by-twitter, hopefully this tool will help guide more informed debate (and decisions) with respect to trade between these three countries. Notes and methodology The dashboard consists of basically three sections: Bilateral Trade: These contain two, side-by-side comparisons, of exports and imports of products at a 2-level HS code depth. The color denotes year-over-year growth rate, while the size is related to the dollar value (in the newest month) of exports. The average growth rate for 2 digit codes is a weighted-mean of each 4-digit classification. US…
Original Post: NAFTA trade dashboard

Shiny App for MBA Interviews

A couple of weeks ago I attended some interviews as part of my process for admission into an MBA program. While most candidates would pore over the possible questions and then try to teach them to a third party to help them with a mock interview, I decided to expedite the process by building a shiny app in R. In the name of helping anyone out there who knows R and is applying to an MBA (I know it is probably very few people), here is the code and a simple explanation of my workflow. Workflow First, you will need an excel with all the possible questions to ask. I compiled one here. You place this excel in the folder with the ui.R and server.R files. When a button is pressed on the app (the “score”), the shiny app…
Original Post: Shiny App for MBA Interviews

When Trump visits… tweets from his trip to Mexico

I’m sure many of my fellow Mexicans will remember the historically ill-advised (to say the least) decision by our President to invite Donald Trump for a meeting. Talking to some fellow colleagues, we couldn’t help but notice that maybe in another era this decision would have been good policy. The problem, some concluded, was the influence of social media today.…
Original Post: When Trump visits… tweets from his trip to Mexico

New banxicoR package

The banxicoR package is now available on CRAN. Much like inegiR this package aims to bring official Mexican data easily into R, in this case by scrapping iqy calls to the SIE (Sistema de Información Económica) webservice of the Bank of Mexico. Introduction The major difference with inegiR is that the Bank of Mexico does not have an API, so…
Original Post: New banxicoR package

Voting clusters in the U.N.

After some more digging, and a suggestion by @theMexIndian I decided to see more in the depth the unvotes database that I wrote about some weeks ago. This time, amit suggested I do some hierarchical clustering of the votes. So here goes a very dirty first attempt… Data and setup Nothing too impressive here… (for a discussion of the package,…
Original Post: Voting clusters in the U.N.

satRday in Monterrey

I recently volunteered to host a satRday event in Monterrey through the email form and was surprised to find out it was shortlisted as an international destination. I’m writing this to convince others to vote for Monterrey. If you’re nearby, like the north of Mexico, the benefits are clear (the next option is currently South Africa!). Overview about Monterrey Monterrey…
Original Post: satRday in Monterrey

New nasadata R package

This package intends to provide a hassle-free way to access some of NASA’s open-source API’s to build applications or models. Because the documentation seems inconsistent and there are tons of API’s, I have concentrated my efforts on three which I believe provide the best “bang for my money”. The source package is built around these three API’s, but for the…
Original Post: New nasadata R package

South Carolina Republican Debate with R

Continuing with the series analyzing republican debates, the latest in South Carolina confirms a few of the trends i’ve been observing, mainly that: Trump likes to repeat himself (maybe he likes to stick with what has worked so far?). Trump also likes to keep it short: everyone else says more things for longer at a time. The most relevant person…
Original post: South Carolina Republican Debate with R
Source: R-bloggers