Data-Driven Documentation for US Freight Networks

github repo

A data-driven documentation website focused on United States freight networks, including rail, shipping, intermodal freight, and natural gas infrastructure. This project integrates geospatial data, Jupyter Notebook analyses, and Sphinx-based documentation to provide a comprehensive overview and analysis of freight transportation.


Features

  • Interactive maps and analyses of freight transportation modes including rail, shipping, and intermodal facilities.
  • Integration of geospatial data in GeoJSON format.
  • Automated build and deployment scripts for generating and publishing HTML documentation.
  • Backup functionality for documentation builds using Dropbox API.
  • Sphinx-based documentation with support for notebooks (myst_nb), blogging (ablog), and bibliographic references.

Tech Stack

  • Python 3.5+ (with dependencies managed via requirements.txt)
  • Jupyter Notebooks for data analysis and visualization
  • Sphinx documentation generator with multiple extensions
  • Bash scripts for deployment and automation
  • Dropbox API for backup
  • Geospatial libraries: GeoPandas, Folium, Contextily

Getting Started

Prerequisites

  • Python 3.5 or higher
  • pip package manager
  • Dropbox account and API token (for backup functionality)
  • make utility

Installation

# Clone the repository
$ git clone https://github.com/justin-napolitano/freight-website-up-to-date.git
$ cd freight-website-up-to-date

# Install Python dependencies
$ pip install -r requirements.txt

# (Optional) For Rocky Linux or similar systems
$ pip install -r requirements_rocky.txt

Build Documentation

# Clean previous builds
$ make clean

# Build HTML documentation
$ make html

Deployment

# Deploy the built documentation to GitHub Pages
$ ./deploy.sh

Backup

Edit backup_html.py to insert your Dropbox API token, then run:

$ python backup_html.py

Project Structure

freight-website-up-to-date/
β”œβ”€β”€ acp.sh                  # Auxiliary shell script
β”œβ”€β”€ backup_html.py          # Script to backup built HTML to Dropbox
β”œβ”€β”€ chtml.sh                # Auxiliary shell script
β”œβ”€β”€ deploy.sh               # Deployment script to GitHub Pages
β”œβ”€β”€ deployz.sh              # Alternative deployment script
β”œβ”€β”€ doit.sh                 # Automation script
β”œβ”€β”€ install.sh              # Installation script
β”œβ”€β”€ label_list.py           # Script for reading and printing label data from pickle files
β”œβ”€β”€ Makefile                # Build automation
β”œβ”€β”€ pullit.sh               # Git pull helper script
β”œβ”€β”€ pushit.sh               # Git push helper script
β”œβ”€β”€ python_build.py         # Python build pipeline and dependency installer
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ requirements_rocky.txt  # Dependencies for Rocky Linux
β”œβ”€β”€ requirments.txt         # Possibly duplicate requirements file (typo)
β”œβ”€β”€ source/                 # Sphinx documentation source files
β”‚   β”œβ”€β”€ conf.py             # Sphinx configuration
β”‚   β”œβ”€β”€ index.md            # Main documentation landing page
β”‚   β”œβ”€β”€ parts/              # Documentation parts (freight, bibliography, etc.)
β”‚   └── ...
β”œβ”€β”€ todo/                   # Notes and TODOs
β”‚   └── todo.md             # TODO list
└── uninstall.sh            # Uninstall script

Future Work / Roadmap

  • Consolidate and clean up duplicate or redundant requirement files.
  • Enhance backup script to support incremental backups and error logging.
  • Expand documentation with more detailed freight network analyses.
  • Automate testing of build and deployment pipelines.
  • Improve README with usage examples and screenshots.
  • Integrate CI/CD for automated deployment on push.
hjkl / arrows Β· / search Β· :family Β· :tag Β· :datefrom Β· :dateto Β· ~/entries/slug Β· Ctrl+N/Ctrl+P for suggestions Β· Ctrl+C/Ctrl+G to cancel
entries 201/201 Β· entry -/-
:readyentries 201/201 Β· entry -/-