# The ID of the data source is the name of this file. Should be short, consists of one or two words. No space and special characters. Hyphen ("_") is allowed. The ID is for the program identify the data source.

# Data source name. Should be clear, meaningful, and human readable.
data_source_name = 'US Census Bureau boundary'


# provide a brief description (1 line) of the data source to inform AI whether need to use this data source.
# Need to contain critical information such as extent and period.
brief_description = '''
It provides the US administrative boundaries (nation, state, county, tract, and block group level, as well as metropolitan statistic areas.
'''


# Put the technical requirements or details for the data source. One line for a requirement. No need to number them.
handbook = '''
If the place of boundaries request is in the USA, you can download boundaries from Census Bureau, which is official and better than OSM. An example link is: https://www2.census.gov/geo/tiger/GENZ2021/shp/cb_{year}_{extend}_{level}_500k.zip. You can change the year and administrative level (state/county) in link accordingly. 'year' is 4-digit. 'extend' can be 'us' or 2-digit state FIPS; when 'extend' = 'us', 'level' can be 'state' and 'county' only, and the downloaded data is national. When 'extend' is 2-digit state FIPS, 'level' can be 'tract' and 'bg' only. 'bg' refers to block groups. E.g., do not set 'extend' to 2-digit FIPS code when download county boundaries for a state. If you need to download counties boundaries, 'extend' must be 'us'.
If the file saving format is not given in the tasks, save the downloaded files into GeoPackage format.
You need to create Python code to download and save the data. Another program will execute your code directly.
Put your reply into a Python code block, Explanation or conversation can be Python comments at the begining of the code block(enclosed by ```python and ```).
The download code is only in a function named 'download_data()'. The last line is to execute this function
If using GeoPandas to load a zipped ESRI shapefile from a URL, the correct method is `gpd.read_file(URL)`. DO NOT download and unzip the file.
Note Python package 'pandas' has no attribute or method of 'StringIO'.
Throw an error if the the program fails to download the data; no need to handle the exceptions.
'''