Tuesday, February 14, 2017

How Flynn's Term Compares to the National Security Advisor Tenures since 1953

First National Security Advisor appointed by Trump lasted 25 days - how long Michael Flynn held this role since inauguration until yesterday night when he resigned amid Russian sanctions scandal. It sets record for the shortest term held in this role since its inception in 1953.

This record should hold for a while as seen from the chart below that compares all terms since Robert Cutler became first NSC advisor in Eisenhower administration:

This is unheard of - NSC advisor lasted less than about a year just once before: William H Jackson held position for 4 months being removed amid changes on the National Security Council without any apparent controversy.

How significantly shorter Flynn's term is could be seen in the same type of chart with his tenure in days compared to the rest in weeks: 

When compared to the rest of tenures in months (Flynn's tenure is still in days) it does break through the bottom but hardly stands out, again, days vs. months:


Thursday, February 2, 2017

Trump's Travel Ban: Is That a Muslim Thing?

To analyze how much recent travel ban by Trump's administration could be called 'Muslim' one might look at the whole Muslim world (by population):

Countries in red (whose citizens are banned to travel to U.S. for 120 days by Trump's executive order) all except Libya appear in top 30 above. But occupying quite sparingly positions among other top 24 Muslim countries they don't appear to dominate this chart.

But if instead we switch the focus to U.S., in particular, immigration to U.S. things change. By arranging all countries (not just Muslim ones) by their refuge (and asylum) immigration to United States picture becomes drastically different: by removing 5 countries in red (banned by executive order) mostly Muslim immigration is eliminated from the top 12 positions completely:

Indeed all top five Muslim countries (in green) contributing to immigration are part of the ban. So based on the refuge immigration to U.S. it appears to pertain calling this ban "Muslim".


Sunday, February 7, 2016

The Map of Northern Sonoma, Russian River, Healdsburg and nearby

You are lucky if you are reading this post. Why? Because the chances you are not are a lot bigger. This post doesn't belong to famous wine or travel blog, it doesn't advertise, and it is not ranked high on google or anywhere else. All that means my post is not likely to show in your browser window. But if it did, you just got an instant access to many years of experience and knowledge acquired while traveling with my family to Northern Sonoma. All that is distilled into the custom map of Northern Sonoma, in particular, Russian River and Dry Creek valleys, city of Healdsburg and the surrounding areas.

The map features wineries, restaurants, and points of interest with concise but useful commentary and trails that connect them. Of course, this is pretty darn good only if you trust me. Why should you? Because many of my friends did and thanked me, In fact, they kept thanking me long time after their trips as their memories were driven by the map.

The map is still work in progress because every year I make new trip to Sonoma I find something new and interesting to add. And my memories also take time to shape up to be converted into artifacts I place on the map. So I decided to make this post also work in progress as I will be adding more info  about the map below. But for now, here it is - the infamous Northern Sonoma, Russian River, Healdsburg and nearby map:

Monday, September 28, 2015

Why Putin is so afraid of "export" of democratic revolutions

Pro-Kremlin news agencies already headline Putin's UN address with titles like "Putin to UN: Export of so-called ‘democratic’ revolutions continues globally". In his speech Putin made every effort to turn democratic movements of last decade into puppets driven by US and its allies. So why is he so afraid of democratic revolutions?

Because he is the one who still lives the life of Kadafis, Mubaraks, Husseins of the world and he witnessed how they ended up during these years. His neighboring states like Kyrgyzstan, Tajikistan, Georgia, Ukraine are too constant reminders of the fate awaiting certain presidents of the former Soviet Union states.

If you still don't quite understand how Putin consolidated power inside Russia just look at the party representation across governors of Federal Subjects in Russian Federation. Then compare with similar governments of States in Germany (both are federations according to their constitutions). United Russia ("Единая Россия") is party Putin represents (even though he is formally nonpartisan), and nonpartisan governors are de facto proxies of "United Russia" in most (if not all) cases.

Sunday, December 14, 2014

Why Russian Crisis of 2014 is Not the Same as Crisis of 2008-2009?

Some consider current crisis in Russia as no different from one suffered during and after financial crisis of 2007-2008. In fact, the culprits are falling oil prices and the total collapse of large financial institutions repeat themselves: oil prices are falling again and Western sanctions against Russia simulate the latter. The effects on Russian economy look like before too: Russian currency - ruble - keeps falling against dollar and Russian economy is heading for recession - just like in 2d half of 2008. But is it really the same kind of crisis for Russia?

This simple comparison bar chart tries to address this question by looking at 3 things: how much oil prices fell, how much ruble lost against dollar, and how much reserves Russia had at the beginning of each crisis.

The crisis of 2014 is still unfolding which makes this chart even more telling. Ruble fall is already far ahead of total loss in 2008-2009 (red bars). At the same time, this year oil prices fell just a fraction of total loss in 2008-2009 (blue bars). To top it off, Russia had 100,000 million USD more in reserves before crisis in 2008 than it had in August of 2014 (green bars). I suspect there are other different things at play in 2014. What are they?

Data (updated on Monday, December 15th):
2014: from June 20th when oil peaked to Monday, December 15th. Reserves Central Bank held in 2014 were the largest on July 1st.
2008-2009: rather conservative dates from July 3d (when oil peaked) to February 18th, 2009 (when ruble began stabilizing along with oil prices). Reserves were largest on August 1st.
Oil prices: for WTI.

1. WTI Daily Prices
2. RUB to USD Historical Exchange Rates Daily
3. USD and Gold Reserves by Russian Central Bank

Saturday, September 13, 2014

Crime Different as Night and Day

Dallas Open Data has among others data set of Dallas Police reports with narratives from October 2013 to May 2014 totaling over half a million reports. By focusing on text fields with crime description and narrative from these reports I will plot several (not completely unexpected) text-based visualizations.

First approach associates each police report with one of logical text corpora to display wordclouds of most frequent terms. Rules defining text corpora may be based on time, location, gender, race, etc. To illustrate I define 4 logical documents - Night, Morning, Day, and Evening - by dividing 24-hour day into 4 segments: Night (reports with time of offense from midnight to 6 a.m.), Morning (time of offense from 6 a.m. to noon), Day (time of offense from noon to 6 p.m.), and Evening (time of offense from 6 p.m. to midnight). This results in 4 clouds displayed in pairs of opposing times: Night vs. Day and then Morning vs. Evening:

At night we are looking at ASSAULT, VEHICLE, and FLED, while day is about SUSPECT, THEFT, and NFI (No F...ing Idea). Not sure what CAUSING and CONSENT mean on top of the Night, but PAIN there makes sense. Evening and Morning seem to differ the most on ASSAULT and BURGLARY.

Another way to look at the same data is with slopegraph (example): terms (rows) moving up or down according to their frequency across 4 logical document (columns), but I am leaving this for my next post.

Unstructured data as text can still utilize types of plots usually associated with structured types. Bar graphs (histograms) by hour of day for reports with certain term is one way to achieve this. To illustrate let's count police reports with term BURGLARY for each hour (from 0 to 23) across all data (roughly 6 months). This results in the following plot:

Not exactly surprising but it offers several conclusions, for example: most burglar's work day starts at 9 in the morning until 10 in the eveining. They also have lunch break at about 3 p.m or possibly it's police officers who do. Finally, high peak at 5 is something everyone should be aware of unless, again, it's police officers who skew the time of offense in reports towards the end of their shift.

Different trend can be observed for reports containing BMV (Burglary Motor Vehicle):

At first, it's rather surprising to see the peak in the morning hours, since we expect this type of crime happening at night. But, likely, victims find out about this type of trouble only in the morning and police has no better time to report offense.

Last graph is for term ASSAULT:

This crime obviously gets reported by victim with good knowledge of when it took place. ASSAULT crime reports peak between 9 in the evening and 1 in the morning significantly cooling off by morning hours. I would like to see promoting of good night sleep as a crime prevention program some day.