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