Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clhenrick/census-lehd-lodes-od
analysis of U.S. Census LEHD LODES Origin Destination data (https://lehd.ces.census.gov/data/#lodes)
https://github.com/clhenrick/census-lehd-lodes-od
Last synced: about 2 months ago
JSON representation
analysis of U.S. Census LEHD LODES Origin Destination data (https://lehd.ces.census.gov/data/#lodes)
- Host: GitHub
- URL: https://github.com/clhenrick/census-lehd-lodes-od
- Owner: clhenrick
- License: mit
- Created: 2018-09-21T00:41:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-01T00:12:40.000Z (over 6 years ago)
- Last Synced: 2024-11-09T12:48:33.517Z (3 months ago)
- Language: Jupyter Notebook
- Size: 943 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Analysis of Census LEHD LODES Origin Destination data
Part 1: determine census tracts with the highest number of workers living outside of the tract's county.## Running
Running `make` will download the LEHD data, run the Jupyter notebook, and join the processed data to 2010 census tract geometries.This assumes you have an python environment setup called `jobs_map_env` and have the `mapshaper` cli tool available globally. See [Environment Setup](#environment-setup) for more.
## Notebooks
To run the notebooks locally first activate the `conda` environment:```
source activate jobs_map_env
```Then do:
```
jupyter notebook
```## Data
Data sourced from:https://lehd.ces.census.gov/data/lodes/LODES7/ca/od/ca_od_main_JT00_2015.csv.gz
https://lehd.ces.census.gov/data/lodes/LODES7/ca/ca_xwalk.csv.gzThe LEHD origin destination data is very large so is not checked into this repo.
## Environment Setup
For using Python Pandas and GeoPandas for data processing.First, install [Miniconda3](https://conda.io/miniconda.html) and set up a Python virtual environment with dependencies.
```bash
# install miniconda, for more see: https://pandas.pydata.org/pandas-docs/stable/install.html
bash Miniconda3-latest-MacOSX-x86_64.sh# make sure to add conda to your PATH
export PATH="/Users/chrishenrick/miniconda3/bin":$PATH# create virtual env
conda create -n jobs_map_env python# activate env
source activate jobs_map_env# install pandas
conda install pandas# install pip
conda install pip# install shapely, geos, gdal
conda install shapely
conda install gdal# install geopandas
conda install -c conda-forge geopandas# install jupyter
python -m pip install --upgrade pip
python -m pip install jupyter# to deactivate the virtual env
source deactivate
```