Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download 2018 data, remove classes that have been copied to R5 #16

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# seamless-census

Import US Census data into a seamless storage environment.
Download US Census data for use in a seamless storage environment.

Java main classes for loading/extracting these data have been moved to [r5](https://github.com/conveyal/r5) and a gradle (as opposed to maven) build system.

## Usage

Expand All @@ -18,17 +20,16 @@ The command below, for instance, would download data for the greater Washington,

### Load data

Use the same temporary directory
you used above. If you omit the s3 bucket name, it will place the tiles in the `tiles` directory in the temporary directory.
Load data using a built r5 .jar (e.g. v6.2.jar). Use the same data directory you used above. If you omit the s3 bucket name, it will place the tiles in the `tiles` directory in the temporary directory.

JAVA_OPTS=-Xmx[several]G mvn exec:java -Dexec.mainClass="com.conveyal.data.census.CensusLoader" -Dexec.args="temporary_dir s3_bucket_name"
java -Xmx30G -cp v6.2.jar com.conveyal.data.census.CensusLoader data lodes-data-xxxx

### Extract data

Now for the fun part. The following command will extract the data stored in the s3 bucket specified, using the bounding box specified,
to the geobuf file out.pbf.

JAVA_OPTS=-Xmx[several]G mvn exec:java -Dexec.mainClass="com.conveyal.data.census.CensusExtractor" -Dexec.args="s3://bucket_name n e s w out.pbf"
java -Xmx30G -cp v6.2.jar com.conveyal.data.census.CensusExtractor s3://lodes-data-xxxx n e s w out.pbf"

## Data storage

Expand All @@ -45,7 +46,9 @@ We have already loaded LODES data from 2013, 2014, 2015, and 2017 in the S3 buck
These buckets and their contents are publicly readable and requester-pays (i.e. accessing them will incur fees on your AWS account).
The 2013 data lack Massachusetts, and uses 2011 data for Kansas, due to data availability.
The 2014 and 2015 data do not have these problems.
The 2017 data exclude federal employees and use 2016 data for Alaska and South Dakota. See LODES Technical Documentation for details.
The 2017 data exclude federal employees and use 2016 data for Alaska and South Dakota (see [LODES Technical Documentation 7.4](https://lehd.ces.census.gov/data/lodes/LODES7/LODESTechDoc7.4.pdf))
The 2018 data use 2016 data for Alaska WAC. (see [LODES Technical Documentation 7.5](https://lehd.ces.census.gov/data/lodes/LODES7/LODESTechDoc7.5.pdf))


## Use in Conveyal Analysis

Expand Down
6 changes: 3 additions & 3 deletions downloadData.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ def retrieve(url, path):
# figure out the year of the latest available data
# Most states have 2015 data available
# see http://lehd.ces.census.gov/data/lodes/LODES7/LODESTechDoc7.4.pdf, page 2f
year = 2017
year = 2018

# Alaska and South Dakota do not have LODES2017 data available, so use 2016
if state == 'AK' or state == 'SD':
if state == 'AK':
year = 2016
elif state == 'PR' or state == 'VI':
elif state == 'PR' or state == 'VI' or state == 'AS':
print('{0} does not have LODES data available'.format(state))
year = 0

Expand Down
96 changes: 0 additions & 96 deletions src/main/java/com/conveyal/data/census/CensusExtractor.java

This file was deleted.

73 changes: 0 additions & 73 deletions src/main/java/com/conveyal/data/census/CensusLoader.java

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/java/com/conveyal/data/census/FileSeamlessSource.java

This file was deleted.

142 changes: 0 additions & 142 deletions src/main/java/com/conveyal/data/census/LodesSource.java

This file was deleted.

Loading