Skip to content

Commit

Permalink
Test for filtering geoids
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartlynn committed Apr 26, 2024
1 parent fdd093c commit 2cdca39
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,31 @@ mod tests {
"The returned dataframe should have the column we requested"
);
}

#[test]
fn test_fetching_metrics_with_geo_filter() {
let metrics = [
MetricRequest{
file:"https://popgetter.blob.core.windows.net/popgetter-cli-test/tracts_2019_fiveYear.parquet".into(),
column:"B17021_E006".into()
}];
let df = get_metrics(
&metrics,
Some(&["1400000US01001020100".into(), "1400000US01001020300".into()]),
);

println!("{df:#?}");
assert!(df.is_ok(), "We should get back a result");
let df = df.unwrap();
assert_eq!(
df.shape().1,
2,
"The returned dataframe should have the correct number of columns"
);
assert_eq!(
df.shape().0,
2,
"The returned dataframe should have the correct number of columns"
);
}
}

0 comments on commit 2cdca39

Please sign in to comment.