Thursday, October 6, 2016

Find the best location for your next shop in Google Spreadsheet (Voronoi Algorithm)



About 14 months ago I wondered how a Czech retail market is divided into regions according to their locations. Where is the best place to build next shop? I remembered to a Voronoi algoritm from university that could divide desire an area into small parts along the nearest spot.

Let's check a definition from Wikipedia

Voronoi diagram is a partitioning of a plane into regions based on distance to points in a specific subset of the plane. That set of points (called seeds, sites, or generators) is specified beforehand, and for each seed there is a corresponding region consisting of all points closer to that seed than to any other.


Why should you upload your a dataset into an unknown online web application when you want to visualize data? There were a lot of examples on the internet, but I wanted to create as easy as possible for everyone. Finally I found article by Chris Zettter, where code was written over Leaflet and Open Street map layer. It inspired me to rewrite as Google Add-on  to Google Spreadsheet with Google Maps underlay (I love Google Maps SDK)

I will introduce you shortly how to use Voronoi Map from scratch in lesss than 5 minutes.

1) Create a new Google Spreadsheet. Then insert data into Sheet 

For this demo I've downloaded data of California retailers from this Fusion Tables and filtered only Walgreens stores in San Francisco (my favorite place :-). 

You need to prepare data as separate columns for Name, Latitude, Longitude nad Type of point of interest. I've added a new column "brand" (green color) as a Type and filled it with text "Walgreens"


2) Open menu Add-ons and select Get add-ons. Find voronoi map and than click at + FREE button for install.

3) After installation open menu Add-ons -> Voroni Map and select Create Voronoi Map

4) Select appropriate colums and click Create map


Now you see a result. The blue points are point-of-interest (Walgreens stores) and regions along the nearest point. If you have more type of points-of-interest, you can filter them in right top panel.


Probably you are thinking where you should built you next shop? I would recommend you find intersection of region and think about this location :-)

Are you interested in this topic? Follow me on Twitter, Google+ or subscribe RSS

20 comments:

  1. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.

    big data training in chennai

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. exact replica watches, combining elegant style and cutting-edge technology, a variety of styles of replica omega speedmaster watches, the pointer walks between your exclusive taste style.

    ReplyDelete
  4. Have you ever played in an online casino? Maybe you think that this is all nonsense, but believe me, my friend is the real income that you simply can not imagine. cool roulette game Play and play again)

    ReplyDelete

  5. *This is the right blog for anyone who wants to find out about this topic. You realize so much its almost hard to argue with you . You definitely put a new spin on a topic thats been written about for years. Great stuff, just great!
    Digital Marketing

    ReplyDelete

  6. *Youre so cool! I dont suppose Ive read anything like this before. So nice to find somebody with some original thoughts on this subject. realy thank you for starting this up. this website is something that is needed on the web, someone with a little originality.

    Digital Marketing

    ReplyDelete
  7. Гибкая світлодіодна лента лучшая на рынке, я обычно покупа в Экодио, лучше не найти.

    ReplyDelete
  8. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. Buy Google Business Reviews,

    ReplyDelete
  9. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information... Buy Negative Google Reviews

    ReplyDelete
  10. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information... Buy Negative Google Reviews

    ReplyDelete
  11. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. Shopvochong24h do choi tinh duc cao cap

    ReplyDelete
  12. Hi,
    Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take data science training institute in btm. Because data science course in Bangalore is one of the best that one can do while choosing the course.

    ReplyDelete