bamcensus_tiger/lib.rs
1//! bamcensus-tiger
2//!
3//! Tools for downloading shapefile datasets from the TIGER/Lines collection
4//! served via FTP from <https://www2.census.gov/geo/tiger/>. A scalable and batch-based downloader
5//! alternative to the PHP web interface found at <https://www.census.gov/cgi-bin/geo/shapefiles/index.php>.
6//!
7//! See <https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html> for
8//! details on these datasets.
9//!
10//! # Usage
11//!
12//! LODES datasets can be downloaded using the [`crate::ops::tiger_api`] module `run` method.
13//!
14//! # Data model
15//!
16//! ## [TigerResourceBuilder]
17//!
18//! URIs to shapefiles and their contents vary based on the provided year. This type provides a method `create_resource` that
19//! takes a single GEOID and returns a [TigerResource] to the shapefile matching that GEOID. the caller is expected
20//! to know what are valid year / GEOID combinations but `create_resource` attempts to fail on all invalid combinations.
21//!
22//! ## [TigerResource]
23//!
24//! Once a resource object is created, it can be used to execute a download. The resource object provides knowledge about the
25//! type of data stored in each row of the file, in order to map the result back to bamcensus types.
26//!
27//! [TigerResourceBuilder]: crate::model::TigerResourceBuilder
28//! [TigerResource]: crate::model::TigerResource
29
30pub mod model;
31pub mod ops;