Core Module
The Core module contains foundational functionality for GeoIDs.jl, including predefined GEOID constants, initialization functions, and backup/restore capabilities.
Predefined Constants
The following constants provide quick access to common geographic regions. They are loaded from the database during package initialization:
WESTERN_GEOIDS: Counties west of 100°W longitude (traditionally requiring irrigation)EASTERN_GEOIDS: Counties between 90°W and 100°W (historically high rainfall)FLORIDA_SOUTH_GEOIDS: Florida counties south of 29°N latitudeCOLORADO_BASIN_GEOIDS: Counties in the Colorado River Basin
Initialization Functions
GeoIDs.initialize_predefined_geoid_sets — Functioninitialize_predefined_geoid_sets()Initialize all predefined GEOID sets in the database. This is called during the first module load to ensure all standard GEOID sets are available in the versioned database.
GeoIDs.load_predefined_geoids — Functionload_predefined_geoids()Load all predefined GEOID sets from the database into module constants.
GeoIDs.Setup.initialize_database — Functioninitialize_database()Main function to set up the database schema, download and process shapefile, and load county data to the database.
Backup and Restore
These functions enable exporting and importing GEOID sets with their complete version history:
GeoIDs.backup_geoid_sets — Functionbackup_geoid_sets(output_file::String)Create a complete backup of all GEOID sets and their versions.
Arguments
output_file::String: Path to save the backup file (JSON format)
Example
backup_geoid_sets("geoid_sets_backup_2023-10-15.json")GeoIDs.restore_geoid_sets — Functionrestore_geoid_sets(input_file::String, overwrite::Bool=false)Restore GEOID sets from a backup file.
Arguments
input_file::String: Path to the backup fileoverwrite::Bool: Whether to overwrite existing sets
Example
restore_geoid_sets("geoid_sets_backup_2023-10-15.json")Other Core Functions
Missing docstring for __init__. Check Documenter's build log for details.
Module Index
GeoIDs.Setup.initialize_databaseGeoIDs.backup_geoid_setsGeoIDs.initialize_predefined_geoid_setsGeoIDs.load_predefined_geoidsGeoIDs.restore_geoid_sets