Data Analysis of US Freight Networks with Freight.jnapolitano.io

github repo

freight.jnapolitano.io is a data-driven project focused on analyzing United States freight networks, including rail, shipping, and intermodal freight transport. The repository contains Jupyter notebooks, scripts, and documentation to support the exploration and visualization of freight infrastructure.


Features

  • Analysis and visualization of US freight networks, including rail, shipping routes, and intermodal facilities
  • Data processing and GIS mapping using geopandas, folium, and contextily
  • Automated build and deployment scripts for generating and publishing documentation
  • Backup and deployment automation via Dropbox API and GitHub Pages

Tech Stack

  • Python 3.5+ with libraries: pandas, geopandas, matplotlib, folium, contextily
  • Jupyter Notebooks with MyST markdown support
  • Sphinx documentation with extensions including ablog, myst_nb, sphinx_copybutton
  • Bash scripts for deployment and backup
  • Makefile for build automation

Getting Started

Prerequisites

  • Python 3.5 or higher
  • pip package manager
  • Dropbox account and API token (for backup script)
  • GitHub CLI (for deployment script)

Installation

Clone the repository:

git clone https://github.com/justin-napolitano/freight.jnapolitano.io.git
cd freight.jnapolitano.io

Install dependencies:

pip install -r requirements.txt

Usage

  • To build the HTML documentation:
make html
  • To deploy the built documentation to GitHub Pages:
./deploy.sh
  • To backup the HTML build folder to Dropbox:
python backup_html.py

Project Structure

freight.jnapolitano.io/
β”œβ”€β”€ acp.sh                # Shell scripts for various automation tasks
β”œβ”€β”€ backup_html.py        # Python script to backup build/html to Dropbox
β”œβ”€β”€ deploy.sh             # Script to deploy documentation to GitHub Pages
β”œβ”€β”€ install.sh            # Installation helper script
β”œβ”€β”€ label_list.py         # Script for reading and analyzing pickle files
β”œβ”€β”€ Makefile              # Build automation file
β”œβ”€β”€ pullit.sh             # Git pull helper script
β”œβ”€β”€ pushit.sh             # Git push helper script
β”œβ”€β”€ python_build.py       # Python script managing build pipeline
β”œβ”€β”€ requirements.txt      # Python dependencies
β”œβ”€β”€ requirements_rocky.txt # Alternative dependencies
β”œβ”€β”€ source/               # Source files for Sphinx documentation and notebooks
β”‚   β”œβ”€β”€ conf.py           # Sphinx configuration
β”‚   β”œβ”€β”€ index.md          # Documentation homepage
β”‚   └── parts/            # Documentation parts, including freight analyses
β”œβ”€β”€ todo/                 # Notes and TODOs
└── uninstall.sh          # Uninstall helper script

Future Work / Roadmap

  • Expand volumetric and network analysis of freight data
  • Integrate additional freight modalities such as trucking and air freight
  • Automate data updates and refresh workflows
  • Improve documentation coverage and examples
  • Refine deployment and backup scripts for greater robustness
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 -/-