Skip to content

A demo processing AIS data using Tinybird, Dash, Pandas, and Plotly

License

Notifications You must be signed in to change notification settings

tinybirdco/demo-ais

Repository files navigation

AIS Explorer template for Tinybird

The AIS Explorer template provides a graphical exploratory interface for automatic identification system (AIS) data.

Splash Image

For any given MMSI, the AIS Explorer shows the vessel's location over selected dates. You can represent location using latitude and longitude, or through H3. You can adjust the H3 resolution to show more or less detail.

Quick start

To deploy this template on Tinybird, click the following button:

Deploy to Tinybird

Then clone or fork this repository and deploy the data project to Tinybird.

  • Use noaa_uploader.sh to append as many of the zipped CSV files as you need to Tinybird for sample data.
  • Run app.py to have a local app to explore some of the shipping data. The default values should work.

Local deployment

To work on this project in your local environment, follow these steps:

  1. Clone this repository.
  2. Create a Python virtual env using python -m venv .venv && source ./.venv/bin/activate.
  3. Install the Python dependencies by running pip install -r requirements.txt.
  4. Open or create a Tinybird Workspace.
  5. Open the Tinybird Auth Token page and copy the User Admin Token.
  6. Run tb auth in the repo directory and paste the token.
  7. Run tb push to establish the backend processing structure and serve the data APIs.
  8. Use noaa_uploader.sh to append as many of the zipped CSV files as you need to Tinybird for sample data. Jan-May is about 1b rows. You might need jq installed: sudo apt-get update && sudo apt-get install jq -y --no-install-recommends or brew install jq for macOS.
  9. Run app.py to have a local app to explore some of the shipping data. The default values should work.

You can also stream in live AIS data following the same format.

Components

AIS Explorer uses Dash and Plotly for the map, Pandas for the frontend data processing, and Tinybird for the backend.

Dataset

The dataset comes from NOAA. It contains a few billion vessel observation samples from 2020.

Warning

NOAA provides this data for free, so don't abuse their download server.

Credits

Created by @Chaffelson, @juliavallina, @sdairs, and @rbarbadillo.

About

A demo processing AIS data using Tinybird, Dash, Pandas, and Plotly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published