Giter Site home page Giter Site logo

data-filtering-interface's Introduction

Data cleaning interface

A simple interface for cleaning/filtering out data (particularly videos).

Organization

  • index.html contains the html page that will be displayed when you visit the app
  • script.js contains the JavaScript that will be loaded onto this html page
  • The directory server contains the files that will be used to serve this code
  • server.py runs the server
  • save_data.py contains helper functions for saving data

Detailed instructions for getting started with Heroku

  1. (optional) Try out the server locally. This will help you understand what's going on and make sure everything is working.
  • Set up a new virtualenv or conda environment. Install the dependencies from requirements.txt.
  • Run the server by running python3 server/server.py and go to the following url to see the front-end: localhost:8000
  • If you want to test saving some data locally, you can change the variable SAVE_METHOD in the file server/server.py to SaveMethod.LOCAL. This will save your responses to the folder server/data. Try submitting something and check that it was saved in the correct format.
  1. Now let's put the app on the internet. We'll use Heroku because it's free and easy-to-use. Create a free Heroku account: https://www.heroku.com/
  2. Create a Heroku app and push this code to it. (Check out these instructions.
  3. In order to store data from your Heroku app, you'll need to setup a proper database instead of just the filesystem (Heroku automatically deletes files from the filesystem after a certain period). Make an account on mLab, which provides a MongoDB database with some amount of free storage in the cloud. Create a database with a collection called data.
  4. In order for your app to use your mLab database, make the variable SAVE_METHOD in server/server.py is set to SaveMethod.MONGO (should be set to this by default). You will also have to set an environment variable named MONGO_URI which you can use to access your database. See the function save_mongo in server/save_data.py to see how this is used. For more help setting up your database properly, see the mLab documentation on connecting and the pymongo documentation. You will also need to set an environment variable in Heroku.
  5. Test your app on Heroku and make sure that when you submit a new piece of data, you can see it in your mLab database.

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.