GithubHelp home page GithubHelp logo

kgyhkgyh / renren-analysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liyuntao/renren-analysis

0.0 1.0 0.0 20.74 MB

a project which is used for crawler and data visualization on renren.com

License: MIT License

Java 100.00%

renren-analysis's Introduction

renren-analysis

a project which is used for crawler and data visualization on renren.com

Requirements

In order to run this project you will need to have installed:

  • JDK 1.8 or later
  • Maven (3.0+ recommended)

How to start

  1. 将工程导入 IDE
  2. 添加工程根目录下的 lib/gephi-toolkit.jar 至 dependencies
  3. 首次使用需填写账号信息至配置文件, 位于 resources/userinfo.properties
  4. 执行 Main.java 即可

Structure and Usage tips

  1. 工程主要分为两大块,绝大部分的类实现了一个爬虫。
  2. 并发方面使用 Akka 的 actor 模型; 爬虫部分使用 Apache HttpClient 配合 jsoup 进行页面抓取
  3. 执行爬虫task的API会进行爬取,生成一个 network.txt 文件在项目目录下
  4. Grapher类使用 gephi 实现了对数据的可视化展示
  5. 爬虫只需执行一次,后续的可视化可以由工具类读取本地已经保存的数据文件

Output

好友学校统计

暂时未实现

好友关系图

以JFrame的形式展示,并生成在headless_simple.pngheadless_simple.svg

文本格式的好友关系

network.txt中,是语言无关的,可以基于该文本做很多事情。其格式为

-Friend(uid, location, name, url)  // 1
--Friend(uid, location, name, url) // 2
--Friend(uid, location, name, url) // 3
...
-Friend(uid, location, name, url)  // 2
--Friend(uid, location, name, url) // 5

其中-代表是节点,--代表由之前-节点指向该--节点的边。比如在此例中,行1为一个节点,行2代表一个由行1节点指向行2节点的一条边。

renren-analysis's People

Contributors

liyuntao avatar

Watchers

 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.