I have a simple Python application to illustrate an issue:
#!/usr/bin/python3.9
import geocoder
g = geocoder.arcgis('1286 County Road A, Deer Park, WI 54007')
print(g.json)
The output is:
{'address': '1286 County Road a, Deer Park, Wisconsin, 54007', 'bbox': {'northeast': [45.222714980538, -92.423393031944], 'southwest': [45.220714980538, -92.425393031944]}, 'confidence': 9, 'lat': 45.22171498053788, 'lng': -92.42439303194378, 'ok': True, 'quality': 'PointAddress', 'raw': {'name': '1286 County Road a, Deer Park, Wisconsin, 54007', 'extent': {'xmin': -92.425393031944, 'ymin': 45.220714980538, 'xmax': -92.423393031944, 'ymax': 45.222714980538}, 'feature': {'geometry': {'x': -92.42439303194378, 'y': 45.22171498053788}, 'attributes': {'Score': 100, 'Addr_Type': 'PointAddress'}}}, 'score': 100, 'status': 'OK'}
This is merely cosmetic, but the 'a' in 'County Road A' is lowercase. It should be uppercase. I have a few others like this.
How can I contact the right person to get this corrected?
Are you asking how to correct it via Python, or how to correct the underlying data? Because the latter is almost certainly beyond the scope of this forum, but the short version is: It depends on who's responsible for the underlying data.
If you're asking how to fix it via Python, there are a number of ways with regular expressions and the like, but with most of the road names I've seen throughout the country, there's a pretty good likelihood you'll get false positive results of things changing that you didn't intend, unless you're very careful with the script.
When and how you make a correct via Python also depends on your end goal/use of the data. What do you intend to do with the geocode data once you have it?
I am using ArcGIS as a geocoder. I was asking about correcting the underlying data.
You could use the string.title() function to assign capitalization to each of the json keys you want.
For example, using
data = g.json
data['address'] = data['address'].title()
data['raw']['name'] = data['raw']['name'].title()
yields
{'address': '1286 County Road A, Deer Park, Wisconsin, 54007', 'bbox': {'northeast': [45.222714980538, -92.423393031944], 'southwest': [45.220714980538, -92.425393031944]}, 'confidence': 9, 'lat': 45.22171498053788, 'lng': -92.42439303194378, 'ok': True, 'quality': 'PointAddress', 'raw': {'name': '1286 County Road A, Deer Park, Wisconsin, 54007', 'extent': {'xmin': -92.425393031944, 'ymin': 45.220714980538, 'xmax': -92.423393031944, 'ymax': 45.222714980538}, 'feature': {'geometry': {'x': -92.42439303194378, 'y': 45.22171498053788}, 'attributes': {'Score': 100, 'Addr_Type': 'PointAddress'}}}, 'score': 100, 'status': 'OK'}
How I can the data corrected at the source?