Skip to content

Commit

Permalink
Merge pull request #923 from conveyal/census-loader-update
Browse files Browse the repository at this point in the history
Update Census loader to handle new decade
  • Loading branch information
abyrd authored Jan 3, 2024
2 parents 14cbb20 + dcfe1dd commit b3fa65b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void load (ShapeDataStore store) throws Exception {
for (SimpleFeatureIterator it = sfc.features(); it.hasNext();) {
GeobufFeature feat = new GeobufFeature(it.next());
feat.id = null;
feat.numericId = Long.parseLong((String) feat.properties.get("GEOID10"));
feat.numericId = Long.parseLong((String) feat.properties.get("GEOID20"));
feat.properties = new HashMap<>();
store.add(feat);
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/conveyal/data/census/IntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void testAll () throws Exception {
assertTrue(features.containsKey(110010014023009L));

// read the workplace area characteristics csv
InputStream csv = new GZIPInputStream(new FileInputStream(new File(new File(dir, "jobs"), "dc_wac_S000_JT00_2013.csv.gz")));
InputStream csv = new GZIPInputStream(new FileInputStream(new File(new File(dir, "jobs"), "DC_2021_wac.csv.gz")));
reader = new CsvReader(new InputStreamReader(csv));
reader.readHeaders();

Expand Down Expand Up @@ -153,7 +153,7 @@ public void testAll () throws Exception {
assertTrue(foundJobsEntry);

// read the rac csv
csv = new GZIPInputStream(new FileInputStream(new File(new File(dir, "workforce"), "dc_rac_S000_JT00_2013.csv.gz")));
csv = new GZIPInputStream(new FileInputStream(new File(new File(dir, "workforce"), "DC_2021_rac.csv.gz")));
reader = new CsvReader(new InputStreamReader(csv));

reader.readHeaders();
Expand Down
Binary file not shown.

0 comments on commit b3fa65b

Please sign in to comment.