anyway.co.il - Crowd-sourced road hazard reporting website.
Also available at oway.org.il.
Feel free to contribute to the project.
To report bugs and feature requests, please open an issue on GitHub.
See also our Android app on GitHub.
The datasets Anyway uses are documented here:
See Code Directory Tree Structure.
Anyway's main goal is raising awareness of road accidents and act to avoid them, by showing road accidents with casualties over map.
The shown data based on reports supplied by the Israeli Central Bureau of Statistics (CBS) and real time reports from United Hatzalah of Israel.
Anyway is an open source project, sponsored by The Public Knowledge Workshop (“Hasadna”).
- We try to follow the process of other Hasadna projects, e.g. Open-Knesset.
- Please take a moment to read our "Contributing to ANYWAY" manifest.
- To see our GitHub issues in a nicer interface, take a look at HuBoard. Check out the Ready list to find a task to work on. The Backlog list there contains issues that are still not ready to be started. The Working list contains issues already started by developers (make sure to move your issue there once you start working on it), and the Done list contains completed issues that are waiting to be confirmed done and closed.
- Fork this repository on GitHub
git clone https://github.com/*you*/anyway
- Add the main repository as your upstream remote:
git remote add upstream https://github.com/hasadna/anyway
- Get updates whenever you start working:
git pull upstream dev
- Push to your fork when you've committed your changes and tested them:
git push
, and make a pull request from your fork on GitHub
You should be familiar with setting up Python in your computer. You can consult the wiki for platform specific tutorials. Developing by using a virtual environment is highly recommended.
sudo apt-get install python2-pip python2-dev libpq-dev
sudo dnf upgrade python-setuptools
sudo dnf install python-pip
sudo yum upgrade python-setuptools
sudo yum install python-pip
sudo easy_install pip setuptools
- Install postgresql:
brew install postgresql
(after installing brew)
- Activate your virtualenv (in case of using one):
source *env-name*/bin/activate
- Run
pip install -r requirements.txt -r test_requirements.txt
See the Wiki.
- Define connection string (needs to be defined whenever you start working):
- bash:
export DATABASE_URL='sqlite:///local.db'
- windows shell:
set DATABASE_URL=sqlite:///local.db
- First time, create tables:
python main.py init_db
- Optionally, get the complete accidents file after sending a permission request, and extract it into
/static/data/lms
. Otherwise, you'll use the example accidents file that you already got with the code, so no need to get it again. - Populate the data (markers etc.):
python main.py process_data
: this will take less than an hour if you're using the example files (default), but if you have the complete data it may take several days. Be prepared. - Populate United Hatzalah sample data:
python main.py import_united_data --light
for the complete, or more recent data please contact the Anyway team. - Run the app:
python main.py testserver
: do this whenever you start working and want to try out your code. - Navigate to http://127.0.0.1:5000 in your browser.
- If the site fails to load properly, make sure you have JDK installed on your machine
- If you wish to share your app on the local network, you can expose flask by running
python main.py testserver --open
(Please note that this would expose your machine on port 5000 to all local nodes)
It is useful to add the following to your ~/.bashrc
(fixing for the correct path):
alias anyway='cd *path*/anyway && workon anyway && export DATABASE_URL=sqlite:///local.db'
Then you can simply start working by running the anyway
command.
To run tests: pylint -j $(nproc) anyway tests && pytest ./tests
See DOCKER
See TRANSLATE