This project aims to analyze urban perception using various data sources, including images, surveys, and academic papers. It employs machine learning techniques, natural language processing, and data visualization to extract insights about how people perceive urban environments.
The project is organized into several main directories:
src/: Contains the source code for the projectdata/: Scripts for data acquisition and processingfeatures/: Feature extraction and processing scriptsmodels/: Machine learning models and prediction scriptsvisualization/: Data visualization scripts
src/data/make_dataset.py: Main script for data preparationsrc/data/parse_data.py: Parses XML data from academic paperssrc/data/asr_csv2ris.py: Converts CSV files to RIS format for reference management
src/features/build_features.py: Extracts features from processed datasrc/features/openai_gpt4.py: Utilizes OpenAI's GPT-4 for text analysis
src/models/write_review.py: Generates literature reviewssrc/models/recalibrate.py: Recalibrates and improves aspect classificationsrc/models/predict_model.py: Makes predictions using trained models
src/visualization/visualization.R: Creates various visualizations including word clouds, heatmaps, and bar plots
- Clone the repository
- Install the required dependencies (list them or refer to a requirements.txt file)
- Set up environment variables:
- Create a
.envfile in the project root - Add the following variables:
OPENAI_API_KEY=your_openai_api_key ELSEVIER_API_KEY=your_elsevier_api_key INST_TOKEN=your_institution_token
- Create a
-
Data Preparation:
python src/data/make_dataset.py -
Feature Extraction:
python src/features/build_features.py -
Model Training and Prediction:
python src/models/predict_model.py -
Visualization: Run the R scripts in
src/visualization/to generate various plots and charts.
This project is licensed under the MIT License - see the LICENSE file for details.
For more information, please refer to the paper: Understanding urban perception with visual data: A systematic review.
Citation:
@article{ITO2024105169,
title = {Understanding urban perception with visual data: A systematic review},
journal = {Cities},
volume = {152},
pages = {105169},
year = {2024},
issn = {0264-2751},
doi = {https://doi.org/10.1016/j.cities.2024.105169},
url = {https://www.sciencedirect.com/science/article/pii/S0264275124003834},
author = {Koichi Ito and Yuhao Kang and Ye Zhang and Fan Zhang and Filip Biljecki}
}