Skip to content

Performing DBSCAN on location-based social media data

Notifications You must be signed in to change notification settings

stko-lab/DBSCAN4LBSN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

DBSCAN4LBSN

Overall description

This program takes location-based social network (LBSN) data (point data), and performs two operations. One is DBSCAN which detects clusters based on point density; the other is concave hull which constructs polygons from point clusters. This program can be used to extract hotspots from location-based social media data, and can also reduce the dominating effects from active users. This program can achieve the following effect: DBSCAN and Concave Hull

A research project Urban Areas of Interest (AOI) has been developed based on this program, and can be accessed at: http://stko-exp.geog.ucsb.edu/urbanAOIs/

Repository organization

The "Source" folder contains the source java files, and the "Release" folder contains the compiled program as a zip file. You can unzip the file and directly use it in your project. An example data file has also been provided.

How to run the compiled program?

Open a cmd line in the current folder, and execute: "java -jar DBSCAN4LBSN.jar". To increase the allocated memory size, use "java -jar -Xmx2G DBSCAN4LBSN.jar". You will need Java 1.8 to run this program.

Input of the program: Location-based social network data in CSV format. The input data must contain three fields: "recordID", "x", and "y". If the input data also contain the id of the user, then "userID" can also be included. A sample of the input data can be found in the folder "Input".

The output of the program: the output is a EsriJSON file (called "result.json" in the same folder) which can be converted into Shapefile using the tool "json to features" in ArcGIS Toolbox.

Configuration file (config.json): This file is very important for running the program as it specifies the key parameters. Detailed explaination for each parameter can be found in the config.json file. The DBSCAN algorithm requires two parameters: eps and minPts, whose values need to be specified through some statistical analysis. Note minPts can be either an absolute value or a percentage. The concave hull algorithm requires a parameter lambda: a larger lambda results in smoother polygons while a smaller lambda results in more complex polygons. If you have questions with the parameters, please send me an email.

The "Temp" folder: this folder stores some temporary files generated in the middle of the process, such as the preprocessed file as well as the clustered result. If needed, such data can be imported into ArcMap using "add x y" to see the middle results.

Clustering based on users v.s. clustering based on points

One cool feature of this software package is that it allows you to cluster based on either social media users or the location points (note: the same user may post multiple social media records at the same or very close locations). To cluster based on the number of users, set the parameter "userIDIndex" in the "config.json" file as the corresponding column index of the user ID. In contrast, if you want the clusters to be formed based on only the number of points, you need to put -1 for "userIDIndex" (even if you also have user ids in your data).

Citation

If you use this program in your research, we would really appreciate if you could cite our following paper:

Y. Hu, S. Gao, K. Janowicz, B. Yu, W. Li, S. Prasad (2015): Extracting and understanding urban areas of interest using geotagged photos, Computers, Environment and Urban Systems, 54, 240-254. doi:10.1016/j.compenvurbsys.2015.09.001

Thanks!

About

Performing DBSCAN on location-based social media data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 97.4%
  • HTML 2.5%
  • Other 0.1%