GithubHelp home page GithubHelp logo

simudream / lookingglass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from transparencytoolkit/lookingglass

0.0 2.0 0.0 399.79 MB

Search tool for any JSON data

Home Page: https://transparencytoolkit.org/tools/

License: GNU General Public License v3.0

Ruby 68.73% HTML 16.83% JavaScript 4.05% CSS 10.40%

lookingglass's Introduction

LookingGlass

Search, filter, and browse any JSON data. Includes full text, categorical data, and search interface with elasticsearch backend. Work in progress.

Installing

  • Make sure you have elasticsearch and rails 4 installed
    • On Mac OS do the following
    • On Debian / Ubuntu
      • Install dependencies sudo apt-get install ruby-full
      • Install ElasticSearch using package manager or 1.5.2 docs
    • On Fedora
      • Install dependencies sudo yum install make automake gcc gcc-c++ kernel-devel ruby-devel rubygem-railties
  • Clone repo git clone --recursive [email protected]:TransparencyToolkit/LookingGlass.git
  • Then cd into directory cd LookingGlass
  • Install Ruby dependencies bundle install
  • Generate simple form data rails generate simple_form:install

Configuring

  • Browse to the dataspec directory cd app/dataspec/
  • Copy the example config file instances/example-config.json to instances/your-config.json
  • Add any additional dataspec files to your-config.json file by adding to Dataset Config array
  • Edit importer.json attribute Instance Config to your config app/dataspec/instances/your-config.json

You might want do add custom data related things to your instance as well. LookingGlass use datapackages for this goal such as month-names for internationalization!

Adding Datasets

This search should work for any JSON based dataset. If you want to add a dataset, see the app/dataspec folder for the necessary files. You will need to create your own dataspec-template package.

  • Prepare and save your data somewhere on your machine
  • Either create a dataspec for it based on datapec-template or use existing
  • Modify your config.json file to include additional datasets

Running LookingGlass

  • Then start up ElasticSearch
    • On Mac Os type elasticsearch
    • On Debian / Ubuntu installed via packages type /etc/init.d/elasticsearch start o
    • On Debian installed 1.5.2 go to elasticsearch-1.5.2/bin/ and type ./elasticsearch
    • On Fedora type sudo systemctl start elasticsearch.service
  • Then type rails runner 'IndexManager.import_data(force: true)' when importing / updating datasets
  • Start up the app rails server
  • Then access http://0.0.0.0:3000 in your browser

For Running In Production

  • Compile your assets rake assets:precompile

Developing

We would love your help and contributions improving upon LookingGlass. You can also customize how LookingGlass looks with a custom theme. To do either, first get a working instance setup on your development machine, then check out the following:

lookingglass's People

Contributors

bnvk avatar shidash avatar

Watchers

 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.