Code Monkey home page Code Monkey logo

tntmaps's Introduction

Retail Data viz

This project was made for an ice-cream manufacturing company in Madhya Pradesh(India). It was done to give them a sense of regions where they could increase their presence, based on the popluation density of the region(reperented by shades of grey) and their coverage(existing outlets) in those areas(represented by green dots).

Check it out at https://stuti-43m.github.io/tntmaps/.

Overview

- The map has 2 levels. One which gives and overview of the entire state and the second where one can diver deeper into an area.

Sourcing the data

To begin with, I only had the geolocations for the existing outlets.

  • I downloaded the kml files to draw out the region boundaries on canvas.
  • I downloaded the population density data at a village and town level for the state from the census website of India.
  • I ran a nodejs script to read through the data to fetch the latitude and longitude data for these from the google maps api.
  • This script also allocates the the town/village into the regions present in the kml files and claculated the population of the region
  • A second script is used to identifiy which regions the exisiting outlets are in.

The final data file after running the script is an array of all the regions in the kml file. Below is the structure of an object in the file -

|-regionName
|-coordinates
|    [{
|       |-lat
|       |-lng  
|    }] 
|-totalUrbanPopulation
|-totalRuralPopulation
|-urbanList
|    [{
|       |-district
|       |-subdistrict  
|       |-town  
|       |-subdistrict  
|       |-population  
|       |-lat  
|       |-lng 
|    }]
|-ruralList
|    [{
|       |-district
|       |-subdistrict  
|       |-town  
|       |-subdistrict  
|       |-population  
|       |-lat  
|       |-lng 
|    }]
|-existingOutletsList
|    [{
|       |-lat
|       |-lng  
|    }]
|-existingOutletCount

Tools and Technology

I used Javascript, Google Polyfill and Google maps API to draw out the data on the canvas and make it interactive

tntmaps's People

Contributors

43-stuti avatar stuti-43m avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.