GithubHelp home page GithubHelp logo

gogogon's Introduction

Gogogon

Gogogon is system for consuming the 1.USA.Gov click feed and generating daily rankings of 1.USA.Gov URLs.

The origin of gogogon is a todder's pronunciation of "octagon".

Output

Gogogon produces daily JSON and CSV files aggregated by the global hash.

The JSON file is an array of objects, one object for each short link. The structure of the objects is,

  • u: URL
  • title: page title
  • global_clicks: daily click count
  • agency: e.g., nasa.gov
  • global_hash: bit.ly global hash

JSON sample output

The CSV file has the same content in comma-separated values. The structure is,

Long URL,Page Title,Clicks,Agency Domain,Global hash

CSV sample output

Processes

  • consumer.py continuously reads the feed and writes daily logs of all clicks
  • ranks.py daily reads the previous day's log file and generates the output files

Requirements

This distribution comes with support for pip and virtualenv in order to isolate the python packages in a virtual environment. See http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/ for more deail on how and why this is a good idea.

Run the 'bootstrap.sh' command to get the virtual environment set up:

virtualenv --no-site-packages --distribute ve
source ve/bin/activate
pip install -r pip-requirements.txt

To start supervisord within the virtual environment you may need to start a subshell command of the form:

(. ve/bin/activate; export PATH=$PATH:.; supervisord -c supervisord.conf )

This will activate the virtual environment in the subshell, add the CWD to the path, and start supervisord.

Licence

(The MIT License)

Copyright © 2011 Measured Voice

Copyright © 2011 Blackstone Technology Group

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.