Code Monkey home page Code Monkey logo

city-dynamics's Introduction

City dynamics

Gaining and presenting insights regarding crowdedness in Amsterdam. How many people are where, at what moment?

Collaborators: Jerome Cremers, Rene Luijk, Swaan Dekkers, Thomas Jongstra, Stephan Preeker


Create a local environment named venv inside the city-dynamics project directory, and activate it. Exiting a virtual environment can be done using deactivate.

virtualenv --python=$(which python3) venv
source venv/bin/activate

Install required packages.

pip install -r importer/requirements.txt
pip install -r analyzer/requirements.txt
pip install -r api/requirements.txt

Create database

docker-compose build database

In a new window, run the database, and keep it running.

docker-compose up database

In order to connect to the object store, you need to store the password in an environment variable.

export EXTERN_DATASERVICES_PASSWORD="password"

Build the importer. This does not yet download any data from the objectstore.

docker-compose build importer

Download the data from the objectstore, store it in a folder /data within the container, and write it to the (locally running) database.

docker-compose up importer

The database is now filled with data and can be queried.


To get the front end working, the analyzer, api and front containers should be built and activated in Docker. This can be done with the following commands:

docker-compose build analyzer
docker-compose build api
docker-compose build front
docker-compose up analyzer
docker-compose up api
docker-compose up front

To combine all building and activation steps at the same time, we can also run:

docker-compose build
docker-compose up

The front end of the application can now be visualized locally by opening front/index.html in a browser.

Additional info for developers

To add a new data source, make sure it is present in the root directory of the objectstore and configure sources.conf. Create a parser function in parsers.py and call this function 'parser_x', where 'x' needs to be replaced with the name of the data source, stated between square brackets in sources.conf.

city-dynamics's People

Contributors

dolhuis avatar jeromecremers avatar jongstra avatar luijkr avatar spreeker avatar swaandekkers avatar wimbuh 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.