GithubHelp home page GithubHelp logo

jsong022 / hashtag-gmap-rails Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.56 MB

Displays hashtags based on location searched on a map

Ruby 60.74% JavaScript 1.64% CSS 2.14% HTML 34.96% CoffeeScript 0.52%

hashtag-gmap-rails's Introduction

hashtag-gmap-rails

version 1.0.0

github.com/jsong022/hashtag-gmap-rails

Info about application

Using:
  • Ruby 2.3.0
  • Ruby on Rails 4.2.6
  • Apache Cassandra 2.1.14
  • cassandra-driver 2.1.6
  • Google Maps Javascript API
Relevant Files:
  • Gemfile
    • list of Ruby gems used by this application
  • config/application.rb
    • contains require statements that applies to this application
    • also contains CassandraClient class definition
      • Ruby class using Datastax Cassandra driver for Ruby (cassandra-driver gem)
  • config/routes.rb
    • contains Ruby On Rails routes from address to controller action
    1. / => pages#home
    2. /heatmap => pages#heatmap
    3. /search => pages#search
  • app/controllers/pages_controller.rb
    • contains the 3 controller actions: home, search, heatmap
    1. home - homepage (just a map with the input boxes)
    2. search - search for most popular hashtag of location with or without date
    3. heatmap - create heatmap of all coordinates of a hashtag for a date
  • app/views/pages/home.html.erb
    • view for the pages#home action
  • app/views/pages/heatmap.html.erb
    • view for heatmap of hashtag for date
  • app/views/pages/search.html.erb
    • view for search of database for a location with or without a date

Functionalities:

  1. Search Cassandra database for locations
  • For Invalid Searches: redirect to homepage
    1. Location field was left empty
    2. Date was not in YYYY-MM-DD format
    3. Query returned no database records
  • For Valid Searches:
    1. Date field was empty:
    • Return up to 5 records, most recent first
    1. Date field was not empty:
    • Return that day's most popular hashtag for the location
    • Put red circles on coordinates where the MPH was found
      • on click: show coordinate
  1. Create heatmap of a hashtag for a date
  • For Invalid Searches: redirect to homepage
    1. Hashtag field was empty
    2. Date field was empty
    3. Date was not in YYYY-MM-DD format
    4. Query returned no database records
  • For Valid Searches:
    1. Get all records of the hashtag for the date specified
    2. Create heatmap from the coordinates

To Do List

  • Load a map on page
  • Put a static marker & info box on map
  • Geocode locations
  • Static SQL query & result handling (NOTE: binds to localhost MySQL server)
  • Dynamic SQL query based on location search
  • Search by Location AND Date
  • Switch from MySQL to Cassandra (NOTE: still binds to Cassandra server at localhost)
  • Alert pop-ups
  • Mark coordiantes of hashtags found for single day searches
  • Create heatmap of a hashtag for a date
  • Click coordinate markers to show coordinate for single date searches
  • Multiple locations & dates in a single search *
  • Remote database *
  • Proper deployment to be publicly accessible *

* Possible Future Implementation (no immediate plans)

hashtag-gmap-rails's People

Contributors

jsong022 avatar

Watchers

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