BizzyBot: Tinkering w/ Twilio SMS

So, I built a small Flask app while tinkering with Twilio API’s called BizzyBot. It’s a SMS bot that provides requests/responses for your personal business card information. It was fun, quick, and easy to set up using the Twilio Console, Python, ngrok, and Twilio docs. It’s amazing how far they’ve gone just building out their documentation and having other users built out their own getting started guides. The main block, “bizzy”, parses through a text request and runs the “getContent” method to choose which response to send back.

from flask import Flask, request, redirect
from twilio.twiml.messaging_response import MessagingResponse

app = Flask(__name__)

# Get the business card info to text back
def getContent(msg):

    msg = msg.lower().strip()
    bizinfo = ""

    if "resume" in msg:
        bizinfo = "https://www.dropbox.com/s/edf1u3pjp999ks9/AakashDesai_Resume.pdf"
    elif "phone" in msg:
        bizinfo = PHONE_NUMBER
    elif "email" in msg:
        bizinfo = EMAIL
    elif "github" in msg:
        bizinfo = "http://www.github.com/aakashhdesai"
    elif "blog" in msg:
        bizinfo = "http://aakashdesai.blog"
    elif "linkedin" in msg:
        bizinfo = "http://www.linkedin.com/in/aakashhdesai"
    else:
      bizinfo = "Welcome to Aakash's SMS Biz Card! Please reply with one of the following: resume, phone, email, github, blog, linkedin"

    return bizinfo 

@app.route('/', methods=['GET','POST'])
def bizzy():
    # Get the body of the incoming text request
    body = request.values.get('Body', None)
    
    # Start a Twilio response object
    resp = MessagingResponse()
    
    # Reply back to the text request
    replyText = getContent(body)

    resp.message(replyText)
    return str(resp)

if __name__ == '__main__':
app.run(debug=True)

Going through the normal offline to online workflow, I found that tech folks found the exchange fun…though new. Fun experiment and I’m not sure how it’ll go with people who don’t already understand the tech.

In the future, I’d like to build out more of a chat workflow and maybe apply it to the blog somehow. If you’re interested in checking out the app SMS workflow, ping me via GitHub or channels and will send over the phone number!

Climate Mood

Continuing with the delve into Climate Change, looked into understanding how people feel, positive/neutral/negative, about the subject on Twitter. Using TextBlob, with Tweepy, Pandas, and Plotly Dash…I built initial revision of a data visualization dashboard, Climate Mood, that analyzes tweets over a sample of the last 2,000 collected hourly. The idea is to provide a simple, sentiment-focused look across multiple analyses. I’ve particularly enjoyed building and re-applying some of the methodologies and statistical analyses I’ve learned recently.

Go to the dashboard

As mentioned, the dashboard pulls from Twitter over an hourly basis and deposits into a PostgreSQL database. The top chart provides a linear regression trend line (unevenly for now) across tweets collected that can be toggled. Also, tweets can be seen on the top-right tweet-box on hover. Other simple sentiment analyses include average verbosity of tweet length, popularity of tweets, and average sentiment-based amplitude of tweets. Feel free to check it out!

Looking forward to applying more advanced statistical analyses including a live Monte Carlo Simulation calculation across these auto-updated samples…among others. If you have any feedback or suggestions, please submit an issue on the GitHub repo or contact me.


Climate Trends

Been thinking about climate a bunch lately and started looking into trying out the latest data tools and trends out there on the Internets. I’ve particularly enjoyed R and Pandas/Python, especially via Plotly Dash, and re-applying some of the methodologies and statistical analyses I’ve learned while on the job. The latest curiosity is in global temperature change since 1910 and various other societal factors. Lo and behold, the first iteration and not-so-polished, Climate Trends.

You can view the dashboard here

The dashboard has a drop-down menu of various analyses around global temperature change and linear fits across birth rates, fertility rates, death rates, life expectancy at birth, and rural population growth rate as well as a nominal years passed chart. Feel free to dabble!

If you have any feedback or suggestions, please submit an issue on the GitHub repo, respond on Dribbble, or contact me.

Anaphylaxis & More @ UC Irvine

Near-death experiences provide a heavy emotional weight…even 16 years later and, generally, the rest of a person’s life.

Still remember everything, as much as I can, from that night in Irvine. My most important anniversary thus far in life. Here goes:

It started with a pecan-filled brownie that wasn’t properly listed with its ingredients. After eating it at Mesa Commons, a half hour later I started experiencing all sorts of issues: swollen throat, diarrhea, vomiting, blood-red eyes, swollen forehead (that was red too through my brown skin), a distinct lack of oxygen, inability to walk without support, and an inability to breath or talk. I needed to type out, letter barely after letter, to take me to the hospital by my dorm-mates. I lost consciousness before I got out of the door. My dormmates told me that I fell apart in their arms at the steps leading to the parking lot and fell down a flight unconscious. They called the paramedics and I got a number of Epipen shots to kick my body into gear…ended up 30 minutes to an hour later at the ICU at Irvine Hospital. The docs took awhile on me and tried out some experimental drug to open up my lungs and throat…a last ditch effort before calling me dead, actually.

Thankfully, my lungs and throat opened up. 3/4’s of a day later, I woke up from a coma that the doctors weren’t sure if I’d ever wake up from with a family crying (they drove all the way down overnight not knowing if I was going to be alive or dead by the time they reached there). I was intubated and lying there motionless not able to move a muscle as my body was wrecked and lifeless.

It took another day to move me out of ICU and into a proper bed without intubation or…anything else needed to support me. I couldn’t walk for a day, but I told my parents, well, I had homework I needed to get done by Monday for my Physics class (one of the first things I said after getting out of the coma). I stayed 3 days in the hospital and my parents, incredibly begrudgingly decided to keep me in Irvine (400 miles away and only 4 months being alone for the first time in my life). I went to my physics class in a crutch unable to walk properly, but I was there at 7:30am in the morning with my homework.

From there, I ended up on academic contract a quarter later. I survived that as well taking the toughest grading professors in the Computer Engineering program for 3 straight quarters. Ended up graduating with a pretty decent GPA after it and a lot of discipline built up over the years and through that.

Trip to India

Heading to India for a vacation and now have a chance to try out a lot of different foods, hopefully, and check out places I haven’t been able to previously. Something I’ve missed out on in my life as cultural events and family parties were kind of a death wish due to the various nuts, beans, and seeds that were prevalent. Thanks to my awesome reduction in allergies, have a chance at reconnecting with my parent’s roots as well and seeing things as what they went through. Even put together a spreadsheet/rubric on things to do and eat there (as well as various transportation options that are pertinent).

Have been to India in the past, but it’s also been limited. This time, there’s happiness and excitement to something I’ve always wanted to partake in. Very excited about the trip and looking forward to seeing family as well as trying out a lot of “new” without any deathly allergies!

My Investment Research Checklist

I was talking to family and friends about various investments made (and some missed out on) over the years. Have gotten decent at picking winners (using a Value-Investment framework inspired by this book that mixes intuition, selection, and analysis). Here’s the base-level rubric for what I look into before I investment into any company. Some analyses go further. Generally, 9 months to 1 year is taken before any action…essentially driving the associations of the entity into muscle memory and relying on intuition, alongside any other company/product/market, to make the call.

Market

  • Read on 3-6 months of articles on stock and target company
  • Read on 3-6 months of analyst coverage on stock
  • Find Market Cap potential of target company
  • Find Market Leader
  • Identify Competitor Set
  • Identify Lead Competitor(s)
  • Find Growth Darkhorse(s)
  • Identify any market regulation

Product

  • Determine CEO capabilities and habits
  • Determine CEO’s style of communications (past 2 years)
  • Identify Product Roadmap
  • Read last 5 product announcements
  • Linkedin Lookup on Corporate/Employee Composition (specifically product/marketing/engineering)

Company

  • Read past 10 10-Q, 2 10-K
  • Identify, if possible, Sales & Marketing + R&D spend
  • Identify, if possible, Growth of S & M + R & D spend

Would love to hear your thoughts! Feel free to DM via LinkedIn.

Elon Musk & 2018

I’ve written about Tesla’s growing community of advocates back in 2013…well, it’s now becoming real. Though is it happening because of an explicit push or something happening naturally due to increased sales?

My hypothesis is that I think Elon is being Elon and going on a major PR push in 2018.

Been tracking since February and it keeps on confirming along the way. With the Starman launch (February), Grimes (May), and “Pedo” (sigh) (July), I think there’s something going on in terms of media coverage on various issues in the US/Worldwide, and Elon Musk is either trying to take advantage of it or doing his own thing. Feel free to add the search term “pedo” to this Google Trends chart…I won’t.

Maybe this is Elon “taking control of the narrative”?

 

I haven’t done a multivariate analysis with Tesla’s share price, but it might be worthwhile now. Once the shorts/media started their campaign last year, it became clear that Tesla’s share price was going to be affected in a hedge-fund kind of way. I think this company should be valued, at least, at 2-2.5x higher than the current by end of 2018, if the market is accurate and corrects itself.

SJ Charts

SJ Charts is available now fully open-sourced here! Plot.ly has been fun and the documentation, as well as the community forums, have been great to work with. Wish there was more in-grained analytics support via Google Analytics and Mixpanel, but that seems to be a work-in-progress. Here’s what it looks like now:

The charts now have time-based charts for Housing Prices, Unemployment rate, and Jobs by Sector for the City of San Jose. The idea behind this app is to show various analyses via a top-level tabbed navigation for the City of San Jose residents. Basically, to build out useful analyses for the open data available from the City of San Jose.

San Jose City Data Analysis Fun

So, I took a few weeks to get on-ramped with Pandas 0.23.0 and Python and am still learning the ropes. Though, I wanted to share some output. Namely, using the San Jose Open Data Portal, there were some good insights to be had from looking at economic data pushed out by the city for 2006-2016.

 

What did I do?

 

  • Looked at unemployment rates across various housing prices (condos/townhomes & single-family homes) using ordinary-least-squares regression.
  • Looked at, over time, labor force and housing price changes.

 

SJ Economic Changes, 2006-2016

 

 

Condo/Townhome prices vs. SJ Metro Unemployment

 

 

Single Family Homes prices vs. SJ Unemployment

 

What did I find? Namely, housing prices are increasing rapidly compared to labor change (i.e. job growth) in San Jose over the course of 2006-2016. Also, there’s a strong correlative relationship between something that we all take for granted and as obvious: increased housing prices in San Jose runs with lowered unemployment rates.

If you’d like to look at the data analysis done, here’s the GitHub repo. If you have any questions/comments/suggestions on more analysis, feel free to contact me via Twitter, GitHub, or LinkedIn.

Applying ROI to Prioritization

I’ve been working through a few updates on a prioritization framework for use in a feature and sprint planning session. The very nature of the sessions are to align on what a team is going to be working on with ensuring it’s appropriated towards the highest priority items. After a few recent chats with other PM’s, there was a needed sense of balance between business needs, product fit, and cost.

Here’s the latest update that aims to provide that sense of balance:

  • ROI – Return on investment of fitting product theme fit, churn
    potential, and roadmap fit relayed to a weighted average against t-shirt
    size.
  • Cost – These are the t-shirt sizes that engineering generally comes up with to assess viability of a themed story or issue.
  • Legend – It’s an updated map or legend that provides PM’s and Engineers the ability to map back specific priorities to the ROI number.

Feel free to use the template; if you find it useful, let me know. You can reach me via Twitter @aakashhdesai or Linkedin @aakashhdesai.