Spatio-Temporal Tag and Photo Location Clustering for generating Tag Maps
Tag Maps are similar to Tag Clouds, but Tag Maps use the spatial information that is attached to geotagged photographs, in addition to tag frequency, to visualize tags on a map. This Library uses the single-linkage tree that is available from HDBSCAN to cut trees at a specific user-defined distance for all available tags in the given dataset. Afterwards, Alpha Shapes are generated as a means to 'soft' placement of tags on a map, according to their area of use. Two Shapefiles are generated that can be used to visualize maps, for example, in ArcGIS.
- Please be advised: This repository contains, in its current form,
- Python code that is very difficult to read or contribute to.
- I intend to put more work into structuring code ...as soon as more time is available.
- The easiest way for Windows users is to download the Pre-compiled build that is available here (315MB!) and run
generateTagClusters.exe
- you can also compile the program yourself using the
setup.py
with cx_Freeze: runpython cx_setup.py build
- or simple run
generateTagClusters.py
if you have Python and all dependencies installed
- you can also compile the program yourself using the
- Place geotagged photo data in
/01_Input
subfolder- example files/format are available in the Pre-compiled build zip-file above
- Output files will be saved in
/02_Output
(2 Shapefiles in WGS1984 projection, one containing all Tag Cluster and one with the Photo Location Clusters) - Visualize Shapefiles using ArcGIS (I haven't tried other GIS Software such as QGIS, but it should theoretically be possible..)
- download
BasemapLayout_World.mxd
from resources folder and replace missing links with 2 resulting Shapefiles in/02_Output
- adjust minimum and maximum Font Sizes, Weighting Formula or other metrics to your needs. There are two Power Point files available which explain the complete process: Tag Clustering and Photo Location Clustering
- download
At the moment, the code is pretty messy. I wrote this in less than a week, without any other contributors in mind. I will work on this when there's more time available..
- Check out this album on Flickr with some more Tag Maps examples
- There's also an semi-interactive interface to explore some Tag Maps here
- Check out my blog here with some background information
- todo: future goals, extending scope of program beyond Flickr photo data (include Twitter & Instagram, for example)
This project includes and makes use of several other projects/libraries/frameworks:
Alpha Shapes Kevin Dwyer/ Sean Gillies
Generating Concave Hull for Point Clouds
HDBSCAN McInnes, J. Healy, S. Astels - BSD licensed
A high performance implementation of HDBSCAN clustering.
Manipulation and analysis of geometric objects
Simple shapes for point clusters are generated using SciPy's excellent Convex Hull functions
GNU GPLv3
2018-01-31: TagMaps v0.9.2
- Because Tag Maps can be generated from local to regional to continental scale, finding an algorythm that fits all was not straight forward. The current implementation will produce shapes for all of these scales without any user input.
- This Final Alpha Shape Implementation is motivated from Kevin Dwyer/ Sean Gillies great base code
- Implementation of Auto-Projection from Geographic to Projected Coordinate System. The code will select the most suitable UTM Zone for projecting data.
2018-01-17: TagMaps v0.9.1
- First build
- Initial commit, still lots of unnecessary comments/code parts left in code