Operations Module
The Operations module provides set operations for combining and manipulating GEOID sets, including union, intersection, difference, and symmetric difference.
Set Operations
Union Operation
Combines all GEOIDs from multiple sets:
GeoIDs.Operations.union_geoid_sets — Functionunion_geoid_sets(set_names::Vector{String}, output_name::String, description::String="") -> Vector{String}Create a new GEOID set that is the union of multiple existing sets.
Arguments
set_names::Vector{String}: Names of the sets to combineoutput_name::String: Name of the new set to createdescription::String: Optional description for the new set
Returns
- Vector{String}: The GEOIDs in the new set
Example
combined = union_geoid_sets(["western_counties", "mountain_counties"], "western_mountain_counties")Intersection Operation
Keeps only GEOIDs that appear in all input sets:
GeoIDs.Operations.intersect_geoid_sets — Functionintersect_geoid_sets(set_names::Vector{String}, output_name::String, description::String="") -> Vector{String}Create a new GEOID set that is the intersection of multiple existing sets.
Arguments
set_names::Vector{String}: Names of the sets to intersectoutput_name::String: Name of the new set to createdescription::String: Optional description for the new set
Returns
- Vector{String}: The GEOIDs in the new set
Example
common = intersect_geoid_sets(["florida_counties", "coastal_counties"], "florida_coastal_counties")Difference Operation
Keeps GEOIDs from the first set that don't appear in the second set:
GeoIDs.Operations.difference_geoid_sets — Functiondifference_geoid_sets(base_set::String, subtract_set::String, output_name::String, description::String="") -> Vector{String}Create a new GEOID set that contains elements in baseset that are not in subtractset.
Arguments
base_set::String: Name of the base setsubtract_set::String: Name of the set to subtractoutput_name::String: Name of the new set to createdescription::String: Optional description for the new set
Returns
- Vector{String}: The GEOIDs in the new set
Example
non_coastal_florida = difference_geoid_sets("florida_counties", "coastal_counties", "florida_inland_counties")Symmetric Difference Operation
Keeps GEOIDs that appear in exactly one of the two input sets (not in both):
GeoIDs.Operations.symmetric_difference_geoid_sets — Functionsymmetric_difference_geoid_sets(set1::String, set2::String, output_name::String, description::String="") -> Vector{String}Create a new GEOID set with elements that are in either set but not in both.
Arguments
set1::String: Name of the first setset2::String: Name of the second setoutput_name::String: Name of the new set to createdescription::String: Optional description for the new set
Returns
- Vector{String}: The GEOIDs in the new set
Example
exclusive_regions = symmetric_difference_geoid_sets("eastern_counties", "coastal_counties", "exclusive_regions")Module Index
GeoIDs.Operations.difference_geoid_setsGeoIDs.Operations.intersect_geoid_setsGeoIDs.Operations.symmetric_difference_geoid_setsGeoIDs.Operations.union_geoid_sets