Skip to content

Voveriukas/BigDataAssignment2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AIS Vessel Route Visualiser

A Streamlit web application packaged in Docker that visualises Baltic Sea vessel routes from AIS tracking data.

Docker Hub image: voveriukas/ais-visualiser:latest


Project overview

The app allows users to search for a vessel by name or MMSI, select a date range, and view its route on a Folium map. Vessel metadata is displayed alongside the map.

AIS data comes from the Danish Maritime Authority (http://web.ais.dk/aisdata/) and covers Class A vessels in Danish and Baltic Sea waters. The data is stored in a MongoDB instance on a remote VM. The app retrieves only the pings for the selected vessel and time range, which keeps performance stable even with large datasets.


How to run

Pull and run directly from Docker Hub:

docker pull voveriukas/ais-visualiser:latest
docker run -p 8501:8501 voveriukas/ais-visualiser:latest

Then open http://localhost:8501 in your browser.


How the Docker image was built

1. Write the application

app.py is a Streamlit application that connects to MongoDB, loads the vessel list for the dropdown, fetches pings for the selected vessel and date range, and renders the route on a Folium map.

2. Create requirements.txt

Lists the exact package versions the app depends on:

streamlit==1.43.0
folium==0.19.4
streamlit-folium==0.25.0
pymongo==4.10.1
pandas==2.2.3

3. Write the Dockerfile

FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY app.py .

ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0

EXPOSE 8501

CMD ["streamlit", "run", "app.py"]

FROM python:3.11-slim - starts from an official minimal Python 3.11 image.

WORKDIR /app - sets the working directory inside the container.

COPY requirements.txt then RUN pip install - dependencies are installed before copying the app code.

ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 - by default Streamlit binds to localhost inside the container, making it unreachable from outside. This binds it to all interfaces so the port mapping works.

CMD ["streamlit", "run", "app.py"] - the command that runs when the container starts.

4. Build the image

docker build -t voveriukas/ais-visualiser .

5. Test locally

docker run -p 8501:8501 voveriukas/ais-visualiser

Opened http://localhost:8501 and verified the vessel dropdown loads and routes display correctly.

6. Push to Docker Hub

docker login
docker push voveriukas/ais-visualiser:latest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors