Code Monkey home page Code Monkey logo

movie_graph's Introduction

README

This is a basic Rails app to experiment with a Neo4j graph database. It combines the IMDB rss rating service with the OMDB movie API to get data into the graph database.

Getting started

First, install a recent version of the Neo4j database on your computer, or use a cloud provider like Graphenedb (http://www.graphenedb.com/). For development, create a .env.development file and (only) add the Neo4j details that differ from the default .env file:

MOVIE_GRAPH_NEO4J_HOST=http://localhost
MOVIE_GRAPH_NEO4J_PORT=7474
MOVIE_GRAPH_NEO4J_USERNAME=neo4j
MOVIE_GRAPH_NEO4J_PASSWORD=neo4j

Importing movies and ratings: from IMDb RSS ratings feed

Find your own IMDB username and uid by visiting your IMDb ratings page. The url will look like http://www.imdb.com/user/{{user_uid}}/ratings?ref_=nv_usr_rt_4 You will have to make them publicly available to run the importers.

Run the rake task. Fill the username and user_uid in brackets and make sure there are no spaces.

rake importer:from_rss[username,user_uid]

If you have spaces in your username, put the whole rake command between double quotes (for example: rake "importer:from_rss[ryreitsma, ur8282058]") The rake task may take a long time depending on how many movies you have rated.

Importing movies and ratings: from IMDb ratings csv file

Visit the IMDb ratings page. Scroll down to end of the list, in the right bottom corner you will find a link 'Export this list'. Download the resulting CSV file and put it into the csv directory in the root of this application.

Run the rake task. Fill the username and filename in brackets and make sure there are no spaces.

rake importer:from_csv[username,filename]

If you have spaces in your username or in the filename, put the whole rake command between double quotes (for example: rake "importer:from_rss[ryreitsma,ryreitsma ratings.csv]") The rake task may take a long time depending on how many movies you have rated.

movie_graph's People

Contributors

ryreitsma avatar

Watchers

 avatar James Cloos avatar

movie_graph's Issues

Make imdb user_id and user_uid configurable

Instead of making these properties globally available by setting them in a .env config file, make them available as options when running the ratings and movies importer. Once the options are available, we can start importing more reviewers (thus, more movies) into the graph database.

Don't crash the import tasks when OMDB can't find a movie

Usually the OMDB will find all movies from the ratings xml file. However, if it doesn't, the importer should log the error and continue with the next movie. If however an unexpected result is returned (http error or other), it should stop the rake task.

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.