Coder Social home page Coder Social logo

jvicens / housing-dilemma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citizensociallab/housing-dilemma

0.0 0.0 0.0 0 B

Participatory experiment designed and implemented to be performed in the framework of BiblioLab (Ciència i Acció Ciutadana), a co-created citizen science project with public libraries of Barcelona. It presents a dilemma that studies a common social concern how we behave in front of a situation of rent a house and how our decisions affect the market and, therefore, to the others.

License: Other

Python 34.66% CSS 18.13% JavaScript 9.97% HTML 37.24%

housing-dilemma's Introduction

README

CitizenSocialLab: Housing Dilemma

Experiment designed and implemented to be performed in the framework of BiblioLab (Ciència i Acció Ciutadana), a co-created citizen science project with public libraries of Barcelona.

This participatory experiment presents a very common dilemma that studies how we behave in front of a situation of rent a house. The participants (6) have to rent a house in a period of 12 months, they have to decide whether the market price is acceptable or not. Their decisions affect the market and, therefore, to the other participants. This experiment tests different treatments with or without public intervention, with varied endowments and/or initial market prices.

Note: This experiment is performed in groups of 6 participants.

Data

Not available

Derived Scientific Publications

Not available

Configuration

Steps are necessary to get Housing Dilemma install, up and running in the local network.

Creation of the project

Experimental Variables Modify the file vars.py with the experimental settings:

  • INCREMENT = 5 (increment or decrement of price in each month)
  • MUNICIPI = 'Barcelona' (municipality, experimental public space)
  • HOUSING_PRICE = 1000 (rental price per month in the municipality)
  • ENDOWMENTS_EQUAL = [2000, 2000, 2000, 2000, 2000, 2000] (equal endowments for the six partcipants)
  • ENDOWMENTS_UNEQUAL = [1600, 1800, 2000, 2000, 2200, 2400] (unequal endowments for the six partcipants)
  • LIMIT_HIGH = 1300 (upper limit of the rental price per month)
  • LIMIT_LOW = 700 (lower limit of the rental price per month)
  • SUBSIDY = 47.66 (subsidy in case of participant can afford the rental -limit low- )
  • TAX = 9.53 (tax to other participant to finance subsidy)

Database MySQL
Create MySQL database: name_db
Create user database: user_db
Create password database: pass_db

Introduce this information about the database in: /Housing-Dilemma/settings.py

Environment
mkvirtualenv housing

Requirements
pip install -r requirements.txt

MongoDB
mongod --dbpath /.../Housing-Dilemma/ddbb

Load text
File with text and translations: /.../Housing-Dilemma/game/i18n/translations_code.xlsx

python excel_to_mongodb.py code

Run Server
python manage.py runserver localhost:port

Migrations
python manage.py makemigrations
python manage.py migrate

Run project in Local

Step 1: Run MySQL server
Run MySQL: mysql.server start

Step 2: Open terminal tabs and work on the environment

in Tab 1: MongoDB
in Tab 2: MySQL
in Tab 3: Run Application

Work on environment (in each terminal tab): workon housing

Step 3: Run MongoDB (Tab 1)
Run mongodb: mongod --dbpath /.../Housing-Dilemma/ddbb

Step 4: MySQL actions (Tab 2)

Directory: cd /.../Housing-Dilemma/
Database: mysql -u user_db -p (pass_db)

Drop database (if name_db exits): drop database name_db; Create database: create database name_db;
Exit: exit;

Modificate fields of database: python manage.py makemigrations
Refresh database: python manage.py migrate

Step 5: Load texts (Tab 2) Load translations: python excel_to_mongodb.py code

Step 6: Run Server (Tab 3)
Directory: cd /.../Housing-Dilemma/
Runserver: python manage.py runserver localhost:port

Access client

Client application:
http://localhost:port/

Control and Administration:
http://localhost:port/admin

Versions

Version 1.0

License

CitizenSocialLab | Housing Dilemma (c) by Julian Vicens

CitizenSocialLab | Housing Dilemma is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

You should have received a copy of the license along with this work. If not, see CC BY-NC-SA license

Contributors

Julián Vicens

Contact

Julian Vicens: [email protected]

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.