GithubHelp home page GithubHelp logo

citylifepatterns's Introduction

CityLifePatterns

#General This repository is the basis of a new feature for the CityLife / Vikingspots API build for VikingCo during open Summer of code.

##Backend This repository contains all scripts to include a feature which returns relevant VikingSpots based upon your last checkin. It does so by making tuples (checkin, next checking) and counting the amount of times that occures.

((checkin, next checkin), count)

Another script can be used (but isn't at the moment) to grab the 5 highest counts for each checkin. The API can grab the x highest counts for a checkin of choise, or it can use the table created by the second script to just get 5 of them really fast.

Future development will enable the API to use weights as well as counts. The weight algorithmn needs to be tweaked in order to make it really relevant. This however will not be handled during oSoc13 due to a lack of time.

##Frontend Though the primary goal was the backend, we took the time actually do something with it. in src/extension you will find an unpacked chrome extension that will enable you to add our feature to the CityLife WebApp that can be found at: https://web.citylifeapp.com (warning: the extension doesn't use https for the time being)

The extension will add a button to every SpotDetail which allows the user to see "what's up next". Clicking this button will make the api return the probable next spots out of the API.

To make sure we don't break the flow of the webapp, we've choosen to pull some hackerish tricks:

  • we can't know when the ajax request ends, so we use a timeout (for now) to include the buttons on the pages
  • we can't trigger the new page animation from the extension, so we make it go to an error page and substitute the content of that page
  • In the future we'd like to change the static timeout to a loop

##Legal open Summer of code is an initiative of OKFN Belgium. All code written inside this repository is owned by OKFN Belgium.

Author rights go to:

  • Linsey Raymaekers
  • Wouter Vandenneucker

#Technology From the CityLife API until the extension we've got an "n tier"-architecture. Every tier uses different technologies to ensure speed and stability. We'll list those technologies so you have an idea why some choises where made

  • The CityLife data is stored using Redis "key value storage"
  • The CityLife API is written in Python and uses Django as a framework
  • Our "Nightly batch script" is written in Python as well.
  • The data from the batch script is stored in a mySQL database because of it's convience. Though converting it to redis might be a good idea in the future
  • Our API is build with Python and Django

On the frontend side of things, we've got:

  • A webapp using both CoffeeScript, Zepto and Backbone
  • Our extension uses JQuery and Chrome.extension api's

#Repo BuildUp The repo consists of 3 main folders:

  • Wireframes
  • Src
  • tools

##Tools The tools section is the least interesting one, it just contains the scripts we used to convert the Redis databasedump to a json file. Converting it to a json made sure we didn't need to run Redis all the time (our notebooks can't handle it).

##Wireframes The wireframes are flowcharts of our code. The in and outs as described above, just more easy to understand than my rambling.

##Src

  • This contains everything of importance the code/modules folder contains all functions and settings needed to make the scripts work
  • Frontend contains our API frontend (using Django).
  • extension contains an unpacked chrome extension which enables the API functions in the webapp

#Usage Will be added later

citylifepatterns's People

Contributors

woutervddn avatar dive-michiel avatar

Watchers

Pieter Colpaert avatar Jan Vansteenlandt avatar Steven Reekmans avatar James Cloos avatar Thomas avatar  avatar Nik Torfs avatar Michael Vanderpoorten avatar Linsey R avatar Mathias avatar Sven Lenaerts avatar

citylifepatterns's Issues

Start using issues

Use GitHub issues to define milestones and features left to be implemented

Update README

Update the README with well formatted markdown to explain the project and how to install/use or test it.

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.