Where To Open A Bubble Tea Shop

A quick report applying some of what I’ve learned of data science.

Introduction: Business Problem

I love bubble tea. Enough that I’ve thought about opening my own bubble tea shop. There are a few in my area, but there are definitely large gaps in coverage for service of this delicacy. If I were to open a bubble tea shop in the Vancouver (Washington) area, where would the best place be to open it?

Data

For general venue information, I used foursquare. It provides excellent location based data on what venues are in areas and where they are.

Unfortunately bubble tea shops in the area do not seem to perfectly match up with Foursquare’s data. So to get more accurate shop information, I had to use my own knowledge of the area as well as web listings to check all possible shops. Many of the venues listed were either no longer in business or didn’t offer bubble tea, but by the end of checking search results and venue listings, I was fairly confident I had found all the real and currently in business bubble tea shops in the area. Coordinate data for these locations was gathered from google maps.

Additionally, I found zip code area data from inspecting the following link’s source code: Vancouver, Washington (WA) ZIP Code Maps, Data, Jobs

Methodology

To get an idea for the area I was working with, I used the zip code coordinate data to calculate the center of each zip code area, and used python’s folium library to display the city and its zip codes. I was further able to use this data to calculate a rough area to search for venues in.

Vancouver Zip Code Areas and their calculated centers

From there, I went on to get foursquare venue data. I queried it for venues nearby the center of each zip code to get fairly good coverage of the region, and converted the query results into a Pandas DataFrame containing the following venue information: Zip Code, Venue, Venue ID, Venue Latitude, Venue Longitude, and Venue Category.

First 5 rows of venue data

I explored the data to see what venues were common in the area, mostly to get a feel for the data. I found that Coffee Shops and Pizza places were the most common.

I then checked for venue data related to bubble tea.

As mentioned in the data section, there were some issues with the accuracy of the information on bubble tea venues, probably partly because it returned a lot of tea and coffee shops that didn’t sell bubble tea, and partly because some of the venue information was outdated due to shops closing. So I eventually had to gather the data myself as best I could through search engines, google maps, and personal knowledge of the area.

Bubble Tea locations

With this information, I started on trying to solve the original question of where would be the ideal location for another bubble tea shop. I created a grid of points that were to be scored on quality of location, positively correlated with proximity to other venues, and negatively correlated with proximity to existing bubble tea shops. This in my estimation should find a location that was both good for business, and lacking in competition from other bubble tea venues.

Dot Grid of location scores. Black dots are venue locations. Blue dots are locations with negative scores due to their proximity to existing Bubble Tea shops. Red dots are locations close to many non-Bubble Tea venues. The large red dot near the bottom right was the highest scoring point.

Results

After tweaking the logic and number of points some to refine the display and make the calculations complete in under an hour (distance calculations between hundreds of venues for each point in a grid with several thousand points was a little too ambitious), I was able to make a map detailing the rough suitability of locations, along with highlighting the location with the highest score. That location ended up being in the area of Southeast 164th Avenue and Southeast McGrillivray Boulevard.

Discussion

Some of the locations that scored well surprised me, but the logic seems to check out. I think part of it is I’m not used to thinking in terms of venue distribution. In my head, I was prioritizing distance from other bubble tea shops. Being far away from competition though is in no way a guarantee of success though, and if that was the only criteria then the ideal location for a new venue would be in the middle of nowhere. Obviously though, any shop that doesn’t have many potential customers in its area is going to fail. So I used a calculation that would allow venue density to tell me indirectly where there would be many potential customers.

These results might be further improved with a deeper understanding of who potential customers for bubble tea would be, crossed with census information for the area. It may be that proximity to high schools or other types of locations is more advantageous for bubble tea shops then for other venues.

Conclusion

I think this is a solid recommendation for where to look to open a bubble tea shop. And the methods used here, venue data on the competition and venues in the area in general used to generate a weighted grid of an area, could be useful in finding possible locations for other types of venues in other cities as well.

UFO Grow Lamp ADD-on

So, I’ve been having a lot of fun with my 3D printer for nearly a year now, but recently learned how to use a program called OpenSCAD to make my own 3D designs. And now I’ve finally gotten around to making something I’ve wanted ever since I thought of it months ago: a flying saucer add-on for my desk grow light to make it look like my plant was about to be abducted.

I was happy with how it turned out. I may even paint it some time, though I’ll want to sand it down more first.

Crime and Punishment

This was an amazing book. It starts with a student who’s dropped out due to lack of money and who’s withdrawn from the world as much as he can. From his studies, he’s learned and written about philosophies such as Utilitarianism and Rationalism, and has upon reflection on these ideas realized that cold blooded murder can be justified under them in some cases as long as it brings about something greater. The book goes on to show how following this dark rationalization utterly destroys him.

I was amazed at how many of the elements in this book parallel modern issues. Right down to discussions of communism, false accusations, poverty, and rationalizations people still make to this day. Apparently, it was written as a refutation of Nihilism, and I can see the point it’s trying to make, and I think I agree with it. It never settles on a clear concise message, the behavior of the main character is muddled and often confused as he struggles to process what’s happening and what he’s done. In essence, that’s the point. You can coldy do the numbers to predict what will do the most good, but life isn’t like that, it’s muddled and confusing. There’s too much chaos in the world to go with such oversimplifications as writing off an entire person’s life for one’s own benefit. And often times one finds that their sympathies or hatreds were misplaced. It’s easy to say that the world would be better off without x or y person in it, but it can’t be proved other then by doing so. And the consequences of doing so, especially if wrong, are often horrific. Instead, focus on helping people and preventing actual injury.

The Count of Monte Cristo

I finished reading The Count of Monte Cristo last week, and have to say I am impressed. It is a masterpiece of literature worthy of being considered among the greatest works of all time.

It starts off with a man arriving home, happy and about to be married, only for his life as he knows it to be ripped away from him. The rest of the novel is him struggling to come to terms with what has happened and eventually seeking vengeance upon the people who wronged him. That in itself is not exceptional. What is exceptional was the depth of feeling conveyed within the writing, something that modern works rarely achieve. And on top of that, the brilliant and ironic vengeance he manages to achieve in the end. It is a tragic and beautiful tale I strongly recommend.

The only difficulty I had with this book is that some of the names were hard to follow through the story, which takes place over decades. But the story does reiterate the villainous crimes to the guilty parties when it’s called for, so it’s not much of an issue even then.

I very much enjoyed it, and may read The Three Musketeers again since it was by the same author.

Brave New World

Brave New World is a dystopian novel set in a possible future where humans are grown by the state instead of born. Every aspect of life has been designed to maintain the stability and happiness of the civilization, at the cost of everything that makes us human.

It is a brilliant story, highlighting how hollow both happiness and stability are in comparison to the true passions of the human soul.

In particular, the way that social pressures and the drug “soma” are used to enforce conformance by individuals to the will of society was both insightful and in many ways chillingly relevant to today’s world. Soma is more or less happiness in a bottle, letting anyone escape the pains of reality as long as they have a supply. Parallels to real drugs can easily be made, as well as how they drive people to extreme lengths to feed their addiction. And social pressures in real life have increased in a lot of ways in out ever more connected world. I think that the internet may be one of the few ways the dystopian vision could have been made more ominous. A state run social networking system keeping everyone always connected if done right, could have even replaced soma in some ways as a controlling and addictingly pleasing force.

The book also makes a very disturbing twist on sex and sexuality, demanding the abolishment of all intimacy. Fitting into the lack of passion theme, both men and women have no long term partners. Monogamy, family, any possible attachment is looked upon as disgusting, and sex with multiple partners is expected and demanded.

There are so many twisted ways that every normal and instinctual human behavior ends up twisted into a sick mockery of itself and presented as normal and natural in a society that’s endured for over 600 years.  I can’t do it justice in this short overview.  Man is reduced to a cog in a heartless machine, where those who do not fit into their “pre-destined” place are viewed as defective and dealt with in ways befitting defective equipment.

This is a truly incredible work, its exploration of the human condition in my mind only trumped by Stranger in a Strange Land. It is well worth a read if you can handle such subjects. I’ll be thinking about this one for a long time to come.

Setting up Wake-On-LAN for Fedora

Background: I have a fairly large and noisy server that I like to hack on, but because of the noise I don’t like to keep it on longer then I have to. I also have a raspberry pi that I use as an always on server. I thought it’d be useful if I could turn on my larger server remotely when I want to do things on it. My server is running Fedora 25, and my Raspberry Pi is running Raspbian.

Quick Steps

  1. run ifconfig and learn which network device the server is using
  2. run sudo ethtool <network_device> to check if the device supports wake-on-lan
  3. edit /etc/sysconfig/network-scripts/ifcfg-<network_device> by adding the following line to the bottom of it: ETHTOOL_OPTS=”wol g”
  4. Run ifconfig again to get the hardware address listed under ether and looking something like 00:11:22:33:44:55
  5. turn off the machine and test wake-on-LAN by running “wakeonlan 00:11:22:33:44:55” from another machine on the same network.

Detailed Method: After doing some research, I leaned I needed the name of the network device my server was connecting from. To do this, I ran ifconfig and got the following results:

 

This shows that there are three devices (eno1, eno2, and lo), and only eno1 seems to be connected. It also has an “ether” value listed, which we’ll need later.

It seems that ifconfig is now obsolete by the way, and the information we’re looking for could have been found with ip addr.

Next, we need to check if this device supports wake-on-LAN. sudo ethtool <network_device>

Notice the lines “Supports Wake-on: g” and “Wake-on: g”,  the Supports line having a value of “g” means that wake-on-LAN is supported. “Wake-on: g” means the device is ready for receiving wake commands. If it instead lists “Wake-on: d” though, then device will ignore wake commands.

It’s possible to enable this with “sudo ethtool -s <network_device> wol g”, however, the device will default back to “d” after a power cycle. Not very useful unless you can put it in a startup script. However, Fedora 25 didn’t have a startup script that quite fits what I was looking for when last I checked. It does however, have the following file:

/etc/sysconfig/network-scripts/ifcfg-eno1

This can be edited to change the default setting of our wake-on-LAN device by simply adding this line to the bottom of it:

ETHTOOL_OPTS=”wol g”

Once that’s done, the server should be ready to receive the magic wake-up network packet. It took more searching then I would have liked in order to find out how to actually do that. Fortunately, my Raspberry Pi already had the needed command installed, though I found information about other programs, but couldn’t manage to install or use them. I mentioned the “ether” value earlier, it’s the hardware address for our server. The command to send the magic packet is thus:

wakeonlan <hardware_address>

Results: I’ve enjoyed being able to turn my server on and off as needed. It almost feels magical being miles away and being able to turn my server on to work on it. It’s also very useful.

Missed Posts

I’ve read a lot of books since “Stranger in a Strange Land”, and unfortunately I don’t recall enough about most of them to give the proper overview each of them deserves.

The Art of War: This was a terse yet insightful book on the tactics for waging war. I found it to be fairly sensible, though ruthless.

The Dictator’s Handbook: This was an incredible book that deconstructed the nature of political power and even offered legitimate critiques to The Art of War, showing that the old tome was wise in the context of dictatorships, but many of its tactics weren’t usable in a democracy, and included what the proper tactics were for a democracy and why. Not only that, but it explains the depressing realities of why politicians and corporations do what they do in terrifying detail. This dark tomb is essential reading for those who want to understand the grim reality of large scale leadership in the real world.

The Big Sort: This was another incredibly insightful book that showed and explained in great detail the troubling trends of division within the US and to a lesser extent the western world. It turns out that as people were able to afford to move wherever they liked, they self-sorted to communities of like minded individuals, and even self segregated. And once a community reaches a certain threshold, it pushes out individuals who’s ideals or characteristics are different from the majority. This is honestly quite terrifying for the future, as it means people from different groups are going to be less and less willing or capable of talking with each other.

The Bible: I had never read it before, and I chose to read the stories in chronological order. Whatever one’s views on it are, there’s no denying how much of western civilization have been shaped by the contents of this book. I enjoyed some of it, loathed other parts of it, and gained a deeper understanding of the Jewish and Christian faiths. I hadn’t realized how bloody and cruel parts of it were, and at first found it was a poor source for moral guidance that many claim to use it to be. One can use its pages to justify both genocide and slavery, and many other evils. Upon reflection though, I think that my initial reaction was too strong, and indeed can see much wisdom and kindness within the pages despite other objectionable parts.

God: A Biography: This was a book delving deeper into the nature and meaning of the old testament stories. It was a wonderful expansion providing many fresh insights. It is in essence a literary analysis of the character God as depicted in the pages of the Bible, including noting the differences in the arrangements between the Christian Bible and the Jewish Torah.

The Body Keeps the Score: This was an amazing book that gave insights into how mental health is handled and can be improved when it comes to treating emotional trauma. It was truly amazing learning of so many promising treatments for such tragic life experiences. This book is not for those uncomfortable with with the darker aspects of the human condition. it covers war, rape, and abuse of all kinds in uncomfortable and accurate detail. It also covers ways that survivors of such trauma are perpetually haunted by these ordeals, and the methods to get them past it in time. It is also a wonderful and tragic overview of the poor state of modern treatments, all backed up with scientific studies.

I Have a Robot Maid

A while back, I decided I wanted to get a new vacuum cleaner. Wanting to maximize the utility of my purchase, I had the bright idea of checking if there was any vacuum cleaner / air purifier combination out there. And sure enough, there was!

“COVER COVER V01K All-in-one cleaning robot with detachable air purifier – mopping, brushing, vacuum, sanitizing”

It was even a robot too! It’s not the smartest when it comes to navigation, but by having it automatically run each day the floors have gotten much cleaner.

But that’s not the end of the story. Recently, one of my coworkers also got a robot vacuum cleaner. After chatting a bit, we joked about them being robot maids. And so I made up my mind to make my robot a maid outfit. My knowledge of textiles consists of knowing how to thread a needle and haphazardly stitch bits of fabric together, but I felt it’d be enough.

Before I had to stitch anything though, first, I had to do math. I happen to be the sort of crazy person who actually likes doing trigonometry for fun in their pare time, which is good because it’s the only time I feel like I get to apply that math minor I earned in college. I wanted to make half of a cone wrapped around the base of the cylindrical robot and possessing an incline of 45°.

Taking a flat piece of fabric and turning it into a part of a cone shape

To make a topless cone like shape around a cylinder of radius r’ where the angle of incline is ϕ, cut out a ring shape with an inner radius of r and an outer radius of the height of the skirt plus the inner radius.

Once the math was done, it was just a matter of cutting and sewing. I may add more to it later, but for now I’m happy with the results of this small project.

State of the Yard

I’ve been living in my new house for two months and I’ve been doing what I can to clean up the house and yard. The back yard in particular has been a thorn in my side with it’s menacing thicket of blackberry vines that threatens to consume everything. I’m exaggerating, but only slightly.

A large thicket of blackberry vines occupying the entire back line of my yard

The Himalayan Blackberry is an invasive species of plant native to Europe. It has been incredibly successful here in the Northwestern region of the United States. You can hack them into pieces and the plant will simply regrow from the roots. Their seeds are spread by birds eating the berries and excreting the seeds later. The plant can also reproduce through its vines and roots. The vines are covered in soft green leafs and large thorns. These thorns can get quite large, are roughly triangular in shape, and can pierce any set of gloves I’ve ever used if the wearer makes the mistake of trying to tightly grasp a mature vine. A single vine can grow into a yard dominating thicket of hundreds of vines in as little as two years.

For some reason when I say “blackberry”, people imagine some happy little berry plant. No, these things would strangle you to death and tear apart everything you hold precious if given the chance. The house has some dead vines hanging from some time in the past when the vines actually had grown all the way into it. There is nothing nice about these plants. And my back yard was filled with them in a thicket that was more then 10 feet tall at its highest. However, these plants can be managed, and there is much to be admired in there tenacity.

After about a month of hacking at them with a machete, I managed to knock most of them down. I’ll still be uprooting new growth from old roots for years to come though. But for now, I’ve cut down the thicket and begun to reclaim the yard. Unfortunately that’s revealed a large amount of trash, and a large hole in the fence.

View from my bedroom window

I’m still considering what the best choices would be for this whole mess. My options are limited by me not owning a truck and it being illegal to burn yard debris here. I’ll get everything sorted out eventually. Hopefully sooner then later.

 

I Bought a House!

I am now a home owner! Well, as of two months ago I was. Life’s been way too busy lately. Buying a house was quite an ordeal. It started early last year, when I tried to move out of my family home. I had saved up $40,000 for a down-payment, and gotten pre-approved for a loan from my bank. Unfortunately, the way I went about it made it impossible to even tour a house in my price range before it had sold. I settled for an apartment instead.

Don’t get me wrong, it was a very good apartment. But the problem with an apartment is that after years of paying rent, you only have higher rent to look forward to. With a house, you get a house that you can sell to get back some of the value you put into it, or maybe some day actually pay off the mortgage and own it outright.

After about a year of living in an apartment, I set out house hunting again. This time I knew what to expect. I got another loan lined up, and set out to tour houses. I also attended a free class on how to house hunt that was offered by redfin.com. After not getting far on my own, I followed the advice given in the class and decided to get a real estate agent. I looked over the agents I’d called in order to view houses so far and chose the one that I had had the best experience with.

My agent, Lyla Bostick (Lyla.RealtyProWeb.com) was wonderful. I can honestly say I couldn’t have gotten this house without her. She is insightful, skilled, and an incredibly hard worker. She introduced me to her preferred lender, Paul Mattila (cascadenorthernmortgage.com). Paul was very skilled and a tremendous help that was essential for managing to close the deal. After several tours, I settled on trying to buy a bank owned house.

This was far harder then expected. As far as I was aware, I was the only offer on the house and the bank accepted the offer after a while. Even after the bank accepted the offer, it took a lot of time and work to get all the paperwork through. The bank dragged their feet for a month before finally trying to arrange a notary for the final signing. Then actually managing to meet with the notary became a struggle in itself. And the bank didn’t even provide the notary with all of the documents needed the first time we met. it was a stressful mess that kept me on edge for a full week while I carried around a cashier’s check for the down payment that if lost, would have ruined me.

Eventually, mercifully, all the paperwork was done and accepted and I could finally move in. And not a moment too soon. You see, I had to give advanced notice to my landlord that I was moving out. I had given notice when I thought the paperwork would be signed in a week. But as the process had taken nearly a month I ended up only having a weekend’s time to move all of my stuff to the new place. On top of that, the house was damaged from years of abandonment, and still needed a lot of work.

Thankfully I have a wonderful family who was able to help me move everything in a rush. My parents even bought me a number of appliances as home warming gifts. On top of that, my dad is a master carpenter and has been helping with various renovations. I probably wouldn’t have been able to live here otherwise honestly.

All in all, it was quite the ordeal to become a home owner. I’m happy to have managed it, and immensely grateful for all the help I received that made it possible.