Public Interface
TigerFetch Module
TigerFetch.tigerdownload Function
tigerdownload(type::String, year::Int=2024;
state::String="", county::String="",
output::String=pwd(), force::Bool=false,
verbose::Bool=false)Download TIGER/Line shapefiles from the U.S. Census Bureau.
Arguments
type::String: Geography type. Available options: place, county, tract, urbanarea, primaryroads, rails, cousub, consolidatedcity, linearwater, metrodivision, state, cbsa, primarysecondaryroads, road, zipcode, csa, areawater.year::Int=2024: Data year. Census typically provides shapefiles from 2000 onward.
Keyword Arguments
state::String="": State identifier (name, abbreviation, or FIPS code).county::String="": County identifier (name or FIPS code). Requiresstateto be specified.output::String=pwd(): Directory where shapefiles will be saved.force::Bool=false: Iftrue, redownload files even if they already exist.verbose::Bool=false: Iftrue, display more detailed progress information.
Returns
Vector{String}: Paths to downloaded files.
Examples
# Download state boundaries for the entire USA
tigerdownload("state")
# Download county subdivisions for California
tigerdownload("cousub", state="CA")
# Download census tracts for Los Angeles County, California
tigerdownload("tract", state="California", county="Los Angeles")
# Download with custom output directory and force redownload
tigerdownload("county", output="/path/to/data", force=true)Notes
Geography types follow a hierarchy: national-level (state, county), state-level (cousub, place), and county-level (tract, areawater).
For national-level geographies, the
stateandcountyarguments are ignored.For state-level geographies, the
countyargument is ignored.For county-level geographies, both
stateandcountyare used when provided.If no state is specified when downloading state or county-level geographies, all states will be downloaded.
TIGER/Line shapefiles are downloaded as ZIP archives containing multiple files (.shp, .dbf, .prj, etc.).
See Also