Skip to content
Mazi Boustani edited this page May 6, 2016 · 21 revisions

Welcome to the Khooshe wiki!

About Khooshe:

Khooshe is for visualizing Big Data Points (GeoSpatial points data (latitude and longitudes)). It is defined to be independent of how small or big the data is.

Instalation:

Install Khooshe if only going to use run_khooshe function inside your own program, otherwise no need to install it and follow next section ("How it works")

pip install Khooshe

How it works:

  1. gets all point data (latitude and longitude)
  2. finds some cluster from all points
  3. finds center of each cluster (centroid)
  4. store all centroid as one layer
  5. classifies points belongs to each centroid
  6. repeat steps 2 to 5 till there are no more centroid available
  7. stores actual points data as a layer

Requirements

  1. Install gfortran and libatlas-base-dev. For mac users libatlas-base-dev is not required as it must be there already. You can install gcc through brew to get fortran compiler - brew install gcc --without-multilib
  2. Install scipy - pip install scipy
  3. Install numpy - pip install numpy

How to use Khooshe:

  1. Make sure you installed requirements
  2. Check in code by "git clone https://github.com/MBoustani/Khooshe.git"
  3. Copy Sample Points to the Khooshe folder
  4. Run the Khooshe.py
  5. After processed finished successfully, copy the 'tiles' folder to 'Visualizer/static' folder
  6. Open the 'Visualizer/khoose_visualizer.html' with webserver (e.g. https://pypi.python.org/pypi/pyserve)
  7. Another version offers khooshe integrated with Openlayers 3. Open 'Visualizer/khooshe_openlayers.html' using same server

##Note: If you are using your data points, the format should be CSV file with Latitude in first column, Longitude in second column and popup content in 3rd column, see example Sample Points

Integrating with other openlayer apps

You can integrate khooshe on your openlayer 3 app using below code

		// Initialize khooshe with instance of OL map
		khooshe.init(map)
		// Initialize Khooshe default layer
		khooshe.initKhoosheLayer()
		// Initialize a Khooshe layer on a different base tile folder
		khooshe.initKhoosheLayer('static/tiles_sample/','yellow')

openlayer docs

  1. Use khooshe.DEBUG = true for console logs
  2. khooshe-ol supports openlayer popups. By default they are not displayed but you can turn the feature on by khooshe.init(map, true)
  3. khooshe-ol also allows custom popups. khooshe-ol adds new field popup_content while populating ol.Feature. You can disable default popups and add your own event. See sample code at https://github.com/MBoustani/Khooshe/blob/master/Visualizer/static/js/khooshe-ol.js#L19

##Demo-OpenLayer ##Demo D3