Git Product home page Git Product logo

dbscan4lbsn's Introduction

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, doi:10.1016/j.compenvurbsys.2015.09.001

Thanks!

dbscan4lbsn's People

Contributors

yingjiehu avatar

Watchers

James Cloos 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.