Please note that virtual environment is not mandatory; you can install project dependencies globally on your machine in case you find it suitable for you (see step 5).
git clone https://....
cd
into the repository rootpython3 -m venv env
env
which will be used to store dependenciessource env/bin/activate
on Unix or .\env\Scripts\activate
on Windowspip install -r requirements.txt
pip install ...
and then update the requirements file by issuing pip freeze > requirements.txt
deactivate
The env
directory is not supposed to be version controlled. Dependencies are managed through requirements.txt
file, and it's completely possible to opt out of virtual environment and just install dependencies globally. Please refer to the official virtualenv documentation for more information on how to use it.
As the task in the project is to investigate criminal activity and hotel reviews in London metropolitan area, we focus in London. Spatial clustering is part of the project, and requires dividing geographical areas in some manner for graphical representation of data on a map. We logically chose the post codes for that purpose; each post code district (or sector) is one area on the map. For that purpose, we need some GeoJSON files describing those areas. The following steps describes how this can be done.
.shp
files into GeoJSON
by using the ogr2ogr.sh script
python ../../geoutils/london_codes.py --in PostalArea.geojson --out ../geojson/london/PostalArea.geojson