Skip to content

Python2.7 script for generating heatmaps for any coordinate data using jjguy/heatmap python module.

License

Notifications You must be signed in to change notification settings

anapt/heatmaps-python2.7

Repository files navigation

Heatmaps in Python 2.7

Python script for generating heatmaps for any coordinate data using jjguy/heatmap python module.

Dependencies

If you want to create your own dataset from Mouse Movement data you need to install:

  • pymouse
  • time
  • csv

If you just want to test the code you need to install:

  • the Heatmaps module
  • pandas
  • Image

The generated heatmaps look like these

How to run the script

  • Before running the script, make sure you install the HEATMAP MODULE following the instructions on http://jjguy.com/heatmap/

    • You can also try pip install heatmaps
  • Then, make sure you have installed all the Dependencies

  • Open the calculator.py file and update the

    1. screen_width
    2. screen_height

    variables to those of your own system

Once everything is setup correctly run $ python heatmaps_release.py to try out the demo.

Creating a dataset

If you want to create your own dataset run $ python .datafiles/create/csv_file_creator.py. Your mouse movements will be logged on to a csv file in datafiles folder.

Genetating a heatmap from your custom dataset

In the heatmaps_release.py file in init_list method change the datafile variable to the PATH of your custom dataset. Then simply run the script.

Adding a custom image

In the heatmaps_release.py file in the merge_photos method change the picture variable to the PATH of the image you want to use.

Open the calculator.py file and update the

  1. pic_width
  2. pic_height

variables to those of your image.

Then simply run the script.

About

Python2.7 script for generating heatmaps for any coordinate data using jjguy/heatmap python module.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages