cli.jl (1173B)
1 # ABOUTME: Command-line interface for TigerFetch via Comonicon.jl 2 # ABOUTME: Provides the tigerfetch CLI command that wraps the tigerdownload Julia function 3 4 # ------------------------------------------------------------------------------------------------- 5 """ 6 tigerfetch(type, year) 7 8 Download shapefiles for US geography from the Census Tiger ftp server. 9 10 # Intro 11 12 13 14 # Args 15 16 - `type`: Geography type (state, county, cousub, tract) 17 - `year`: Data year (default: 2024) 18 19 # Options 20 21 - `--state`: State identifier (name, abbreviation, or FIPS) 22 - `--county`: County identifier (name or FIPS, requires --state) 23 - `--output`: Output directory (default: current directory) 24 - `--force`: Override existing files 25 26 # Examples 27 tigerfetch state 28 tigerfetch cousub --state IL 29 tigerfetch areawater --state "Minnesota" # 10,000 lakes 30 """ 31 @main function tigerfetch( 32 type::String, year::Int=2024; 33 state::String="", 34 county::String="", 35 output::String=pwd(), 36 force::Bool=false) 37 38 tigerdownload(type, year; state=state, county=county, output=output, force=force) 39 40 end 41 # ------------------------------------------------------------------------------------------------- 42 43 44