This repository contains Python scripts that implement trajectory privacy preservation techniques using differential privacy. The goal is to protect sensitive trajectory data while enabling useful analysis at a broader level. This code is part of the accompanying source code for the publication titled "Privacy-Preserving Multi-Agent Marine Data Collection via Differential Privacy" published to the Oceans 2023 Gulfcoast conference proceedings.
- Python 3.x installed on your system
- Required Python packages (Install with
pip install -r requirements.txt): matplotlib,scikit-learn,similaritymeasures,shapely,numpy,pandas,fastdtw,cartopy,GDAL
Installing GDAL and Cartopy packages on Windows is complicated, for higher chances of success please do the following:
-
Download and install Visual C++ Build Tools: https://visualstudio.microsoft.com/visual-cpp-build-tools/
-
Download precompiled GDAL Wheel:
-
Install GDAL wheel with PIP:
pip install package-name.whl -
Install Cartopy from github with PIP:
pip install git+https://github.com/SciTools/cartopy
-
Clone this repository to your local machine.
-
Install the required Python packages by running
pip install -r requirements.txt. -
Run 'cluster_and_plot_air_boat_trajectories.py' to analyze in-situ data collected by our low-cost airboat USVs.
-
Run 'cluster_and_plot_ushant_ais_trajectories.pu' to analyze trajectories downloaded from the public Ushant AIS dataset.
Both scripts do the following:
-
Reads datasets in the 'in' directory
-
Adds Laplacian noise to the GPS coordinates of trajectories.
-
DBSCAN clustering based on the noisy GPS coordinates.
-
Uses the DTW algorithm to select representative trajectories for each cluster.
-
Adjust the privacy parameter (epsilon) in the scripts to control the level of privacy protection.
-
Outputs Charts to the 'out' directory
- Low-cost airboat USVs(https://github.com/AdmiralCrow/airboat_oceans_2023)
- Ushant AIS Public Dataset(https://github.com/rtavenar/ushant_ais)
This project is licensed under the MIT License.