-
Clone this repo
git clone https://github.com/peijl1998/UrbanKit.git
-
For urban_kit_frontend (root_path = "xxx/urban_kit_frontend")
-
Get your BaiduMap token(AK) from https://lbsyun.baidu.com/apiconsole/key#/home
-
Fill the AK in the
index.html
andsrc/main.js
(indicated by ak:xxxx) -
install nodejs dependencies
npm install
-
start the frontend
npm run start
-
-
For urban_kit_backend (root_path = "xxx/urban_kit_backend")
-
install mongodb
apt install mongodb
-
install required python libs
pip install django pip install django-cors-headers pip install pymongo pip install geopy pip install torch torchvision fastdtw lightgbm
-
some operations on mongodb
# interactive mongodb mongo > use urbankit > db.createUser({user:"root",pwd:"123456",roles:[{role:"dbAdmin",db:"urbankit"}]})
-
some preparations
mkdir Config echo "{}" > ./Config/SI-AGAN.cfg
-
start backend
python3 manage.py runserver 0.0.0.0:8000
-
-
Start the service
-
assign the backend addr in
src/api/global_config.js
(like addr in "start backend" command) -
create
user_config.json
in the root path of repo (the path of user_config_example.json), fill in your mongodb config, like{ "mongodb": { "database": "urbankit", "user": "root", "password": "123456", "address": "127.0.0.1", "port": "27017" } }
-
upload the demo.csv and enjoy it:)
- NOTE: set attribute in the MapController at first.
- for interpolation model, you can upload the demo model in the
urban_kit_backend/UrbanModels/SI_AGAN/Generator.pth
-