Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

bluet/nearby-news

Repository files navigation

nearby-news

Keyword Cloud for your current location. A simple API service telling you what's hot near you.

A prototype system. NCNU BigData lecture project.

Data collecting:

  1. Parse article from news site. Extract data.
  2. Lookup it's location (x, y)
  3. Import to DB (RethinkDB)
  4. Build geospatial index (RethinkDB or Redis)

User Stream:

  1. Locate user (GPS, map center)
  2. Get radius (map size)
  3. Send location to server, get unsorted array of Entries { [Keywords], timestamp, source, etc}
  4. Build and show Keyword Cloud on map.
  5. Repeat.

Keyword Score

  • Algorithm: sum(1/timeDiff)
    • timeDiff = epoch(now) - epoch(timestamp)
    • score = 1 / (timeDiff / 86400 / 30)
  • Test data:
    • timestamp: random in 2007/1/1..2017/1/1
    • 10000 entries, each contains 20 keywords

Docs:

Nearby News API Server

Overview

Server template was generated by the swagger-codegen project. By using the OpenAPI-Spec from a remote server.

This server uses the Connect middleware layer for Node.js. This service uses RethinkDB Database.

Running the server

To run the server, run:

npm start

To view the Swagger UI interface:

open http://localhost:8080/docs

This project leverages the mega-awesome swagger-tools middleware which does most all the work.

About

Keyword Cloud for your current location.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages