From 2dbc37b8bc1ff3676248e2f960c4fde112cf05cb Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 20 Oct 2025 16:36:01 -0600 Subject: [PATCH 01/17] WIP: list owners orgs in json array --- .../data/owners_organization_mapper.json | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 transfers/data/owners_organization_mapper.json diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json new file mode 100644 index 000000000..bce529729 --- /dev/null +++ b/transfers/data/owners_organization_mapper.json @@ -0,0 +1,156 @@ +[ + {"source": "Abeyta Engineering", "target": "Abeyta Engineering, Inc"}, + {"source": "Adobe Ranch", "target": "Adobe Ranch"}, + {"source": "Agua Fria Water Assn.", "target": "Agua Fria Water Assn."}, + {"source": "Apache Gap Ranch", "target": "Apache Gap Ranch"}, + {"source": "Aspendale Baptist Camp", "target": "Aspendale Baptist Camp"}, + {"source": "Augustin Ranch LLC", "target": "Augustin Ranch LLC"}, + {"source": "B + B Cattle", "target": "B + B Cattle"}, + {"source": "BLM Taos Office", "target": "BLM Taos Office"}, + {"source": "Berridge Distributing Company", "target": "Berridge Distributing Company"}, + {"source": "Bishop's Lodge", "target": "Bishop's Lodge"}, + {"source": "Bonanza Creek Ranch", "target": "Bonanza Creek Ranch"}, + {"source": "Bug Scuffle Water Association", "target": "Bug Scuffle Water Association"}, + {"source": "Bureau of Land Management", "target": "Bureau of Land Management"}, + {"source": "Camp Wehinahpay", "target": "Camp Wehinahpay"}, + {"source": "Campbell Ranch", "target": "Campbell Ranch"}, + {"source": "Capitol Ford Auto Body", "target": "Capitol Ford Auto Body"}, + {"source": "Cemex Plant", "target": "Cemex Plant"}, + {"source": "Cerro Community Center", "target": "Cerro Community Center"}, + {"source": "Chabad Jewish Center", "target": "Chabad Jewish Center"}, + {"source": "Cielo Lumbre HOA", "target": "Cielo Lumbre HOA"}, + {"source": "Circle Cross Ranch", "target": "Circle Cross Ranch"}, + {"source": "City of Alamogordo", "target": "City of Alamogordo"}, + {"source": "City of Portales, Public Works Dept.", "target": "City of Portales, Public Works Dept."}, + {"source": "City of Santa Fe WWTP", "target": "City of Santa Fe WWTP"}, + {"source": "City of Santa Fe, Municipal Recreation Complex", "target": "City of Santa Fe, Municipal Recreation Complex"}, + {"source": "City of Santa Fe, Sangre de Cristo Water Co.", "target": "City of Santa Fe, Sangre de Cristo Water Co."}, + {"source": "City of Socorro", "target": "City of Socorro"}, + {"source": "Commonwealth Conservancy", "target": "Commonwealth Conservancy"}, + {"source": "Country Club Garden MHP", "target": "Country Club Garden MHP"}, + {"source": "Crossroads Cattle Co., Ltd.", "target": "Crossroads Cattle Co., Ltd."}, + {"source": "Double H Ranch", "target": "Double H Ranch"}, + {"source": "E.A. Meadows East", "target": "E.A. Meadows East"}, + {"source": "El Camino Realty", "target": "El Camino Realty"}, + {"source": "El Dorado Utilities", "target": "El Dorado Utilities"}, + {"source": "El Gancho Restaurant", "target": "El Gancho Restaurant"}, + {"source": "El Prado HOA", "target": "El Prado HOA"}, + {"source": "El Rancho de las Golondrinas", "target": "El Rancho de las Golondrinas"}, + {"source": "El Rito MDWCA", "target": "El Rito MDWCA"}, + {"source": "Eldorado Water and Sanitation District", "target": "Eldorado Water and Sanitation District"}, + {"source": "Encantado Enterprises", "target": "Encantado Enterprises"}, + {"source": "Estrella Concepts LLC", "target": "Estrella Concepts LLC"}, + {"source": "Farr Cattle Company (Farr Ranch", "target": "Farr Cattle Company (Farr Ranch"}, + {"source": "Fire Department", "target": "Fire Department"}, + {"source": "Fire Water Lodge", "target": "Fire Water Lodge"}, + {"source": "Ford County Land and Cattle", "target": "Ford County Land and Cattle"}, + {"source": "Friendly Construction, Inc.", "target": "Friendly Construction, Inc."}, + {"source": "Hacienda Del Cerezo, Ltd.", "target": "Hacienda Del Cerezo, Ltd."}, + {"source": "Hefker Vega Ranch", "target": "Hefker Vega Ranch"}, + {"source": "High Nogal Ranch", "target": "High Nogal Ranch"}, + {"source": "Holloman Air Force Base", "target": "Holloman Air Force Base"}, + {"source": "Hyde Park Estates MDWCA", "target": "Hyde Park Estates MDWCA"}, + {"source": "Hyde Park Estates WUA", "target": "Hyde Park Estates WUA"}, + {"source": "Ideal Mobile Home & RV", "target": "Ideal Mobile Home & RV"}, + {"source": "K. Schmitt Trust", "target": "K. Schmitt Trust"}, + {"source": "La Cienega Mutual Domestic Assn.", "target": "La Cienega Mutual Domestic Assn."}, + {"source": "La Vista HOA", "target": "La Vista HOA"}, + {"source": "Lamy MDWUA", "target": "Lamy MDWUA"}, + {"source": "Land Ventures LLC", "target": "Land Ventures LLC"}, + {"source": "Las Lagunitas", "target": "Las Lagunitas"}, + {"source": "Las Lagunitas Homeowners Assn.", "target": "Las Lagunitas Homeowners Assn."}, + {"source": "Living World Ministries", "target": "Living World Ministries"}, + {"source": "Los Atrevidos, Inc.", "target": "Los Atrevidos, Inc."}, + {"source": "Los Prados HOA", "target": "Los Prados HOA"}, + {"source": "Malaga Water System", "target": "Malaga Water System"}, + {"source": "Mangas Outfitters", "target": "Mangas Outfitters"}, + {"source": "Media Gravel Pit", "target": "Media Gravel Pit"}, + {"source": "Mendenhall Trading Co.", "target": "Mendenhall Trading Co."}, + {"source": "Mesa Verde Ranch", "target": "Mesa Verde Ranch"}, + {"source": "NM Environment Dept.", "target": "NM Environment Dept."}, + {"source": "NM Game & Fish Dept.", "target": "NM Game & Fish Dept."}, + {"source": "NM Office of the State Engineer", "target": "NM Office of the State Engineer"}, + {"source": "NM State Highway Dept.", "target": "NM State Highway Dept."}, + {"source": "NMSU College of Agriculture", "target": "NMSU College of Agriculture"}, + {"source": "Naiche Development", "target": "Naiche Development"}, + {"source": "National Radio Astronomy Observatory", "target": "National Radio Astronomy Observatory"}, + {"source": "New Mexico Spaceport Authority", "target": "New Mexico Spaceport Authority"}, + {"source": "New Mexico Tech", "target": "New Mexico Tech"}, + {"source": "Nogal Mutual Domestic Water Consumers Association", "target": "Nogal Mutual Domestic Water Consumers Association"}, + {"source": "O Bar O Ranch", "target": "O Bar O Ranch"}, + {"source": "OMI Wastewater Treatment Plant", "target": "OMI Wastewater Treatment Plant"}, + {"source": "Old Road Ranch Pardners Ltd.", "target": "Old Road Ranch Pardners Ltd."}, + {"source": "PNM Service Center", "target": "PNM Service Center"}, + {"source": "PNM, Sangre de Cristo", "target": "PNM, Sangre de Cristo"}, + {"source": "Peace Tabernacle Church", "target": "Peace Tabernacle Church"}, + {"source": "Pecos Trail Inn", "target": "Pecos Trail Inn"}, + {"source": "Pelican Spa", "target": "Pelican Spa"}, + {"source": "Pistachio Tree Ranch", "target": "Pistachio Tree Ranch"}, + {"source": "Rancho Encantado", "target": "Rancho Encantado"}, + {"source": "Rancho San Lucas", "target": "Rancho San Lucas"}, + {"source": "Rancho San Marcos", "target": "Rancho San Marcos"}, + {"source": "Rancho Viejo Partnership", "target": "Rancho Viejo Partnership"}, + {"source": "Ranney Ranch", "target": "Ranney Ranch"}, + {"source": "Rio En Medio MDWCA", "target": "Rio En Medio MDWCA"}, + {"source": "San Acacia MDWCA", "target": "San Acacia MDWCA"}, + {"source": "San Juan Residences", "target": "San Juan Residences"}, + {"source": "Sandia National Laboratories", "target": "Sandia National Laboratories"}, + {"source": "Sangre de Cristo Center", "target": "Sangre de Cristo Center"}, + {"source": "Sangre de Cristo Estates", "target": "Sangre de Cristo Estates"}, + {"source": "Santa Fe Community College", "target": "Santa Fe Community College"}, + {"source": "Santa Fe County", "target": "Santa Fe County"}, + {"source": "Santa Fe County, Fire Facilities", "target": "Santa Fe County, Fire Facilities"}, + {"source": "Santa Fe County, Utilities Dept.", "target": "Santa Fe County, Utilities Dept."}, + {"source": "Santa Fe County, Valle Vista Water Utility, Inc.", "target": "Santa Fe County, Valle Vista Water Utility, Inc."}, + {"source": "Santa Fe Downs", "target": "Santa Fe Downs"}, + {"source": "Santa Fe Horse Park", "target": "Santa Fe Horse Park"}, + {"source": "Santa Fe Municipal Airport", "target": "Santa Fe Municipal Airport"}, + {"source": "Santa Fe Opera", "target": "Santa Fe Opera"}, + {"source": "Santa Fe Waldorf School", "target": "Santa Fe Waldorf School"}, + {"source": "Shidoni Foundry, Inc.", "target": "Shidoni Foundry, Inc."}, + {"source": "Sierra Grande Lodge", "target": "Sierra Grande Lodge"}, + {"source": "Sierra Vista Retirement Community", "target": "Sierra Vista Retirement Community"}, + {"source": "Slash Triangle Ranch", "target": "Slash Triangle Ranch"}, + {"source": "Stagecoach Motel", "target": "Stagecoach Motel"}, + {"source": "State of New Mexico", "target": "State of New Mexico"}, + {"source": "Stephenson Ranch", "target": "Stephenson Ranch"}, + {"source": "Sun Broadcasting Network", "target": "Sun Broadcasting Network"}, + {"source": "Tano Rd LLC", "target": "Tano Rd LLC"}, + {"source": "Taos Municipal Schools, UNM Taos", "target": "Taos Municipal Schools, UNM Taos"}, + {"source": "Tee Pee Ranch/Tee Pee Subdivision", "target": "Tee Pee Ranch/Tee Pee Subdivision"}, + {"source": "Tent Rock, Inc.", "target": "Tent Rock, Inc."}, + {"source": "Tesuque", "target": "Tesuque"}, + {"source": "Tesuque MDWCA", "target": "Tesuque MDWCA"}, + {"source": "The Great Cloud Zen Center", "target": "The Great Cloud Zen Center"}, + {"source": "Three Rivers Ranch", "target": "Three Rivers Ranch"}, + {"source": "Timberon Water and Sanitation District", "target": "Timberon Water and Sanitation District"}, + {"source": "Town of Magdalena", "target": "Town of Magdalena"}, + {"source": "Town of Taos", "target": "Town of Taos"}, + {"source": "Town of Taos, National Guard Armory", "target": "Town of Taos, National Guard Armory"}, + {"source": "Trinity Ranch", "target": "Trinity Ranch"}, + {"source": "Tularosa Basin Natl. Desalination Research Facil.", "target": "Tularosa Basin Natl. Desalination Research Facil."}, + {"source": "Turquoise Trail Charter School", "target": "Turquoise Trail Charter School"}, + {"source": "US Bureau of Indian Affairs, Indian School", "target": "US Bureau of Indian Affairs, Indian School"}, + {"source": "USFS, Carson NF, Taos Office", "target": "USFS, Carson NF, Taos Office"}, + {"source": "USFS, Cibola NF, Magdalena Ranger District", "target": "USFS, Cibola NF, Magdalena Ranger District"}, + {"source": "USFS, Santa Fe NF, Espanola Ranger District", "target": "USFS, Santa Fe NF, Espanola Ranger District"}, + {"source": "USFS/Bluewater Ranch", "target": "USFS/Bluewater Ranch"}, + {"source": "Ute Mountain Farms", "target": "Ute Mountain Farms"}, + {"source": "VA Hospital", "target": "VA Hospital"}, + {"source": "Valle Vista Water Utility", "target": "Valle Vista Water Utility"}, + {"source": "Velte", "target": "Velte"}, + {"source": "Vereda Serena Property", "target": "Vereda Serena Property"}, + {"source": "Village of Corona", "target": "Village of Corona"}, + {"source": "Village of Floyd", "target": "Village of Floyd"}, + {"source": "Village of Melrose", "target": "Village of Melrose"}, + {"source": "Village of Vaughn", "target": "Village of Vaughn"}, + {"source": "Vista Land Company", "target": "Vista Land Company"}, + {"source": "Vista Redonda MDWCA", "target": "Vista Redonda MDWCA"}, + {"source": "Vista Redondo MDWCA", "target": "Vista Redondo MDWCA"}, + {"source": "Vista de Oro Water Co-op", "target": "Vista de Oro Water Co-op"}, + {"source": "Walker Ranch", "target": "Walker Ranch"}, + {"source": "Wild & Woolley Trailer Ranch", "target": "Wild & Woolley Trailer Ranch"}, + {"source": "Winter Brothers/U.S. Government", "target": "Winter Brothers/U.S. Government"}, + {"source": "Yates Petroleum", "target": "Yates Petroleum"}, + {"source": "Zamora Accounting Services", "target": "Zamora Accounting Services"} +] \ No newline at end of file From 864b6a9f21056d7c4c6acbace6815032b0bfaeb7 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Tue, 21 Oct 2025 09:51:18 -0600 Subject: [PATCH 02/17] WIP: owners organizations --- core/lexicon.json | 11 +++++++++++ transfers/data/owners_organization_mapper.json | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/core/lexicon.json b/core/lexicon.json index e1ffd9cf4..b9350cf1f 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -413,6 +413,17 @@ {"categories": ["organization"], "term": "San Marcos Association", "definition": "San Marcos Association"}, {"categories": ["organization"], "term": "URS", "definition": "URS"}, {"categories": ["organization"], "term": "Vista del Oro", "definition": "Vista del Oro"}, + {"categories": ["organization"], "term": "Abeyta Engineering, Inc", "definition": "Abeyta Engineering, Inc"}, + {"categories": ["organization"], "term": "Adobe Ranch", "definition": "Adobe Ranch"}, + {"categories": ["organization"], "term": "Agua Fria Community Water Association", "definition": "Agua Fria Community Water Association"}, + {"categories": ["organization"], "term": "Apache Gap Ranch", "definition": "Apache Gap Ranch"}, + {"categories": ["organization"], "term": "Aspendale Mountain Retreat", "definition": "Aspendale Mountain Retreat"}, + {"categories": ["organization"], "term": "Augustin Plains Ranch LLC", "definition": "Augustin Plains Ranch LLC"}, + {"categories": ["organization"], "term": "B & B Cattle Co", "definition": "B & B Cattle Co"}, + {"categories": ["organization"], "term": "Berridge Distributing Company", "definition": "Berridge Distributing Company"}, + {"categories": ["organization"], "term": "Bishop's Lodge", "definition": "Bishop's Lodge"}, + {"categories": ["organization"], "term": "Bonanza Creek Ranch", "definition": "Bonanza Creek Ranch"}, + {"categories": ["organization"], "term": "Bug Scuffle Water Association", "definition": "Bug Scuffle Water Association"}, {"categories": ["collection_method"], "term": "manual", "definition": "manual sampling"}, {"categories": ["collection_method"], "term": "continuous", "definition": "continuous sampling"}, {"categories": ["role"], "term": "Owner", "definition": "Owner"}, diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json index bce529729..5891ee4cb 100644 --- a/transfers/data/owners_organization_mapper.json +++ b/transfers/data/owners_organization_mapper.json @@ -1,17 +1,17 @@ [ {"source": "Abeyta Engineering", "target": "Abeyta Engineering, Inc"}, {"source": "Adobe Ranch", "target": "Adobe Ranch"}, - {"source": "Agua Fria Water Assn.", "target": "Agua Fria Water Assn."}, + {"source": "Agua Fria Water Assn.", "target": "Agua Fria Community Water Association"}, {"source": "Apache Gap Ranch", "target": "Apache Gap Ranch"}, - {"source": "Aspendale Baptist Camp", "target": "Aspendale Baptist Camp"}, - {"source": "Augustin Ranch LLC", "target": "Augustin Ranch LLC"}, - {"source": "B + B Cattle", "target": "B + B Cattle"}, - {"source": "BLM Taos Office", "target": "BLM Taos Office"}, + {"source": "Aspendale Baptist Camp", "target": "Aspendale Mountain Retreat"}, + {"source": "Augustin Ranch LLC", "target": "Augustin Plains Ranch LLC"}, + {"source": "B + B Cattle", "target": "B & B Cattle Co"}, + {"source": "BLM Taos Office", "target": "BLM"}, {"source": "Berridge Distributing Company", "target": "Berridge Distributing Company"}, {"source": "Bishop's Lodge", "target": "Bishop's Lodge"}, {"source": "Bonanza Creek Ranch", "target": "Bonanza Creek Ranch"}, {"source": "Bug Scuffle Water Association", "target": "Bug Scuffle Water Association"}, - {"source": "Bureau of Land Management", "target": "Bureau of Land Management"}, + {"source": "Bureau of Land Management", "target": "BLM"}, {"source": "Camp Wehinahpay", "target": "Camp Wehinahpay"}, {"source": "Campbell Ranch", "target": "Campbell Ranch"}, {"source": "Capitol Ford Auto Body", "target": "Capitol Ford Auto Body"}, From cdca2aecc52960f4244b16e3a0b80dfbf3f8c079 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Tue, 21 Oct 2025 16:52:22 -0600 Subject: [PATCH 03/17] WIP: owners orgs --- core/lexicon.json | 45 ++++++++++++++++ .../data/owners_organization_mapper.json | 52 +++++++++---------- 2 files changed, 71 insertions(+), 26 deletions(-) diff --git a/core/lexicon.json b/core/lexicon.json index b9350cf1f..08ec9c583 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -424,6 +424,51 @@ {"categories": ["organization"], "term": "Bishop's Lodge", "definition": "Bishop's Lodge"}, {"categories": ["organization"], "term": "Bonanza Creek Ranch", "definition": "Bonanza Creek Ranch"}, {"categories": ["organization"], "term": "Bug Scuffle Water Association", "definition": "Bug Scuffle Water Association"}, + {"categories": ["organization"], "term": "Wehinahpay Mountain Camp", "definition": "Wehinahpay Mountain Camp"}, + {"categories": ["organization"], "term": "Campbell Ranch", "definition": "Campbell Ranch"}, + {"categories": ["organization"], "term": "Capitol Ford Santa Fe", "definition": "Capitol Ford Santa Fe"}, + {"categories": ["organization"], "term": "Cemex, Inc", "definition": "Cemex, Inc"}, + {"categories": ["organization"], "term": "Cerro Community Center", "definition": "Cerro Community Center"}, + {"categories": ["organization"], "term": "Santa Fe Jewish Center", "definition": "Santa Fe Jewish Center"}, + {"categories": ["organization"], "term": "Cielo Lumbre HOA", "definition": "Cielo Lumbre HOA"}, + {"categories": ["organization"], "term": "Circle Cross Ranch", "definition": "Circle Cross Ranch"}, + {"categories": ["organization"], "term": "City of Alamogordo", "definition": "City of Alamogordo"}, + {"categories": ["organization"], "term": "City of Portales", "definition": "City of Portales"}, + {"categories": ["organization"], "term": "City of Socorro", "definition": "City of Socorro"}, + {"categories": ["organization"], "term": "Commonwealth Conservancy", "definition": "Commonwealth Conservancy"}, + {"categories": ["organization"], "term": "Country Club Garden Mobile Home Park", "definition": "Country Club Garden Mobile Home Park"}, + {"categories": ["organization"], "term": "Crossroads Cattle Co., Ltd", "definition": "Crossroads Cattle Co., Ltd"}, + {"categories": ["organization"], "term": "Double H Ranch", "definition": "Double H Ranch"}, + {"categories": ["organization"], "term": "E.A. Meadows East", "definition": "E.A. Meadows East"}, + {"categories": ["organization"], "term": "El Camino Realty, Inc", "definition": "El Camino Realty, Inc"}, + {"categories": ["organization"], "term": "Eldorado Area Water & Sanitation District", "definition": "Eldorado Area Water & Sanitation District"}, + {"categories": ["organization"], "term": "Bourbon Grill at El Gancho", "definition": "Bourbon Grill at El Gancho"}, + {"categories": ["organization"], "term": "El Prado HOA", "definition": "El Prado HOA"}, + {"categories": ["organization"], "term": "El Rancho de las Golondrinas", "definition": "El Rancho de las Golondrinas"}, + {"categories": ["organization"], "term": "El Rito Canyon MDWCA", "definition": "El Rito Canyon MDWCA"}, + {"categories": ["organization"], "term": "Encantado Enterprises", "definition": "Encantado Enterprises"}, + {"categories": ["organization"], "term": "Estrella Concepts LLC", "definition": "Estrella Concepts LLC"}, + {"categories": ["organization"], "term": "Farr Cattle Company", "definition": "Farr Cattle Company"}, + {"categories": ["organization"], "term": "Sixteen Springs Fire Department", "definition": "Sixteen Springs Fire Department"}, + {"categories": ["organization"], "term": "Fire Water Lodge", "definition": "Fire Water Lodge"}, + {"categories": ["organization"], "term": "Ford County Land & Cattle Company, Inc", "definition": "Ford County Land & Cattle Company, Inc"}, + {"categories": ["organization"], "term": "Friendly Construction, Inc", "definition": "Friendly Construction, Inc"}, + {"categories": ["organization"], "term": "Hacienda Del Cerezo", "definition": "Hacienda Del Cerezo"}, + {"categories": ["organization"], "term": "Hefker Vega Ranch", "definition": "Hefker Vega Ranch"}, + {"categories": ["organization"], "term": "High Nogal Ranch", "definition": "High Nogal Ranch"}, + {"categories": ["organization"], "term": "Holloman Air Force Base", "definition": "Holloman Air Force Base"}, + {"categories": ["organization"], "term": "Hyde Park Estates MDWCA", "definition": "Hyde Park Estates MDWCA"}, + {"categories": ["organization"], "term": "Desert Village RV & Mobile Home Park", "definition": "Desert Village RV & Mobile Home Park"}, + {"categories": ["organization"], "term": "K. Schmitt Trust", "definition": "K. Schmitt Trust"}, + {"categories": ["organization"], "term": "La Cienega MDWCA", "definition": "La Cienega MDWCA"}, + {"categories": ["organization"], "term": "La Vista HOA", "definition": "La Vista HOA"}, + {"categories": ["organization"], "term": "Lamy MDWCA", "definition": "Lamy MDWCA"}, + {"categories": ["organization"], "term": "Land Ventures LLC", "definition": "Land Ventures LLC"}, + {"categories": ["organization"], "term": "Las Lagunitas", "definition": "Las Lagunitas"}, + {"categories": ["organization"], "term": "Las Lagunitas HOA", "definition": "Las Lagunitas HOA"}, + {"categories": ["organization"], "term": "Living World Ministries", "definition": "Living World Ministries"}, + {"categories": ["organization"], "term": "Los Atrevidos, Inc", "definition": "Los Atrevidos, Inc"}, + {"categories": ["organization"], "term": "Los Prados HOA", "definition": "Los Prados HOA"}, {"categories": ["collection_method"], "term": "manual", "definition": "manual sampling"}, {"categories": ["collection_method"], "term": "continuous", "definition": "continuous sampling"}, {"categories": ["role"], "term": "Owner", "definition": "Owner"}, diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json index 5891ee4cb..13e045b2b 100644 --- a/transfers/data/owners_organization_mapper.json +++ b/transfers/data/owners_organization_mapper.json @@ -12,55 +12,55 @@ {"source": "Bonanza Creek Ranch", "target": "Bonanza Creek Ranch"}, {"source": "Bug Scuffle Water Association", "target": "Bug Scuffle Water Association"}, {"source": "Bureau of Land Management", "target": "BLM"}, - {"source": "Camp Wehinahpay", "target": "Camp Wehinahpay"}, + {"source": "Camp Wehinahpay", "target": "Wehinahpay Mountain Camp"}, {"source": "Campbell Ranch", "target": "Campbell Ranch"}, - {"source": "Capitol Ford Auto Body", "target": "Capitol Ford Auto Body"}, - {"source": "Cemex Plant", "target": "Cemex Plant"}, + {"source": "Capitol Ford Auto Body", "target": "Capitol Ford Santa Fe"}, + {"source": "Cemex Plant", "target": "Cemex, Inc"}, {"source": "Cerro Community Center", "target": "Cerro Community Center"}, - {"source": "Chabad Jewish Center", "target": "Chabad Jewish Center"}, + {"source": "Chabad Jewish Center", "target": "Santa Fe Jewish Center"}, {"source": "Cielo Lumbre HOA", "target": "Cielo Lumbre HOA"}, {"source": "Circle Cross Ranch", "target": "Circle Cross Ranch"}, {"source": "City of Alamogordo", "target": "City of Alamogordo"}, - {"source": "City of Portales, Public Works Dept.", "target": "City of Portales, Public Works Dept."}, - {"source": "City of Santa Fe WWTP", "target": "City of Santa Fe WWTP"}, - {"source": "City of Santa Fe, Municipal Recreation Complex", "target": "City of Santa Fe, Municipal Recreation Complex"}, - {"source": "City of Santa Fe, Sangre de Cristo Water Co.", "target": "City of Santa Fe, Sangre de Cristo Water Co."}, + {"source": "City of Portales, Public Works Dept.", "target": "City of Portales"}, + {"source": "City of Santa Fe WWTP", "target": "City of Santa Fe"}, + {"source": "City of Santa Fe, Municipal Recreation Complex", "target": "City of Santa Fe"}, + {"source": "City of Santa Fe, Sangre de Cristo Water Co.", "target": "City of Santa Fe"}, {"source": "City of Socorro", "target": "City of Socorro"}, {"source": "Commonwealth Conservancy", "target": "Commonwealth Conservancy"}, - {"source": "Country Club Garden MHP", "target": "Country Club Garden MHP"}, - {"source": "Crossroads Cattle Co., Ltd.", "target": "Crossroads Cattle Co., Ltd."}, + {"source": "Country Club Garden MHP", "target": "Country Club Garden Mobile Home Park"}, + {"source": "Crossroads Cattle Co., Ltd.", "target": "Crossroads Cattle Co., Ltd"}, {"source": "Double H Ranch", "target": "Double H Ranch"}, {"source": "E.A. Meadows East", "target": "E.A. Meadows East"}, - {"source": "El Camino Realty", "target": "El Camino Realty"}, - {"source": "El Dorado Utilities", "target": "El Dorado Utilities"}, - {"source": "El Gancho Restaurant", "target": "El Gancho Restaurant"}, + {"source": "El Camino Realty", "target": "El Camino Realty, Inc"}, + {"source": "El Dorado Utilities", "target": "Eldorado Area Water & Sanitation District"}, + {"source": "El Gancho Restaurant", "target": "Bourbon Grill at El Gancho"}, {"source": "El Prado HOA", "target": "El Prado HOA"}, {"source": "El Rancho de las Golondrinas", "target": "El Rancho de las Golondrinas"}, - {"source": "El Rito MDWCA", "target": "El Rito MDWCA"}, - {"source": "Eldorado Water and Sanitation District", "target": "Eldorado Water and Sanitation District"}, + {"source": "El Rito MDWCA", "target": "El Rito Canyon MDWCA"}, + {"source": "Eldorado Water and Sanitation District", "target": "Eldorado Area Water & Sanitation District"}, {"source": "Encantado Enterprises", "target": "Encantado Enterprises"}, {"source": "Estrella Concepts LLC", "target": "Estrella Concepts LLC"}, - {"source": "Farr Cattle Company (Farr Ranch", "target": "Farr Cattle Company (Farr Ranch"}, - {"source": "Fire Department", "target": "Fire Department"}, + {"source": "Farr Cattle Company (Farr Ranch", "target": "Farr Cattle Company"}, + {"source": "Fire Department", "target": "Sixteen Springs Fire Department"}, {"source": "Fire Water Lodge", "target": "Fire Water Lodge"}, - {"source": "Ford County Land and Cattle", "target": "Ford County Land and Cattle"}, - {"source": "Friendly Construction, Inc.", "target": "Friendly Construction, Inc."}, - {"source": "Hacienda Del Cerezo, Ltd.", "target": "Hacienda Del Cerezo, Ltd."}, + {"source": "Ford County Land and Cattle", "target": "Ford County Land & Cattle Company, Inc"}, + {"source": "Friendly Construction, Inc.", "target": "Friendly Construction, Inc"}, + {"source": "Hacienda Del Cerezo, Ltd.", "target": "Hacienda Del Cerezo"}, {"source": "Hefker Vega Ranch", "target": "Hefker Vega Ranch"}, {"source": "High Nogal Ranch", "target": "High Nogal Ranch"}, {"source": "Holloman Air Force Base", "target": "Holloman Air Force Base"}, {"source": "Hyde Park Estates MDWCA", "target": "Hyde Park Estates MDWCA"}, - {"source": "Hyde Park Estates WUA", "target": "Hyde Park Estates WUA"}, - {"source": "Ideal Mobile Home & RV", "target": "Ideal Mobile Home & RV"}, + {"source": "Hyde Park Estates WUA", "target": "Hyde Park Estates MDWCA"}, + {"source": "Ideal Mobile Home & RV", "target": "Desert Village RV & Mobile Home Park"}, {"source": "K. Schmitt Trust", "target": "K. Schmitt Trust"}, - {"source": "La Cienega Mutual Domestic Assn.", "target": "La Cienega Mutual Domestic Assn."}, + {"source": "La Cienega Mutual Domestic Assn.", "target": "La Cienega MDWCA"}, {"source": "La Vista HOA", "target": "La Vista HOA"}, - {"source": "Lamy MDWUA", "target": "Lamy MDWUA"}, + {"source": "Lamy MDWUA", "target": "Lamy MDWCA"}, {"source": "Land Ventures LLC", "target": "Land Ventures LLC"}, {"source": "Las Lagunitas", "target": "Las Lagunitas"}, - {"source": "Las Lagunitas Homeowners Assn.", "target": "Las Lagunitas Homeowners Assn."}, + {"source": "Las Lagunitas Homeowners Assn.", "target": "Las Lagunitas HOA"}, {"source": "Living World Ministries", "target": "Living World Ministries"}, - {"source": "Los Atrevidos, Inc.", "target": "Los Atrevidos, Inc."}, + {"source": "Los Atrevidos, Inc.", "target": "Los Atrevidos, Inc"}, {"source": "Los Prados HOA", "target": "Los Prados HOA"}, {"source": "Malaga Water System", "target": "Malaga Water System"}, {"source": "Mangas Outfitters", "target": "Mangas Outfitters"}, From 73574f72e3ba6bc0c9184082591b0059fd7ea6b7 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Fri, 24 Oct 2025 16:18:56 -0600 Subject: [PATCH 04/17] WIP: ownersdata orgs --- core/lexicon.json | 11 +++++++++++ transfers/data/owners_organization_mapper.json | 18 +++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/core/lexicon.json b/core/lexicon.json index 08ec9c583..eff6f94f5 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -469,6 +469,17 @@ {"categories": ["organization"], "term": "Living World Ministries", "definition": "Living World Ministries"}, {"categories": ["organization"], "term": "Los Atrevidos, Inc", "definition": "Los Atrevidos, Inc"}, {"categories": ["organization"], "term": "Los Prados HOA", "definition": "Los Prados HOA"}, + {"categories": ["organization"], "term": "Malaga MDWCA & SWA", "definition": "Malaga MDWCA & SWA"}, + {"categories": ["organization"], "term": "Mangas Outfitters", "definition": "Mangas Outfitters"}, + {"categories": ["organization"], "term": "Medina Gravel Pit", "definition": "Medina Gravel Pit"}, + {"categories": ["organization"], "term": "Mendenhall Trading Co", "definition": "Mendenhall Trading Co"}, + {"categories": ["organization"], "term": "Mesa Verde Ranch", "definition": "Mesa Verde Ranch"}, + {"categories": ["organization"], "term": "NMDGF", "definition": "New Mexico Department of Game and Fish"}, + {"categories": ["organization"], "term": "NMSU College of Agriculture", "definition": "New Mexico State University College of Agriculture"}, + {"categories": ["organization"], "term": "Naiche Development", "definition": "Naiche Development"}, + {"categories": ["organization"], "term": "NRAO", "definition": "National Radio Astronomy Observatory"}, + {"categories": ["organization"], "term": "NMSA", "definition": "New Mexico Spaceport Authority"}, + {"categories": ["organization"], "term": "Nogal MDWCA", "definition": "Nogal MDWCA"}, {"categories": ["collection_method"], "term": "manual", "definition": "manual sampling"}, {"categories": ["collection_method"], "term": "continuous", "definition": "continuous sampling"}, {"categories": ["role"], "term": "Owner", "definition": "Owner"}, diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json index 13e045b2b..ed8495d33 100644 --- a/transfers/data/owners_organization_mapper.json +++ b/transfers/data/owners_organization_mapper.json @@ -62,19 +62,19 @@ {"source": "Living World Ministries", "target": "Living World Ministries"}, {"source": "Los Atrevidos, Inc.", "target": "Los Atrevidos, Inc"}, {"source": "Los Prados HOA", "target": "Los Prados HOA"}, - {"source": "Malaga Water System", "target": "Malaga Water System"}, + {"source": "Malaga Water System", "target": "Malaga MDWCA & SWA"}, {"source": "Mangas Outfitters", "target": "Mangas Outfitters"}, - {"source": "Media Gravel Pit", "target": "Media Gravel Pit"}, - {"source": "Mendenhall Trading Co.", "target": "Mendenhall Trading Co."}, + {"source": "Media Gravel Pit", "target": "Medina Gravel Pit"}, + {"source": "Mendenhall Trading Co.", "target": "Mendenhall Trading Co"}, {"source": "Mesa Verde Ranch", "target": "Mesa Verde Ranch"}, - {"source": "NM Environment Dept.", "target": "NM Environment Dept."}, - {"source": "NM Game & Fish Dept.", "target": "NM Game & Fish Dept."}, - {"source": "NM Office of the State Engineer", "target": "NM Office of the State Engineer"}, - {"source": "NM State Highway Dept.", "target": "NM State Highway Dept."}, + {"source": "NM Environment Dept.", "target": "NMED"}, + {"source": "NM Game & Fish Dept.", "target": "NMDGF"}, + {"source": "NM Office of the State Engineer", "target": "NMOSE"}, + {"source": "NM State Highway Dept.", "target": "NMDOT"}, {"source": "NMSU College of Agriculture", "target": "NMSU College of Agriculture"}, {"source": "Naiche Development", "target": "Naiche Development"}, - {"source": "National Radio Astronomy Observatory", "target": "National Radio Astronomy Observatory"}, - {"source": "New Mexico Spaceport Authority", "target": "New Mexico Spaceport Authority"}, + {"source": "National Radio Astronomy Observatory", "target": "NRAO"}, + {"source": "New Mexico Spaceport Authority", "target": "NMSA"}, {"source": "New Mexico Tech", "target": "New Mexico Tech"}, {"source": "Nogal Mutual Domestic Water Consumers Association", "target": "Nogal Mutual Domestic Water Consumers Association"}, {"source": "O Bar O Ranch", "target": "O Bar O Ranch"}, From 4470788dda1d72894e950cfb443b370f65d89e65 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 27 Oct 2025 14:00:41 -0600 Subject: [PATCH 05/17] WIP: map owners organizations --- core/lexicon.json | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/core/lexicon.json b/core/lexicon.json index eff6f94f5..cd2dbb96d 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -480,6 +480,76 @@ {"categories": ["organization"], "term": "NRAO", "definition": "National Radio Astronomy Observatory"}, {"categories": ["organization"], "term": "NMSA", "definition": "New Mexico Spaceport Authority"}, {"categories": ["organization"], "term": "Nogal MDWCA", "definition": "Nogal MDWCA"}, + {"categories": ["organization"], "term": "O Bar O Ranch", "definition": "O Bar O Ranch"}, + {"categories": ["organization"], "term": "OMI Wastewater Treatment Plant", "definition": "OMI Wastewater Treatment Plant"}, + {"categories": ["organization"], "term": "Old Road Ranch Pardners Ltd", "definition": "Old Road Ranch Pardners Ltd"}, + {"categories": ["organization"], "term": "PNM Service Center", "definition": "PNM Service Center"}, + {"categories": ["organization"], "term": "PNM Service Center", "definition": "PNM, Sangre de Cristo"}, + {"categories": ["organization"], "term": "PNM Service Center", "definition": "Peace Tabernacle Church"}, + {"categories": ["organization"], "term": "Pecos Trail Inn", "definition": "Pecos Trail Inn"}, + {"categories": ["organization"], "term": "Pelican Spa", "definition": "Pelican Spa"}, + {"categories": ["organization"], "term": "Pistachio Tree Ranch", "definition": "Pistachio Tree Ranch"}, + {"categories": ["organization"], "term": "Rancho Encantado", "definition": "Rancho Encantado"}, + {"categories": ["organization"], "term": "Rancho San Lucas", "definition": "Rancho San Lucas"}, + {"categories": ["organization"], "term": "Rancho San Marcos", "definition": "Rancho San Marcos"}, + {"categories": ["organization"], "term": "Rancho Viejo Partnership", "definition": "Rancho Viejo Partnership"}, + {"categories": ["organization"], "term": "Ranney Ranch", "definition": "Ranney Ranch"}, + {"categories": ["organization"], "term": "Rio En Medio MDWCA", "definition": "Rio En Medio MDWCA"}, + {"categories": ["organization"], "term": "San Acacia MDWCA", "definition": "San Acacia MDWCA"}, + {"categories": ["organization"], "term": "San Juan Residences", "definition": "San Juan Residences"}, + {"categories": ["organization"], "term": "Sangre de Cristo Center", "definition": "Sangre de Cristo Center"}, + {"categories": ["organization"], "term": "Sangre de Cristo Estates", "definition": "Sangre de Cristo Estates"}, + {"categories": ["organization"], "term": "Santa Fe Community College", "definition": "Santa Fe Community College"}, + {"categories": ["organization"], "term": "Santa Fe County, Fire Facilities", "definition": "Santa Fe County, Fire Facilities"}, + {"categories": ["organization"], "term": "Santa Fe County, Utilities Dept.", "definition": "Santa Fe County, Utilities Dept."}, + {"categories": ["organization"], "term": "Sangre de Cristo Center", "definition": "Sangre de Cristo Center"}, + {"categories": ["organization"], "term": "Valle Vista Water Utility", "definition": "Valle Vista Water Utility"}, + {"categories": ["organization"], "term": "Santa Fe Downs", "definition": "Santa Fe Downs"}, + {"categories": ["organization"], "term": "Santa Fe Horse Park", "definition": "Santa Fe Horse Park"}, + {"categories": ["organization"], "term": "Santa Fe Waldorf School", "definition": "Santa Fe Waldorf School"}, + {"categories": ["organization"], "term": "Shidoni Foundry and Gallery", "definition": "Shidoni Foundry and Gallery"}, + {"categories": ["organization"], "term": "Sierra Grande Lodge", "definition": "Sierra Grande Lodge"}, + {"categories": ["organization"], "term": "Sierra Vista Retirement Community", "definition": "Sierra Vista Retirement Community"}, + {"categories": ["organization"], "term": "Slash Triangle Ranch", "definition": "Slash Triangle Ranch"}, + {"categories": ["organization"], "term": "Stagecoach Motel", "definition": "Stagecoach Motel"}, + {"categories": ["organization"], "term": "State of New Mexico", "definition": "State of New Mexico"}, + {"categories": ["organization"], "term": "Stephenson Ranch", "definition": "Stephenson Ranch"}, + {"categories": ["organization"], "term": "Sun Broadcasting Network", "definition": "Sun Broadcasting Network"}, + {"categories": ["organization"], "term": "Tano Rd LLC", "definition": "Tano Rd LLC"}, + {"categories": ["organization"], "term": "UNM-Taos", "definition": "UNM-Taos"}, + {"categories": ["organization"], "term": "Tee Pee Ranch/Tee Pee Subdivision", "definition": "Tee Pee Ranch/Tee Pee Subdivision"}, + {"categories": ["organization"], "term": "Tent Rock, Inc", "definition": "Tent Rock, Inc"}, + {"categories": ["organization"], "term": "Tesuque", "definition": "Tesuque"}, + {"categories": ["organization"], "term": "Tesuque MDWCA", "definition": "Tesuque MDWCA"}, + {"categories": ["organization"], "term": "The Great Cloud Zen Center", "definition": "The Great Cloud Zen Center"}, + {"categories": ["organization"], "term": "Three Rivers Ranch", "definition": "Three Rivers Ranch"}, + {"categories": ["organization"], "term": "Timberon Water and Sanitation District", "definition": "Timberon Water and Sanitation District"}, + {"categories": ["organization"], "term": "Town of Magdalena", "definition": "Town of Magdalena"}, + {"categories": ["organization"], "term": "Town of Taos", "definition": "Town of Taos"}, + {"categories": ["organization"], "term": "Town of Taos, National Guard Armory", "definition": "Town of Taos, National Guard Armory"}, + {"categories": ["organization"], "term": "Trinity Ranch", "definition": "Trinity Ranch"}, + {"categories": ["organization"], "term": "Tularosa Basin National Desalination Research Facility", "definition": "Tularosa Basin National Desalination Research Facility"}, + {"categories": ["organization"], "term": "Turquoise Trail Charter School", "definition": "Turquoise Trail Charter School"}, + {"categories": ["organization"], "term": "US Bureau of Indian Affairs, Santa Fe Indian School", "definition": "US Bureau of Indian Affairs, Santa Fe Indian School"}, + {"categories": ["organization"], "term": "USFS, Carson NF, Taos Office", "definition": "USFS, Carson NF, Taos Office"}, + {"categories": ["organization"], "term": "USFS, Cibola NF, Magdalena Ranger District", "definition": "USFS, Cibola NF, Magdalena Ranger District"}, + {"categories": ["organization"], "term": "USFS, Santa Fe NF, Espanola Ranger District", "definition": "USFS, Santa Fe NF, Espanola Ranger District"}, + {"categories": ["organization"], "term": "USFS/Bluewater Ranch", "definition": "USFS/Bluewater Ranch"}, + {"categories": ["organization"], "term": "Ute Mountain Farms", "definition": "Ute Mountain Farms"}, + {"categories": ["organization"], "term": "Velte", "definition": "Velte"}, + {"categories": ["organization"], "term": "Vereda Serena Property", "definition": "Vereda Serena Property"}, + {"categories": ["organization"], "term": "Village of Corona", "definition": "Village of Corona"}, + {"categories": ["organization"], "term": "Village of Floyd", "definition": "Village of Floyd"}, + {"categories": ["organization"], "term": "Village of Melrose", "definition": "Village of Melrose"}, + {"categories": ["organization"], "term": "Village of Vaughn", "definition": "Village of Vaughn"}, + {"categories": ["organization"], "term": "Vista Land Company", "definition": "Vista Land Company"}, + {"categories": ["organization"], "term": "Vista Redonda MDWCA", "definition": "Vista Redonda MDWCA"}, + {"categories": ["organization"], "term": "Vista de Oro de Placitas Water Users Coop", "definition": "Vista de Oro de Placitas Water Users Coop"}, + {"categories": ["organization"], "term": "Walker Ranch", "definition": "Walker Ranch"}, + {"categories": ["organization"], "term": "Wild & Woolley Trailer Ranch", "definition": "Wild & Woolley Trailer Ranch"}, + {"categories": ["organization"], "term": "Winter Brothers/U.S. Government", "definition": "Winter Brothers/U.S. Government"}, + {"categories": ["organization"], "term": "Yates Petroleum Corporation", "definition": "Yates Petroleum Corporation"}, + {"categories": ["organization"], "term": "Zamora Accounting Services", "definition": "Zamora Accounting Services"}, {"categories": ["collection_method"], "term": "manual", "definition": "manual sampling"}, {"categories": ["collection_method"], "term": "continuous", "definition": "continuous sampling"}, {"categories": ["role"], "term": "Owner", "definition": "Owner"}, From ec7fd384a20db340ba3cc075f9f4ac000b8e1c13 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 27 Oct 2025 14:08:00 -0600 Subject: [PATCH 06/17] WIP: map owners organizations --- .../data/owners_organization_mapper.json | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json index ed8495d33..788d0c19d 100644 --- a/transfers/data/owners_organization_mapper.json +++ b/transfers/data/owners_organization_mapper.json @@ -6,7 +6,7 @@ {"source": "Aspendale Baptist Camp", "target": "Aspendale Mountain Retreat"}, {"source": "Augustin Ranch LLC", "target": "Augustin Plains Ranch LLC"}, {"source": "B + B Cattle", "target": "B & B Cattle Co"}, - {"source": "BLM Taos Office", "target": "BLM"}, + {"source": "BLM Taos Office", "target": "BLM"}, {"source": "Berridge Distributing Company", "target": "Berridge Distributing Company"}, {"source": "Bishop's Lodge", "target": "Bishop's Lodge"}, {"source": "Bonanza Creek Ranch", "target": "Bonanza Creek Ranch"}, @@ -75,11 +75,11 @@ {"source": "Naiche Development", "target": "Naiche Development"}, {"source": "National Radio Astronomy Observatory", "target": "NRAO"}, {"source": "New Mexico Spaceport Authority", "target": "NMSA"}, - {"source": "New Mexico Tech", "target": "New Mexico Tech"}, - {"source": "Nogal Mutual Domestic Water Consumers Association", "target": "Nogal Mutual Domestic Water Consumers Association"}, + {"source": "New Mexico Tech", "target": "NMT"}, + {"source": "Nogal Mutual Domestic Water Consumers Association", "target": "Nogal MDWCA"}, {"source": "O Bar O Ranch", "target": "O Bar O Ranch"}, {"source": "OMI Wastewater Treatment Plant", "target": "OMI Wastewater Treatment Plant"}, - {"source": "Old Road Ranch Pardners Ltd.", "target": "Old Road Ranch Pardners Ltd."}, + {"source": "Old Road Ranch Pardners Ltd.", "target": "Old Road Ranch Pardners Ltd"}, {"source": "PNM Service Center", "target": "PNM Service Center"}, {"source": "PNM, Sangre de Cristo", "target": "PNM, Sangre de Cristo"}, {"source": "Peace Tabernacle Church", "target": "Peace Tabernacle Church"}, @@ -94,20 +94,20 @@ {"source": "Rio En Medio MDWCA", "target": "Rio En Medio MDWCA"}, {"source": "San Acacia MDWCA", "target": "San Acacia MDWCA"}, {"source": "San Juan Residences", "target": "San Juan Residences"}, - {"source": "Sandia National Laboratories", "target": "Sandia National Laboratories"}, + {"source": "Sandia National Laboratories", "target": "SNL"}, {"source": "Sangre de Cristo Center", "target": "Sangre de Cristo Center"}, {"source": "Sangre de Cristo Estates", "target": "Sangre de Cristo Estates"}, {"source": "Santa Fe Community College", "target": "Santa Fe Community College"}, - {"source": "Santa Fe County", "target": "Santa Fe County"}, - {"source": "Santa Fe County, Fire Facilities", "target": "Santa Fe County, Fire Facilities"}, - {"source": "Santa Fe County, Utilities Dept.", "target": "Santa Fe County, Utilities Dept."}, - {"source": "Santa Fe County, Valle Vista Water Utility, Inc.", "target": "Santa Fe County, Valle Vista Water Utility, Inc."}, + {"source": "Santa Fe County", "target": "SFC"}, + {"source": "Santa Fe County, Fire Facilities", "target": "SFC"}, + {"source": "Santa Fe County, Utilities Dept.", "target": "SFC"}, + {"source": "Santa Fe County, Valle Vista Water Utility, Inc.", "target": "Valle Vista Water Utility"}, {"source": "Santa Fe Downs", "target": "Santa Fe Downs"}, {"source": "Santa Fe Horse Park", "target": "Santa Fe Horse Park"}, {"source": "Santa Fe Municipal Airport", "target": "Santa Fe Municipal Airport"}, {"source": "Santa Fe Opera", "target": "Santa Fe Opera"}, {"source": "Santa Fe Waldorf School", "target": "Santa Fe Waldorf School"}, - {"source": "Shidoni Foundry, Inc.", "target": "Shidoni Foundry, Inc."}, + {"source": "Shidoni Foundry, Inc.", "target": "Shidoni Foundry and Gallery"}, {"source": "Sierra Grande Lodge", "target": "Sierra Grande Lodge"}, {"source": "Sierra Vista Retirement Community", "target": "Sierra Vista Retirement Community"}, {"source": "Slash Triangle Ranch", "target": "Slash Triangle Ranch"}, @@ -116,9 +116,9 @@ {"source": "Stephenson Ranch", "target": "Stephenson Ranch"}, {"source": "Sun Broadcasting Network", "target": "Sun Broadcasting Network"}, {"source": "Tano Rd LLC", "target": "Tano Rd LLC"}, - {"source": "Taos Municipal Schools, UNM Taos", "target": "Taos Municipal Schools, UNM Taos"}, + {"source": "Taos Municipal Schools, UNM Taos", "target": "UNM-Taos"}, {"source": "Tee Pee Ranch/Tee Pee Subdivision", "target": "Tee Pee Ranch/Tee Pee Subdivision"}, - {"source": "Tent Rock, Inc.", "target": "Tent Rock, Inc."}, + {"source": "Tent Rock, Inc.", "target": "Tent Rock, Inc"}, {"source": "Tesuque", "target": "Tesuque"}, {"source": "Tesuque MDWCA", "target": "Tesuque MDWCA"}, {"source": "The Great Cloud Zen Center", "target": "The Great Cloud Zen Center"}, @@ -128,9 +128,9 @@ {"source": "Town of Taos", "target": "Town of Taos"}, {"source": "Town of Taos, National Guard Armory", "target": "Town of Taos, National Guard Armory"}, {"source": "Trinity Ranch", "target": "Trinity Ranch"}, - {"source": "Tularosa Basin Natl. Desalination Research Facil.", "target": "Tularosa Basin Natl. Desalination Research Facil."}, + {"source": "Tularosa Basin Natl. Desalination Research Facil.", "target": "Tularosa Basin National Desalination Research Facility"}, {"source": "Turquoise Trail Charter School", "target": "Turquoise Trail Charter School"}, - {"source": "US Bureau of Indian Affairs, Indian School", "target": "US Bureau of Indian Affairs, Indian School"}, + {"source": "US Bureau of Indian Affairs, Indian School", "target": "US Bureau of Indian Affairs, Santa Fe Indian School"}, {"source": "USFS, Carson NF, Taos Office", "target": "USFS, Carson NF, Taos Office"}, {"source": "USFS, Cibola NF, Magdalena Ranger District", "target": "USFS, Cibola NF, Magdalena Ranger District"}, {"source": "USFS, Santa Fe NF, Espanola Ranger District", "target": "USFS, Santa Fe NF, Espanola Ranger District"}, @@ -146,11 +146,11 @@ {"source": "Village of Vaughn", "target": "Village of Vaughn"}, {"source": "Vista Land Company", "target": "Vista Land Company"}, {"source": "Vista Redonda MDWCA", "target": "Vista Redonda MDWCA"}, - {"source": "Vista Redondo MDWCA", "target": "Vista Redondo MDWCA"}, - {"source": "Vista de Oro Water Co-op", "target": "Vista de Oro Water Co-op"}, + {"source": "Vista Redondo MDWCA", "target": "Vista Redonda MDWCA"}, + {"source": "Vista de Oro Water Co-op", "target": "Vista de Oro de Placitas Water Users Coop"}, {"source": "Walker Ranch", "target": "Walker Ranch"}, {"source": "Wild & Woolley Trailer Ranch", "target": "Wild & Woolley Trailer Ranch"}, {"source": "Winter Brothers/U.S. Government", "target": "Winter Brothers/U.S. Government"}, - {"source": "Yates Petroleum", "target": "Yates Petroleum"}, + {"source": "Yates Petroleum", "target": "Yates Petroleum Corporation"}, {"source": "Zamora Accounting Services", "target": "Zamora Accounting Services"} ] \ No newline at end of file From d118ef8b619e183f22cd7f172d95ce9c0e4bbac4 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 27 Oct 2025 14:14:06 -0600 Subject: [PATCH 07/17] fix: remove duplicative SWCDs --- core/lexicon.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/lexicon.json b/core/lexicon.json index cd2dbb96d..a4250fb1b 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -362,12 +362,9 @@ {"categories": ["organization"], "term": "BLM", "definition": "Bureau of Land Management"}, {"categories": ["organization"], "term": "SFC", "definition": "Santa Fe County"}, {"categories": ["organization"], "term": "City of Santa Fe", "definition": "City of Santa Fe"}, - {"categories": ["organization"], "term": "NESWCD", "definition": "Northeastern Soil & Water Conservation District"}, {"categories": ["organization"], "term": "NMISC", "definition": "New Mexico Interstate Stream Commission"}, {"categories": ["organization"], "term": "PVACD", "definition": "Pecos Valley Artesian Conservancy District"}, - {"categories": ["organization"], "term": "TSWCD", "definition": "Taos Soil & Water Conservation District"}, {"categories": ["organization"], "term": "Bayard", "definition": "Bayard Municipal Water"}, - {"categories": ["organization"], "term": "OSWCD", "definition": "Otero Soil & Water Conservation District"}, {"categories": ["organization"], "term": "SNL", "definition": "Sandia National Laboratories"}, {"categories": ["organization"], "term": "USFS", "definition": "United States Forest Service"}, {"categories": ["organization"], "term": "NMT", "definition": "New Mexico Tech"}, From 08faed8fc5e1ebe840c99c182e2dad66f78f34bf Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 27 Oct 2025 14:17:35 -0600 Subject: [PATCH 08/17] fix: use name in lexicon for NESWCD --- transfers/data/measured_by_mapper.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transfers/data/measured_by_mapper.json b/transfers/data/measured_by_mapper.json index 1cee53751..0ecd333cb 100644 --- a/transfers/data/measured_by_mapper.json +++ b/transfers/data/measured_by_mapper.json @@ -38,7 +38,7 @@ "Minton.": [null, "Minton Engineers", "Organization"], "MJ Darr.": [null, "MJDarrconsult, Inc", "Organization"], "MJ Darr consultants": [null, "MJDarrconsult, Inc", "Organization"], - "NESWCD": [null, "Northeastern Soil and Water Conservation District", "Organization"], + "NESWCD": [null, "Northeastern SWCD", "Organization"], "OSE, ST": [[null, "NMOSE", "Organization"], ["Stacy Timmons", "NMBGMR", "Hydrogeologist"]], "PVACD person": [null, "PVACD", "Organization"], "Sandia Drillers": [null, "Sandia Well Service, Inc", "Organization"], From 6449b6fb29e84fcdbcdd01d8192bccbf89e23d45 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 27 Oct 2025 16:08:10 -0600 Subject: [PATCH 09/17] fix: add missing companies --- core/lexicon.json | 7 +++++-- transfers/data/owners_organization_mapper.json | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/lexicon.json b/core/lexicon.json index a4250fb1b..9bf076f83 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -370,6 +370,7 @@ {"categories": ["organization"], "term": "NMT", "definition": "New Mexico Tech"}, {"categories": ["organization"], "term": "NPS", "definition": "National Park Service"}, {"categories": ["organization"], "term": "NMRWA", "definition": "New Mexico Rural Water Association"}, + {"categories": ["organization"], "term": "NMDOT", "definition": "New Mexico Department of Transportation"}, {"categories": ["organization"], "term": "Taos SWCD", "definition": "Taos Soil and Water Conservation District"}, {"categories": ["organization"], "term": "Otero SWCD", "definition": "Otero Soil and Water Conservation District"}, {"categories": ["organization"], "term": "Northeastern SWCD", "definition": "Northeastern Soil and Water Conservation District"}, @@ -427,6 +428,7 @@ {"categories": ["organization"], "term": "Cemex, Inc", "definition": "Cemex, Inc"}, {"categories": ["organization"], "term": "Cerro Community Center", "definition": "Cerro Community Center"}, {"categories": ["organization"], "term": "Santa Fe Jewish Center", "definition": "Santa Fe Jewish Center"}, + {"categories": ["organization"], "term": "Chupadero MDWCA", "definition": "Chupadero MDWCA"}, {"categories": ["organization"], "term": "Cielo Lumbre HOA", "definition": "Cielo Lumbre HOA"}, {"categories": ["organization"], "term": "Circle Cross Ranch", "definition": "Circle Cross Ranch"}, {"categories": ["organization"], "term": "City of Alamogordo", "definition": "City of Alamogordo"}, @@ -481,8 +483,8 @@ {"categories": ["organization"], "term": "OMI Wastewater Treatment Plant", "definition": "OMI Wastewater Treatment Plant"}, {"categories": ["organization"], "term": "Old Road Ranch Pardners Ltd", "definition": "Old Road Ranch Pardners Ltd"}, {"categories": ["organization"], "term": "PNM Service Center", "definition": "PNM Service Center"}, - {"categories": ["organization"], "term": "PNM Service Center", "definition": "PNM, Sangre de Cristo"}, - {"categories": ["organization"], "term": "PNM Service Center", "definition": "Peace Tabernacle Church"}, + {"categories": ["organization"], "term": "PNM, Sangre de Cristo", "definition": "PNM, Sangre de Cristo"}, + {"categories": ["organization"], "term": "Peace Tabernacle Church", "definition": "Peace Tabernacle Church"}, {"categories": ["organization"], "term": "Pecos Trail Inn", "definition": "Pecos Trail Inn"}, {"categories": ["organization"], "term": "Pelican Spa", "definition": "Pelican Spa"}, {"categories": ["organization"], "term": "Pistachio Tree Ranch", "definition": "Pistachio Tree Ranch"}, @@ -503,6 +505,7 @@ {"categories": ["organization"], "term": "Valle Vista Water Utility", "definition": "Valle Vista Water Utility"}, {"categories": ["organization"], "term": "Santa Fe Downs", "definition": "Santa Fe Downs"}, {"categories": ["organization"], "term": "Santa Fe Horse Park", "definition": "Santa Fe Horse Park"}, + {"categories": ["organization"], "term": "Santa Fe Opera", "definition": "Santa Fe Opera"}, {"categories": ["organization"], "term": "Santa Fe Waldorf School", "definition": "Santa Fe Waldorf School"}, {"categories": ["organization"], "term": "Shidoni Foundry and Gallery", "definition": "Shidoni Foundry and Gallery"}, {"categories": ["organization"], "term": "Sierra Grande Lodge", "definition": "Sierra Grande Lodge"}, diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json index 788d0c19d..0e9ca6650 100644 --- a/transfers/data/owners_organization_mapper.json +++ b/transfers/data/owners_organization_mapper.json @@ -18,6 +18,7 @@ {"source": "Cemex Plant", "target": "Cemex, Inc"}, {"source": "Cerro Community Center", "target": "Cerro Community Center"}, {"source": "Chabad Jewish Center", "target": "Santa Fe Jewish Center"}, + {"source": "Chupadero MDWCA", "target": "Chupadero MDWCA"}, {"source": "Cielo Lumbre HOA", "target": "Cielo Lumbre HOA"}, {"source": "Circle Cross Ranch", "target": "Circle Cross Ranch"}, {"source": "City of Alamogordo", "target": "City of Alamogordo"}, @@ -67,6 +68,8 @@ {"source": "Media Gravel Pit", "target": "Medina Gravel Pit"}, {"source": "Mendenhall Trading Co.", "target": "Mendenhall Trading Co"}, {"source": "Mesa Verde Ranch", "target": "Mesa Verde Ranch"}, + {"source": "NESWCD", "target": "Northeastern SWCD"}, + {"source": "TSWCD", "target": "Taos SWCD"}, {"source": "NM Environment Dept.", "target": "NMED"}, {"source": "NM Game & Fish Dept.", "target": "NMDGF"}, {"source": "NM Office of the State Engineer", "target": "NMOSE"}, From 2da5326c14aaf1ae5bd84899d18fffb4dbcd8402 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 27 Oct 2025 16:19:49 -0600 Subject: [PATCH 10/17] fix: fix nma company to organization mapper implementation --- transfers/contact_transfer.py | 39 ++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/transfers/contact_transfer.py b/transfers/contact_transfer.py index 52c082a42..0327ac7ea 100644 --- a/transfers/contact_transfer.py +++ b/transfers/contact_transfer.py @@ -14,8 +14,14 @@ # limitations under the License. # =============================================================================== from pydantic import ValidationError - -from transfers.util import read_csv, filter_to_valid_point_ids, replace_nans +import json + +from transfers.util import ( + read_csv, + filter_to_valid_point_ids, + replace_nans, + get_transfers_data_path, +) from transfers.logger import logger from db import Thing, Contact, ThingContactAssociation, Email, Phone, Address from schemas.contact import CreateContact, CreateAddress, CreatePhone, CreateEmail @@ -44,6 +50,13 @@ def extract_owner_role(comment): def transfer_contacts(session): + co_to_org_mapper_path = get_transfers_data_path("owners_organization_mapper.json") + with open(co_to_org_mapper_path, "r") as f: + co_to_org_mapper = {} + co_to_org_json = json.load(f) + for mapping in co_to_org_json: + co_to_org_mapper[mapping["source"]] = mapping["target"] + odf = read_csv("OwnersData") odf = odf.drop(["OBJECTID", "GlobalID"], axis=1) ldf = read_csv("OwnerLink") @@ -67,7 +80,7 @@ def transfer_contacts(session): # TODO: use contact_helper.add_contact try: - _add_first_contact(session, row, thing) + _add_first_contact(session, row, thing, co_to_org_mapper) session.commit() session.flush() logger.info(f"added first contact for PointID {row.PointID}") @@ -83,7 +96,7 @@ def transfer_contacts(session): session.rollback() try: - _add_second_contact(session, row, thing) + _add_second_contact(session, row, thing, co_to_org_mapper) session.commit() session.flush() logger.info(f"added second contact for PointID {row.PointID}") @@ -99,7 +112,7 @@ def transfer_contacts(session): session.rollback() -def _add_first_contact(session, row, thing): +def _add_first_contact(session, row, thing, co_to_org_mapper): # TODO: extract role from OwnerComment # role = extract_owner_role(row.OwnerComment) role = "Owner" @@ -107,13 +120,18 @@ def _add_first_contact(session, row, thing): name = _make_name(row.FirstName, row.LastName) + if row.Company and row.Company in co_to_org_mapper: + organization = co_to_org_mapper[row.Company] + else: + organization = row.Company + contact_data = { "thing_id": thing.id, "release_status": release_status, "name": name, "role": role, "contact_type": "Primary", - "organization": row.Company, + "organization": organization, "nma_pk_owners": row.OwnerKey, "addresses": [], "emails": [], @@ -186,18 +204,23 @@ def _add_first_contact(session, row, thing): contact.addresses.append(address) -def _add_second_contact(session, row, thing): +def _add_second_contact(session, row, thing, co_to_org_mapper): release_status = "private" name = _make_name(row.SecondFirstName, row.SecondLastName) + if row.Company and row.Company in co_to_org_mapper: + organization = co_to_org_mapper[row.Company] + else: + organization = row.Company + contact_data = { "thing_id": thing.id, "release_status": release_status, "name": name, "role": "Owner", "contact_type": "Secondary", - "organization": row.Company, + "organization": organization, "nma_pk_owners": row.OwnerKey, "addresses": [], "emails": [], From b5af03c0dd00eb80903a6701cace217be922a9a7 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 27 Oct 2025 16:24:40 -0600 Subject: [PATCH 11/17] refactor: do not create duplicate contacts --- transfers/waterlevels_transfer.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/transfers/waterlevels_transfer.py b/transfers/waterlevels_transfer.py index d78c1b40e..aa86ca182 100644 --- a/transfers/waterlevels_transfer.py +++ b/transfers/waterlevels_transfer.py @@ -171,6 +171,20 @@ def transfer_water_levels(session): for name, organization, role in zip(*contact_info): if (name, organization) in created_contacts: contact = created_contacts[(name, organization)] + elif ( + session.query(Contact) + .filter_by(name=name, organization=organization) + .first() + ): + # don't create a new contact if it already exists in the database + contact = ( + session.query(Contact) + .filter_by(name=name, organization=organization) + .first() + ) + logger.info( + f"{SPACE_2}Using existing contact: | Name {contact.name} | Role {contact.role} | Organization {contact.organization} | nma_pk_waterlevels {contact.nma_pk_waterlevels}" + ) else: try: # create new contact if not already created From d4a122d17bfcb00a9a186da6ee0f3e8403043df7 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Tue, 28 Oct 2025 16:09:18 -0600 Subject: [PATCH 12/17] refactor: update company mapping per Ethan's feedback --- core/lexicon.json | 16 +++++++++---- transfers/data/measured_by_mapper.json | 6 ++--- .../data/owners_organization_mapper.json | 24 +++++++++---------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/core/lexicon.json b/core/lexicon.json index 9bf076f83..de9325914 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -360,8 +360,15 @@ {"categories": ["organization"], "term": "NMBGMR", "definition": "New Mexico Bureau of Geology and Mineral Resources"}, {"categories": ["organization"], "term": "Bernalillo County", "definition": "Bernalillo County"}, {"categories": ["organization"], "term": "BLM", "definition": "Bureau of Land Management"}, + {"categories": ["organization"], "term": "BLM Taos Office", "definition": "Bureau of Land Management Taos Office"}, {"categories": ["organization"], "term": "SFC", "definition": "Santa Fe County"}, + {"categories": ["organization"], "term": "SFC, Fire Facilities", "definition": "Santa Fe County, Fire Facilities"}, + {"categories": ["organization"], "term": "SFC, Utilities Dept.", "definition": "Santa Fe County, Utilities Dept."}, + {"categories": ["organization"], "term": "SFC, Valle Vista Water Utility, Inc.", "definition": "Santa Fe County, Valle Vista Water Utility, Inc."}, {"categories": ["organization"], "term": "City of Santa Fe", "definition": "City of Santa Fe"}, + {"categories": ["organization"], "term": "City of Santa Fe WWTP", "definition": "City of Santa Fe WWTP"}, + {"categories": ["organization"], "term": "City of Santa Fe, Municipal Recreation Complex", "definition": "City of Santa Fe, Municipal Recreation Complex"}, + {"categories": ["organization"], "term": "City of Santa Fe, Sangre de Cristo Water Co.", "definition": "City of Santa Fe, Sangre de Cristo Water Co."}, {"categories": ["organization"], "term": "NMISC", "definition": "New Mexico Interstate Stream Commission"}, {"categories": ["organization"], "term": "PVACD", "definition": "Pecos Valley Artesian Conservancy District"}, {"categories": ["organization"], "term": "Bayard", "definition": "Bayard Municipal Water"}, @@ -432,7 +439,7 @@ {"categories": ["organization"], "term": "Cielo Lumbre HOA", "definition": "Cielo Lumbre HOA"}, {"categories": ["organization"], "term": "Circle Cross Ranch", "definition": "Circle Cross Ranch"}, {"categories": ["organization"], "term": "City of Alamogordo", "definition": "City of Alamogordo"}, - {"categories": ["organization"], "term": "City of Portales", "definition": "City of Portales"}, + {"categories": ["organization"], "term": "City of Portales, Public Works Dept.", "definition": "City of Portales, Public Works Dept."}, {"categories": ["organization"], "term": "City of Socorro", "definition": "City of Socorro"}, {"categories": ["organization"], "term": "Commonwealth Conservancy", "definition": "Commonwealth Conservancy"}, {"categories": ["organization"], "term": "Country Club Garden Mobile Home Park", "definition": "Country Club Garden Mobile Home Park"}, @@ -483,7 +490,6 @@ {"categories": ["organization"], "term": "OMI Wastewater Treatment Plant", "definition": "OMI Wastewater Treatment Plant"}, {"categories": ["organization"], "term": "Old Road Ranch Pardners Ltd", "definition": "Old Road Ranch Pardners Ltd"}, {"categories": ["organization"], "term": "PNM Service Center", "definition": "PNM Service Center"}, - {"categories": ["organization"], "term": "PNM, Sangre de Cristo", "definition": "PNM, Sangre de Cristo"}, {"categories": ["organization"], "term": "Peace Tabernacle Church", "definition": "Peace Tabernacle Church"}, {"categories": ["organization"], "term": "Pecos Trail Inn", "definition": "Pecos Trail Inn"}, {"categories": ["organization"], "term": "Pelican Spa", "definition": "Pelican Spa"}, @@ -503,6 +509,7 @@ {"categories": ["organization"], "term": "Santa Fe County, Utilities Dept.", "definition": "Santa Fe County, Utilities Dept."}, {"categories": ["organization"], "term": "Sangre de Cristo Center", "definition": "Sangre de Cristo Center"}, {"categories": ["organization"], "term": "Valle Vista Water Utility", "definition": "Valle Vista Water Utility"}, + {"categories": ["organization"], "term": "Santa Fe County, Valle Vista Water Utility, Inc.", "definition": "Santa Fe County, Valle Vista Water Utility, Inc."}, {"categories": ["organization"], "term": "Santa Fe Downs", "definition": "Santa Fe Downs"}, {"categories": ["organization"], "term": "Santa Fe Horse Park", "definition": "Santa Fe Horse Park"}, {"categories": ["organization"], "term": "Santa Fe Opera", "definition": "Santa Fe Opera"}, @@ -519,7 +526,6 @@ {"categories": ["organization"], "term": "UNM-Taos", "definition": "UNM-Taos"}, {"categories": ["organization"], "term": "Tee Pee Ranch/Tee Pee Subdivision", "definition": "Tee Pee Ranch/Tee Pee Subdivision"}, {"categories": ["organization"], "term": "Tent Rock, Inc", "definition": "Tent Rock, Inc"}, - {"categories": ["organization"], "term": "Tesuque", "definition": "Tesuque"}, {"categories": ["organization"], "term": "Tesuque MDWCA", "definition": "Tesuque MDWCA"}, {"categories": ["organization"], "term": "The Great Cloud Zen Center", "definition": "The Great Cloud Zen Center"}, {"categories": ["organization"], "term": "Three Rivers Ranch", "definition": "Three Rivers Ranch"}, @@ -534,8 +540,8 @@ {"categories": ["organization"], "term": "USFS, Carson NF, Taos Office", "definition": "USFS, Carson NF, Taos Office"}, {"categories": ["organization"], "term": "USFS, Cibola NF, Magdalena Ranger District", "definition": "USFS, Cibola NF, Magdalena Ranger District"}, {"categories": ["organization"], "term": "USFS, Santa Fe NF, Espanola Ranger District", "definition": "USFS, Santa Fe NF, Espanola Ranger District"}, - {"categories": ["organization"], "term": "USFS/Bluewater Ranch", "definition": "USFS/Bluewater Ranch"}, {"categories": ["organization"], "term": "Ute Mountain Farms", "definition": "Ute Mountain Farms"}, + {"categories": ["organization"], "term": "VA Hospital", "definition": "VA Hospital"}, {"categories": ["organization"], "term": "Velte", "definition": "Velte"}, {"categories": ["organization"], "term": "Vereda Serena Property", "definition": "Vereda Serena Property"}, {"categories": ["organization"], "term": "Village of Corona", "definition": "Village of Corona"}, @@ -547,7 +553,7 @@ {"categories": ["organization"], "term": "Vista de Oro de Placitas Water Users Coop", "definition": "Vista de Oro de Placitas Water Users Coop"}, {"categories": ["organization"], "term": "Walker Ranch", "definition": "Walker Ranch"}, {"categories": ["organization"], "term": "Wild & Woolley Trailer Ranch", "definition": "Wild & Woolley Trailer Ranch"}, - {"categories": ["organization"], "term": "Winter Brothers/U.S. Government", "definition": "Winter Brothers/U.S. Government"}, + {"categories": ["organization"], "term": "Winter Brothers", "definition": "Winter Brothers"}, {"categories": ["organization"], "term": "Yates Petroleum Corporation", "definition": "Yates Petroleum Corporation"}, {"categories": ["organization"], "term": "Zamora Accounting Services", "definition": "Zamora Accounting Services"}, {"categories": ["collection_method"], "term": "manual", "definition": "manual sampling"}, diff --git a/transfers/data/measured_by_mapper.json b/transfers/data/measured_by_mapper.json index 0ecd333cb..a24ac6a22 100644 --- a/transfers/data/measured_by_mapper.json +++ b/transfers/data/measured_by_mapper.json @@ -267,7 +267,7 @@ "Kilmer/Jenkins": [["Kilmer", "Unknown", "Unknown"], ["David N. Jenkins", "Unknown", "Unknown"]], "KP": ["Kitty Pokorny", "NMBGMR", "Hydrogeologist"], "KP, MF": [["Kitty Pokorny", "NMBGMR", "Hydrogeologist"], ["Marissa Fichera", "NMBGMR", "Hydrogeologist"]], - "KP, MR": [["Kitty Pokorny", "NMBGMR", "Hydrogeologist"], ["MR", "NMBGMR", "Unknown"]], + "KP, MR": [["Kitty Pokorny", "NMBGMR", "Hydrogeologist"], ["Madeline Richards", "NMT", "Graduate Student"]], "KP, MT": [["Kitty Pokorny", "NMBGMR", "Hydrogeologist"], ["MT", "Unknown", "Unknown"]], "KP, ST": [["Kitty Pokorny", "NMBGMR", "Hydrogeologist"], ["Stacy Timmons", "NMBGMR", "Hydrogeologist"]], "KP, TK": [["Kitty Pokorny", "NMBGMR", "Hydrogeologist"], ["Trevor Kludt", "NMBGMR", "Technician"]], @@ -311,7 +311,7 @@ "SC, GR": [["Scott Christenson", "NMBGMR", "Technician"], ["Geoff Rawling", "NMBGMR", "Hydrogeologist"]], "SC, KP": [["Scott Christenson", "NMBGMR", "Technician"], ["Kitty Pokorny", "NMBGMR", "Hydrogeologist"]], "SC, MA": [["Scott Christenson", "NMBGMR", "Technician"], ["MA", "Unknown", "Unknown"]], - "SC, MR": [["Scott Christenson", "NMBGMR", "Technician"], ["MR", "NMBGMR", "Unknown"]], + "SC, MR": [["Scott Christenson", "NMBGMR", "Technician"], ["Madeline Richards", "NMT", "Graduate Student"]], "SC, SMC": [["Scott Christenson", "NMBGMR", "Technician"], ["Sara Chudnoff", "NMBGMR", "Hydrogeologist"]], "SC, ST": [["Scott Christenson", "NMBGMR", "Technician"], ["Stacy Timmons", "NMBGMR", "Hydrogeologist"]], "SC, TK": [["Scott Christenson", "NMBGMR", "Technician"], ["Trevor Kludt", "NMBGMR", "Technician"]], @@ -368,7 +368,7 @@ "TK, ST, CE": [["Trevor Kludt", "NMBGMR", "Technician"], ["Stacy Timmons", "NMBGMR", "Hydrogeologist"], ["Cathy Eisen", "NMBGMR", "Hydrogeologist"]], "TK, ST; CE": [["Trevor Kludt", "NMBGMR", "Technician"], ["Stacy Timmons", "NMBGMR", "Hydrogeologist"], ["Cathy Eisen", "NMBGMR", "Hydrogeologist"]], "TK, JAA": [["Trevor Kludt", "NMBGMR", "Technician"], ["JAA", "NMBGMR", "Unknown"]], - "TK, MR": [["Trevor Kludt", "NMBGMR", "Technician"], ["MR", "Unknown", "Unknown"]], + "TK, MR": [["Trevor Kludt", "NMBGMR", "Technician"], ["Madeline Richards", "NMT", "Graduate Student"]], "TK, TN": [["Trevor Kludt", "NMBGMR", "Technician"], ["Talon Newton", "NMBGMR", "Hydrogeologist"]], "TN": ["Talon Newton", "NMBGMR", "Hydrogeologist"], "TN, LL": [["Talon Newton", "NMBGMR", "Hydrogeologist"], ["Lewis Land", "NMBGMR", "Hydrogeologist"]], diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json index 0e9ca6650..412868dcd 100644 --- a/transfers/data/owners_organization_mapper.json +++ b/transfers/data/owners_organization_mapper.json @@ -6,7 +6,7 @@ {"source": "Aspendale Baptist Camp", "target": "Aspendale Mountain Retreat"}, {"source": "Augustin Ranch LLC", "target": "Augustin Plains Ranch LLC"}, {"source": "B + B Cattle", "target": "B & B Cattle Co"}, - {"source": "BLM Taos Office", "target": "BLM"}, + {"source": "BLM Taos Office", "target": "BLM Taos Office"}, {"source": "Berridge Distributing Company", "target": "Berridge Distributing Company"}, {"source": "Bishop's Lodge", "target": "Bishop's Lodge"}, {"source": "Bonanza Creek Ranch", "target": "Bonanza Creek Ranch"}, @@ -22,10 +22,10 @@ {"source": "Cielo Lumbre HOA", "target": "Cielo Lumbre HOA"}, {"source": "Circle Cross Ranch", "target": "Circle Cross Ranch"}, {"source": "City of Alamogordo", "target": "City of Alamogordo"}, - {"source": "City of Portales, Public Works Dept.", "target": "City of Portales"}, - {"source": "City of Santa Fe WWTP", "target": "City of Santa Fe"}, - {"source": "City of Santa Fe, Municipal Recreation Complex", "target": "City of Santa Fe"}, - {"source": "City of Santa Fe, Sangre de Cristo Water Co.", "target": "City of Santa Fe"}, + {"source": "City of Portales, Public Works Dept.", "target": "City of Portales, Public Works Dept."}, + {"source": "City of Santa Fe WWTP", "target": "City of Santa Fe WWTP"}, + {"source": "City of Santa Fe, Municipal Recreation Complex", "target": "City of Santa Fe, Municipal Recreation Complex"}, + {"source": "City of Santa Fe, Sangre de Cristo Water Co.", "target": "City of Santa Fe, Sangre de Cristo Water Co."}, {"source": "City of Socorro", "target": "City of Socorro"}, {"source": "Commonwealth Conservancy", "target": "Commonwealth Conservancy"}, {"source": "Country Club Garden MHP", "target": "Country Club Garden Mobile Home Park"}, @@ -84,7 +84,7 @@ {"source": "OMI Wastewater Treatment Plant", "target": "OMI Wastewater Treatment Plant"}, {"source": "Old Road Ranch Pardners Ltd.", "target": "Old Road Ranch Pardners Ltd"}, {"source": "PNM Service Center", "target": "PNM Service Center"}, - {"source": "PNM, Sangre de Cristo", "target": "PNM, Sangre de Cristo"}, + {"source": "PNM, Sangre de Cristo", "target": "PNM Service Center"}, {"source": "Peace Tabernacle Church", "target": "Peace Tabernacle Church"}, {"source": "Pecos Trail Inn", "target": "Pecos Trail Inn"}, {"source": "Pelican Spa", "target": "Pelican Spa"}, @@ -102,9 +102,9 @@ {"source": "Sangre de Cristo Estates", "target": "Sangre de Cristo Estates"}, {"source": "Santa Fe Community College", "target": "Santa Fe Community College"}, {"source": "Santa Fe County", "target": "SFC"}, - {"source": "Santa Fe County, Fire Facilities", "target": "SFC"}, - {"source": "Santa Fe County, Utilities Dept.", "target": "SFC"}, - {"source": "Santa Fe County, Valle Vista Water Utility, Inc.", "target": "Valle Vista Water Utility"}, + {"source": "Santa Fe County, Fire Facilities", "target": "SFC, Fire Facilities"}, + {"source": "Santa Fe County, Utilities Dept.", "target": "SFC, Utilities Dept."}, + {"source": "Santa Fe County, Valle Vista Water Utility, Inc.", "target": "Santa Fe County, Valle Vista Water Utility, Inc."}, {"source": "Santa Fe Downs", "target": "Santa Fe Downs"}, {"source": "Santa Fe Horse Park", "target": "Santa Fe Horse Park"}, {"source": "Santa Fe Municipal Airport", "target": "Santa Fe Municipal Airport"}, @@ -122,7 +122,7 @@ {"source": "Taos Municipal Schools, UNM Taos", "target": "UNM-Taos"}, {"source": "Tee Pee Ranch/Tee Pee Subdivision", "target": "Tee Pee Ranch/Tee Pee Subdivision"}, {"source": "Tent Rock, Inc.", "target": "Tent Rock, Inc"}, - {"source": "Tesuque", "target": "Tesuque"}, + {"source": "Tesuque", "target": "Tesuque MDWCA"}, {"source": "Tesuque MDWCA", "target": "Tesuque MDWCA"}, {"source": "The Great Cloud Zen Center", "target": "The Great Cloud Zen Center"}, {"source": "Three Rivers Ranch", "target": "Three Rivers Ranch"}, @@ -137,7 +137,7 @@ {"source": "USFS, Carson NF, Taos Office", "target": "USFS, Carson NF, Taos Office"}, {"source": "USFS, Cibola NF, Magdalena Ranger District", "target": "USFS, Cibola NF, Magdalena Ranger District"}, {"source": "USFS, Santa Fe NF, Espanola Ranger District", "target": "USFS, Santa Fe NF, Espanola Ranger District"}, - {"source": "USFS/Bluewater Ranch", "target": "USFS/Bluewater Ranch"}, + {"source": "USFS/Bluewater Ranch", "target": "USFS"}, {"source": "Ute Mountain Farms", "target": "Ute Mountain Farms"}, {"source": "VA Hospital", "target": "VA Hospital"}, {"source": "Valle Vista Water Utility", "target": "Valle Vista Water Utility"}, @@ -153,7 +153,7 @@ {"source": "Vista de Oro Water Co-op", "target": "Vista de Oro de Placitas Water Users Coop"}, {"source": "Walker Ranch", "target": "Walker Ranch"}, {"source": "Wild & Woolley Trailer Ranch", "target": "Wild & Woolley Trailer Ranch"}, - {"source": "Winter Brothers/U.S. Government", "target": "Winter Brothers/U.S. Government"}, + {"source": "Winter Brothers/U.S. Government", "target": "Winter Brothers"}, {"source": "Yates Petroleum", "target": "Yates Petroleum Corporation"}, {"source": "Zamora Accounting Services", "target": "Zamora Accounting Services"} ] \ No newline at end of file From f01fa0e7fd7f13e0bc5dd74df055faed2d596676 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Wed, 29 Oct 2025 09:51:52 -0600 Subject: [PATCH 13/17] feat: ignore nma_csv_cache dir --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 926445422..e8b9d01ba 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ migrate.sh launcher.sh gcs_credentials.json transfers/data/assets* +transfers/data/nma_csv_cache/* transfers/transfer*.log transfer*.log tests/features/*.feature From 9416e054b2cc242e6d4c93548eed5e8909bd2011 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Wed, 29 Oct 2025 09:57:24 -0600 Subject: [PATCH 14/17] feat: ensure unique contacts from name and org --- db/contact.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/db/contact.py b/db/contact.py index 5a4c0f4bb..77454debd 100644 --- a/db/contact.py +++ b/db/contact.py @@ -17,6 +17,7 @@ from sqlalchemy import Integer, ForeignKey, String from sqlalchemy.ext.associationproxy import association_proxy, AssociationProxy +from sqlalchemy.ext.declarative import UniqueConstraint from sqlalchemy.orm import relationship, Mapped, mapped_column from sqlalchemy_utils import TSVectorType @@ -113,6 +114,10 @@ class Contact(Base, AutoBaseMixin, ReleaseMixin): TSVectorType("name", "role", "organization", "nma_pk_owners") ) + __table_args__ = ( + UniqueConstraint("name", "organization", name="uq_contact_name_organization"), + ) + class Phone(Base, AutoBaseMixin, ReleaseMixin): contact_id: Mapped[int] = mapped_column( From f9bc446aa5b2a53ff699a80f697f5a8f05e3f460 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Wed, 29 Oct 2025 09:57:46 -0600 Subject: [PATCH 15/17] WIP: company to org mapper --- transfers/contact_transfer.py | 15 +- .../data/owners_organization_mapper.json | 318 +++++++++--------- transfers/waterlevels_transfer.py | 14 - 3 files changed, 162 insertions(+), 185 deletions(-) diff --git a/transfers/contact_transfer.py b/transfers/contact_transfer.py index ebe301346..d45b51bff 100644 --- a/transfers/contact_transfer.py +++ b/transfers/contact_transfer.py @@ -53,10 +53,7 @@ def transfer_contacts(session): co_to_org_mapper_path = get_transfers_data_path("owners_organization_mapper.json") with open(co_to_org_mapper_path, "r") as f: - co_to_org_mapper = {} - co_to_org_json = json.load(f) - for mapping in co_to_org_json: - co_to_org_mapper[mapping["source"]] = mapping["target"] + co_to_org_mapper = json.load(f) odf = read_csv("OwnersData") odf = odf.drop(["OBJECTID", "GlobalID"], axis=1) @@ -121,10 +118,7 @@ def _add_first_contact(session, row, thing, co_to_org_mapper): name = _make_name(row.FirstName, row.LastName) - if row.Company and row.Company in co_to_org_mapper: - organization = co_to_org_mapper[row.Company] - else: - organization = row.Company + organization = co_to_org_mapper.get(row.Company, row.Company) contact_data = { "thing_id": thing.id, @@ -210,10 +204,7 @@ def _add_second_contact(session, row, thing, co_to_org_mapper): release_status = "private" name = _make_name(row.SecondFirstName, row.SecondLastName) - if row.Company and row.Company in co_to_org_mapper: - organization = co_to_org_mapper[row.Company] - else: - organization = row.Company + organization = co_to_org_mapper.get(row.Company, row.Company) contact_data = { "thing_id": thing.id, diff --git a/transfers/data/owners_organization_mapper.json b/transfers/data/owners_organization_mapper.json index 412868dcd..5ce45a8bf 100644 --- a/transfers/data/owners_organization_mapper.json +++ b/transfers/data/owners_organization_mapper.json @@ -1,159 +1,159 @@ -[ - {"source": "Abeyta Engineering", "target": "Abeyta Engineering, Inc"}, - {"source": "Adobe Ranch", "target": "Adobe Ranch"}, - {"source": "Agua Fria Water Assn.", "target": "Agua Fria Community Water Association"}, - {"source": "Apache Gap Ranch", "target": "Apache Gap Ranch"}, - {"source": "Aspendale Baptist Camp", "target": "Aspendale Mountain Retreat"}, - {"source": "Augustin Ranch LLC", "target": "Augustin Plains Ranch LLC"}, - {"source": "B + B Cattle", "target": "B & B Cattle Co"}, - {"source": "BLM Taos Office", "target": "BLM Taos Office"}, - {"source": "Berridge Distributing Company", "target": "Berridge Distributing Company"}, - {"source": "Bishop's Lodge", "target": "Bishop's Lodge"}, - {"source": "Bonanza Creek Ranch", "target": "Bonanza Creek Ranch"}, - {"source": "Bug Scuffle Water Association", "target": "Bug Scuffle Water Association"}, - {"source": "Bureau of Land Management", "target": "BLM"}, - {"source": "Camp Wehinahpay", "target": "Wehinahpay Mountain Camp"}, - {"source": "Campbell Ranch", "target": "Campbell Ranch"}, - {"source": "Capitol Ford Auto Body", "target": "Capitol Ford Santa Fe"}, - {"source": "Cemex Plant", "target": "Cemex, Inc"}, - {"source": "Cerro Community Center", "target": "Cerro Community Center"}, - {"source": "Chabad Jewish Center", "target": "Santa Fe Jewish Center"}, - {"source": "Chupadero MDWCA", "target": "Chupadero MDWCA"}, - {"source": "Cielo Lumbre HOA", "target": "Cielo Lumbre HOA"}, - {"source": "Circle Cross Ranch", "target": "Circle Cross Ranch"}, - {"source": "City of Alamogordo", "target": "City of Alamogordo"}, - {"source": "City of Portales, Public Works Dept.", "target": "City of Portales, Public Works Dept."}, - {"source": "City of Santa Fe WWTP", "target": "City of Santa Fe WWTP"}, - {"source": "City of Santa Fe, Municipal Recreation Complex", "target": "City of Santa Fe, Municipal Recreation Complex"}, - {"source": "City of Santa Fe, Sangre de Cristo Water Co.", "target": "City of Santa Fe, Sangre de Cristo Water Co."}, - {"source": "City of Socorro", "target": "City of Socorro"}, - {"source": "Commonwealth Conservancy", "target": "Commonwealth Conservancy"}, - {"source": "Country Club Garden MHP", "target": "Country Club Garden Mobile Home Park"}, - {"source": "Crossroads Cattle Co., Ltd.", "target": "Crossroads Cattle Co., Ltd"}, - {"source": "Double H Ranch", "target": "Double H Ranch"}, - {"source": "E.A. Meadows East", "target": "E.A. Meadows East"}, - {"source": "El Camino Realty", "target": "El Camino Realty, Inc"}, - {"source": "El Dorado Utilities", "target": "Eldorado Area Water & Sanitation District"}, - {"source": "El Gancho Restaurant", "target": "Bourbon Grill at El Gancho"}, - {"source": "El Prado HOA", "target": "El Prado HOA"}, - {"source": "El Rancho de las Golondrinas", "target": "El Rancho de las Golondrinas"}, - {"source": "El Rito MDWCA", "target": "El Rito Canyon MDWCA"}, - {"source": "Eldorado Water and Sanitation District", "target": "Eldorado Area Water & Sanitation District"}, - {"source": "Encantado Enterprises", "target": "Encantado Enterprises"}, - {"source": "Estrella Concepts LLC", "target": "Estrella Concepts LLC"}, - {"source": "Farr Cattle Company (Farr Ranch", "target": "Farr Cattle Company"}, - {"source": "Fire Department", "target": "Sixteen Springs Fire Department"}, - {"source": "Fire Water Lodge", "target": "Fire Water Lodge"}, - {"source": "Ford County Land and Cattle", "target": "Ford County Land & Cattle Company, Inc"}, - {"source": "Friendly Construction, Inc.", "target": "Friendly Construction, Inc"}, - {"source": "Hacienda Del Cerezo, Ltd.", "target": "Hacienda Del Cerezo"}, - {"source": "Hefker Vega Ranch", "target": "Hefker Vega Ranch"}, - {"source": "High Nogal Ranch", "target": "High Nogal Ranch"}, - {"source": "Holloman Air Force Base", "target": "Holloman Air Force Base"}, - {"source": "Hyde Park Estates MDWCA", "target": "Hyde Park Estates MDWCA"}, - {"source": "Hyde Park Estates WUA", "target": "Hyde Park Estates MDWCA"}, - {"source": "Ideal Mobile Home & RV", "target": "Desert Village RV & Mobile Home Park"}, - {"source": "K. Schmitt Trust", "target": "K. Schmitt Trust"}, - {"source": "La Cienega Mutual Domestic Assn.", "target": "La Cienega MDWCA"}, - {"source": "La Vista HOA", "target": "La Vista HOA"}, - {"source": "Lamy MDWUA", "target": "Lamy MDWCA"}, - {"source": "Land Ventures LLC", "target": "Land Ventures LLC"}, - {"source": "Las Lagunitas", "target": "Las Lagunitas"}, - {"source": "Las Lagunitas Homeowners Assn.", "target": "Las Lagunitas HOA"}, - {"source": "Living World Ministries", "target": "Living World Ministries"}, - {"source": "Los Atrevidos, Inc.", "target": "Los Atrevidos, Inc"}, - {"source": "Los Prados HOA", "target": "Los Prados HOA"}, - {"source": "Malaga Water System", "target": "Malaga MDWCA & SWA"}, - {"source": "Mangas Outfitters", "target": "Mangas Outfitters"}, - {"source": "Media Gravel Pit", "target": "Medina Gravel Pit"}, - {"source": "Mendenhall Trading Co.", "target": "Mendenhall Trading Co"}, - {"source": "Mesa Verde Ranch", "target": "Mesa Verde Ranch"}, - {"source": "NESWCD", "target": "Northeastern SWCD"}, - {"source": "TSWCD", "target": "Taos SWCD"}, - {"source": "NM Environment Dept.", "target": "NMED"}, - {"source": "NM Game & Fish Dept.", "target": "NMDGF"}, - {"source": "NM Office of the State Engineer", "target": "NMOSE"}, - {"source": "NM State Highway Dept.", "target": "NMDOT"}, - {"source": "NMSU College of Agriculture", "target": "NMSU College of Agriculture"}, - {"source": "Naiche Development", "target": "Naiche Development"}, - {"source": "National Radio Astronomy Observatory", "target": "NRAO"}, - {"source": "New Mexico Spaceport Authority", "target": "NMSA"}, - {"source": "New Mexico Tech", "target": "NMT"}, - {"source": "Nogal Mutual Domestic Water Consumers Association", "target": "Nogal MDWCA"}, - {"source": "O Bar O Ranch", "target": "O Bar O Ranch"}, - {"source": "OMI Wastewater Treatment Plant", "target": "OMI Wastewater Treatment Plant"}, - {"source": "Old Road Ranch Pardners Ltd.", "target": "Old Road Ranch Pardners Ltd"}, - {"source": "PNM Service Center", "target": "PNM Service Center"}, - {"source": "PNM, Sangre de Cristo", "target": "PNM Service Center"}, - {"source": "Peace Tabernacle Church", "target": "Peace Tabernacle Church"}, - {"source": "Pecos Trail Inn", "target": "Pecos Trail Inn"}, - {"source": "Pelican Spa", "target": "Pelican Spa"}, - {"source": "Pistachio Tree Ranch", "target": "Pistachio Tree Ranch"}, - {"source": "Rancho Encantado", "target": "Rancho Encantado"}, - {"source": "Rancho San Lucas", "target": "Rancho San Lucas"}, - {"source": "Rancho San Marcos", "target": "Rancho San Marcos"}, - {"source": "Rancho Viejo Partnership", "target": "Rancho Viejo Partnership"}, - {"source": "Ranney Ranch", "target": "Ranney Ranch"}, - {"source": "Rio En Medio MDWCA", "target": "Rio En Medio MDWCA"}, - {"source": "San Acacia MDWCA", "target": "San Acacia MDWCA"}, - {"source": "San Juan Residences", "target": "San Juan Residences"}, - {"source": "Sandia National Laboratories", "target": "SNL"}, - {"source": "Sangre de Cristo Center", "target": "Sangre de Cristo Center"}, - {"source": "Sangre de Cristo Estates", "target": "Sangre de Cristo Estates"}, - {"source": "Santa Fe Community College", "target": "Santa Fe Community College"}, - {"source": "Santa Fe County", "target": "SFC"}, - {"source": "Santa Fe County, Fire Facilities", "target": "SFC, Fire Facilities"}, - {"source": "Santa Fe County, Utilities Dept.", "target": "SFC, Utilities Dept."}, - {"source": "Santa Fe County, Valle Vista Water Utility, Inc.", "target": "Santa Fe County, Valle Vista Water Utility, Inc."}, - {"source": "Santa Fe Downs", "target": "Santa Fe Downs"}, - {"source": "Santa Fe Horse Park", "target": "Santa Fe Horse Park"}, - {"source": "Santa Fe Municipal Airport", "target": "Santa Fe Municipal Airport"}, - {"source": "Santa Fe Opera", "target": "Santa Fe Opera"}, - {"source": "Santa Fe Waldorf School", "target": "Santa Fe Waldorf School"}, - {"source": "Shidoni Foundry, Inc.", "target": "Shidoni Foundry and Gallery"}, - {"source": "Sierra Grande Lodge", "target": "Sierra Grande Lodge"}, - {"source": "Sierra Vista Retirement Community", "target": "Sierra Vista Retirement Community"}, - {"source": "Slash Triangle Ranch", "target": "Slash Triangle Ranch"}, - {"source": "Stagecoach Motel", "target": "Stagecoach Motel"}, - {"source": "State of New Mexico", "target": "State of New Mexico"}, - {"source": "Stephenson Ranch", "target": "Stephenson Ranch"}, - {"source": "Sun Broadcasting Network", "target": "Sun Broadcasting Network"}, - {"source": "Tano Rd LLC", "target": "Tano Rd LLC"}, - {"source": "Taos Municipal Schools, UNM Taos", "target": "UNM-Taos"}, - {"source": "Tee Pee Ranch/Tee Pee Subdivision", "target": "Tee Pee Ranch/Tee Pee Subdivision"}, - {"source": "Tent Rock, Inc.", "target": "Tent Rock, Inc"}, - {"source": "Tesuque", "target": "Tesuque MDWCA"}, - {"source": "Tesuque MDWCA", "target": "Tesuque MDWCA"}, - {"source": "The Great Cloud Zen Center", "target": "The Great Cloud Zen Center"}, - {"source": "Three Rivers Ranch", "target": "Three Rivers Ranch"}, - {"source": "Timberon Water and Sanitation District", "target": "Timberon Water and Sanitation District"}, - {"source": "Town of Magdalena", "target": "Town of Magdalena"}, - {"source": "Town of Taos", "target": "Town of Taos"}, - {"source": "Town of Taos, National Guard Armory", "target": "Town of Taos, National Guard Armory"}, - {"source": "Trinity Ranch", "target": "Trinity Ranch"}, - {"source": "Tularosa Basin Natl. Desalination Research Facil.", "target": "Tularosa Basin National Desalination Research Facility"}, - {"source": "Turquoise Trail Charter School", "target": "Turquoise Trail Charter School"}, - {"source": "US Bureau of Indian Affairs, Indian School", "target": "US Bureau of Indian Affairs, Santa Fe Indian School"}, - {"source": "USFS, Carson NF, Taos Office", "target": "USFS, Carson NF, Taos Office"}, - {"source": "USFS, Cibola NF, Magdalena Ranger District", "target": "USFS, Cibola NF, Magdalena Ranger District"}, - {"source": "USFS, Santa Fe NF, Espanola Ranger District", "target": "USFS, Santa Fe NF, Espanola Ranger District"}, - {"source": "USFS/Bluewater Ranch", "target": "USFS"}, - {"source": "Ute Mountain Farms", "target": "Ute Mountain Farms"}, - {"source": "VA Hospital", "target": "VA Hospital"}, - {"source": "Valle Vista Water Utility", "target": "Valle Vista Water Utility"}, - {"source": "Velte", "target": "Velte"}, - {"source": "Vereda Serena Property", "target": "Vereda Serena Property"}, - {"source": "Village of Corona", "target": "Village of Corona"}, - {"source": "Village of Floyd", "target": "Village of Floyd"}, - {"source": "Village of Melrose", "target": "Village of Melrose"}, - {"source": "Village of Vaughn", "target": "Village of Vaughn"}, - {"source": "Vista Land Company", "target": "Vista Land Company"}, - {"source": "Vista Redonda MDWCA", "target": "Vista Redonda MDWCA"}, - {"source": "Vista Redondo MDWCA", "target": "Vista Redonda MDWCA"}, - {"source": "Vista de Oro Water Co-op", "target": "Vista de Oro de Placitas Water Users Coop"}, - {"source": "Walker Ranch", "target": "Walker Ranch"}, - {"source": "Wild & Woolley Trailer Ranch", "target": "Wild & Woolley Trailer Ranch"}, - {"source": "Winter Brothers/U.S. Government", "target": "Winter Brothers"}, - {"source": "Yates Petroleum", "target": "Yates Petroleum Corporation"}, - {"source": "Zamora Accounting Services", "target": "Zamora Accounting Services"} -] \ No newline at end of file +{ + "Abeyta Engineering": "Abeyta Engineering, Inc", + "Adobe Ranch": "Adobe Ranch", + "Agua Fria Water Assn.": "Agua Fria Community Water Association", + "Apache Gap Ranch": "Apache Gap Ranch", + "Aspendale Baptist Camp": "Aspendale Mountain Retreat", + "Augustin Ranch LLC": "Augustin Plains Ranch LLC", + "B + B Cattle": "B & B Cattle Co", + "BLM Taos Office": "BLM Taos Office", + "Berridge Distributing Company": "Berridge Distributing Company", + "Bishop's Lodge": "Bishop's Lodge", + "Bonanza Creek Ranch": "Bonanza Creek Ranch", + "Bug Scuffle Water Association": "Bug Scuffle Water Association", + "Bureau of Land Management": "BLM", + "Camp Wehinahpay": "Wehinahpay Mountain Camp", + "Campbell Ranch": "Campbell Ranch", + "Capitol Ford Auto Body": "Capitol Ford Santa Fe", + "Cemex Plant": "Cemex, Inc", + "Cerro Community Center": "Cerro Community Center", + "Chabad Jewish Center": "Santa Fe Jewish Center", + "Chupadero MDWCA": "Chupadero MDWCA", + "Cielo Lumbre HOA": "Cielo Lumbre HOA", + "Circle Cross Ranch": "Circle Cross Ranch", + "City of Alamogordo": "City of Alamogordo", + "City of Portales, Public Works Dept.": "City of Portales, Public Works Dept.", + "City of Santa Fe WWTP": "City of Santa Fe WWTP", + "City of Santa Fe, Municipal Recreation Complex": "City of Santa Fe, Municipal Recreation Complex", + "City of Santa Fe, Sangre de Cristo Water Co.": "City of Santa Fe, Sangre de Cristo Water Co.", + "City of Socorro": "City of Socorro", + "Commonwealth Conservancy": "Commonwealth Conservancy", + "Country Club Garden MHP": "Country Club Garden Mobile Home Park", + "Crossroads Cattle Co., Ltd.": "Crossroads Cattle Co., Ltd", + "Double H Ranch": "Double H Ranch", + "E.A. Meadows East": "E.A. Meadows East", + "El Camino Realty": "El Camino Realty, Inc", + "El Dorado Utilities": "Eldorado Area Water & Sanitation District", + "El Gancho Restaurant": "Bourbon Grill at El Gancho", + "El Prado HOA": "El Prado HOA", + "El Rancho de las Golondrinas": "El Rancho de las Golondrinas", + "El Rito MDWCA": "El Rito Canyon MDWCA", + "Eldorado Water and Sanitation District": "Eldorado Area Water & Sanitation District", + "Encantado Enterprises": "Encantado Enterprises", + "Estrella Concepts LLC": "Estrella Concepts LLC", + "Farr Cattle Company (Farr Ranch": "Farr Cattle Company", + "Fire Department": "Sixteen Springs Fire Department", + "Fire Water Lodge": "Fire Water Lodge", + "Ford County Land and Cattle": "Ford County Land & Cattle Company, Inc", + "Friendly Construction, Inc.": "Friendly Construction, Inc", + "Hacienda Del Cerezo, Ltd.": "Hacienda Del Cerezo", + "Hefker Vega Ranch": "Hefker Vega Ranch", + "High Nogal Ranch": "High Nogal Ranch", + "Holloman Air Force Base": "Holloman Air Force Base", + "Hyde Park Estates MDWCA": "Hyde Park Estates MDWCA", + "Hyde Park Estates WUA": "Hyde Park Estates MDWCA", + "Ideal Mobile Home & RV": "Desert Village RV & Mobile Home Park", + "K. Schmitt Trust": "K. Schmitt Trust", + "La Cienega Mutual Domestic Assn.": "La Cienega MDWCA", + "La Vista HOA": "La Vista HOA", + "Lamy MDWUA": "Lamy MDWCA", + "Land Ventures LLC": "Land Ventures LLC", + "Las Lagunitas": "Las Lagunitas", + "Las Lagunitas Homeowners Assn.": "Las Lagunitas HOA", + "Living World Ministries": "Living World Ministries", + "Los Atrevidos, Inc.": "Los Atrevidos, Inc", + "Los Prados HOA": "Los Prados HOA", + "Malaga Water System": "Malaga MDWCA & SWA", + "Mangas Outfitters": "Mangas Outfitters", + "Media Gravel Pit": "Medina Gravel Pit", + "Mendenhall Trading Co.": "Mendenhall Trading Co", + "Mesa Verde Ranch": "Mesa Verde Ranch", + "NESWCD": "Northeastern SWCD", + "TSWCD": "Taos SWCD", + "NM Environment Dept.": "NMED", + "NM Game & Fish Dept.": "NMDGF", + "NM Office of the State Engineer": "NMOSE", + "NM State Highway Dept.": "NMDOT", + "NMSU College of Agriculture": "NMSU College of Agriculture", + "Naiche Development": "Naiche Development", + "National Radio Astronomy Observatory": "NRAO", + "New Mexico Spaceport Authority": "NMSA", + "New Mexico Tech": "NMT", + "Nogal Mutual Domestic Water Consumers Association": "Nogal MDWCA", + "O Bar O Ranch": "O Bar O Ranch", + "OMI Wastewater Treatment Plant": "OMI Wastewater Treatment Plant", + "Old Road Ranch Pardners Ltd.": "Old Road Ranch Pardners Ltd", + "PNM Service Center": "PNM Service Center", + "PNM, Sangre de Cristo": "PNM Service Center", + "Peace Tabernacle Church": "Peace Tabernacle Church", + "Pecos Trail Inn": "Pecos Trail Inn", + "Pelican Spa": "Pelican Spa", + "Pistachio Tree Ranch": "Pistachio Tree Ranch", + "Rancho Encantado": "Rancho Encantado", + "Rancho San Lucas": "Rancho San Lucas", + "Rancho San Marcos": "Rancho San Marcos", + "Rancho Viejo Partnership": "Rancho Viejo Partnership", + "Ranney Ranch": "Ranney Ranch", + "Rio En Medio MDWCA": "Rio En Medio MDWCA", + "San Acacia MDWCA": "San Acacia MDWCA", + "San Juan Residences": "San Juan Residences", + "Sandia National Laboratories": "SNL", + "Sangre de Cristo Center": "Sangre de Cristo Center", + "Sangre de Cristo Estates": "Sangre de Cristo Estates", + "Santa Fe Community College": "Santa Fe Community College", + "Santa Fe County": "SFC", + "Santa Fe County, Fire Facilities": "SFC, Fire Facilities", + "Santa Fe County, Utilities Dept.": "SFC, Utilities Dept.", + "Santa Fe County, Valle Vista Water Utility, Inc.": "Santa Fe County, Valle Vista Water Utility, Inc.", + "Santa Fe Downs": "Santa Fe Downs", + "Santa Fe Horse Park": "Santa Fe Horse Park", + "Santa Fe Municipal Airport": "Santa Fe Municipal Airport", + "Santa Fe Opera": "Santa Fe Opera", + "Santa Fe Waldorf School": "Santa Fe Waldorf School", + "Shidoni Foundry, Inc.": "Shidoni Foundry and Gallery", + "Sierra Grande Lodge": "Sierra Grande Lodge", + "Sierra Vista Retirement Community": "Sierra Vista Retirement Community", + "Slash Triangle Ranch": "Slash Triangle Ranch", + "Stagecoach Motel": "Stagecoach Motel", + "State of New Mexico": "State of New Mexico", + "Stephenson Ranch": "Stephenson Ranch", + "Sun Broadcasting Network": "Sun Broadcasting Network", + "Tano Rd LLC": "Tano Rd LLC", + "Taos Municipal Schools, UNM Taos": "UNM-Taos", + "Tee Pee Ranch/Tee Pee Subdivision": "Tee Pee Ranch/Tee Pee Subdivision", + "Tent Rock, Inc.": "Tent Rock, Inc", + "Tesuque": "Tesuque MDWCA", + "Tesuque MDWCA": "Tesuque MDWCA", + "The Great Cloud Zen Center": "The Great Cloud Zen Center", + "Three Rivers Ranch": "Three Rivers Ranch", + "Timberon Water and Sanitation District": "Timberon Water and Sanitation District", + "Town of Magdalena": "Town of Magdalena", + "Town of Taos": "Town of Taos", + "Town of Taos, National Guard Armory": "Town of Taos, National Guard Armory", + "Trinity Ranch": "Trinity Ranch", + "Tularosa Basin Natl. Desalination Research Facil.": "Tularosa Basin National Desalination Research Facility", + "Turquoise Trail Charter School": "Turquoise Trail Charter School", + "US Bureau of Indian Affairs, Indian School": "US Bureau of Indian Affairs, Santa Fe Indian School", + "USFS, Carson NF, Taos Office": "USFS, Carson NF, Taos Office", + "USFS, Cibola NF, Magdalena Ranger District": "USFS, Cibola NF, Magdalena Ranger District", + "USFS, Santa Fe NF, Espanola Ranger District": "USFS, Santa Fe NF, Espanola Ranger District", + "USFS/Bluewater Ranch": "USFS", + "Ute Mountain Farms": "Ute Mountain Farms", + "VA Hospital": "VA Hospital", + "Valle Vista Water Utility": "Valle Vista Water Utility", + "Velte": "Velte", + "Vereda Serena Property": "Vereda Serena Property", + "Village of Corona": "Village of Corona", + "Village of Floyd": "Village of Floyd", + "Village of Melrose": "Village of Melrose", + "Village of Vaughn": "Village of Vaughn", + "Vista Land Company": "Vista Land Company", + "Vista Redonda MDWCA": "Vista Redonda MDWCA", + "Vista Redondo MDWCA": "Vista Redonda MDWCA", + "Vista de Oro Water Co-op": "Vista de Oro de Placitas Water Users Coop", + "Walker Ranch": "Walker Ranch", + "Wild & Woolley Trailer Ranch": "Wild & Woolley Trailer Ranch", + "Winter Brothers/U.S. Government": "Winter Brothers", + "Yates Petroleum": "Yates Petroleum Corporation", + "Zamora Accounting Services": "Zamora Accounting Services" +} \ No newline at end of file diff --git a/transfers/waterlevels_transfer.py b/transfers/waterlevels_transfer.py index aa86ca182..d78c1b40e 100644 --- a/transfers/waterlevels_transfer.py +++ b/transfers/waterlevels_transfer.py @@ -171,20 +171,6 @@ def transfer_water_levels(session): for name, organization, role in zip(*contact_info): if (name, organization) in created_contacts: contact = created_contacts[(name, organization)] - elif ( - session.query(Contact) - .filter_by(name=name, organization=organization) - .first() - ): - # don't create a new contact if it already exists in the database - contact = ( - session.query(Contact) - .filter_by(name=name, organization=organization) - .first() - ) - logger.info( - f"{SPACE_2}Using existing contact: | Name {contact.name} | Role {contact.role} | Organization {contact.organization} | nma_pk_waterlevels {contact.nma_pk_waterlevels}" - ) else: try: # create new contact if not already created From ff631224ac27d6634585065dce58568a808f91b0 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Wed, 29 Oct 2025 16:29:37 -0600 Subject: [PATCH 16/17] fix: fix UniqueConstraint import --- db/contact.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/contact.py b/db/contact.py index 77454debd..a674820ab 100644 --- a/db/contact.py +++ b/db/contact.py @@ -15,9 +15,8 @@ # =============================================================================== from typing import List, TYPE_CHECKING -from sqlalchemy import Integer, ForeignKey, String +from sqlalchemy import Integer, ForeignKey, String, UniqueConstraint from sqlalchemy.ext.associationproxy import association_proxy, AssociationProxy -from sqlalchemy.ext.declarative import UniqueConstraint from sqlalchemy.orm import relationship, Mapped, mapped_column from sqlalchemy_utils import TSVectorType From 9ab75fefd362ec48172aa5b607708706e0fc38f2 Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Wed, 29 Oct 2025 16:47:24 -0600 Subject: [PATCH 17/17] fix: add tests back to commit workflow --- .pre-commit-config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 817407701..7b2ef0036 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,15 +15,15 @@ repos: '--statistics' ] exclude: ^db/__init__.py$ # all models need to be imported for Alembic, but are not used directly - # - repo: local - # hooks: - # - id: pytest - # name: pytest - # entry: pytest # Or your specific test command, e.g., poetry run pytest - # language: system - # types: [python] # Specify relevant file types for your tests - # pass_filenames: false - # always_run: true + - repo: local + hooks: + - id: pytest + name: pytest + entry: pytest # Or your specific test command, e.g., poetry run pytest + language: system + types: [python] # Specify relevant file types for your tests + pass_filenames: false + always_run: true # - repo: https://github.com/pre-commit/mirrors-mypy # rev: v1.10.0 # Use the latest stable version or pin to your preference