Skip to content

Script for adding census bureau geoid values to patron records, using a combination of SQL, the Sierra patron API and the Census Bureau's Geocoding service

License

Notifications You must be signed in to change notification settings

Minuteman-Library-Network/Patron-Geocoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patron Geocoder

This script will gather 10,000 patron records at a time via a SQL query and pass the addresses of those records through the US Census Bureau's geocoding service so that geoid values may in turn be added/updated in each patron record where an address match is found

Geoid and a last updated date are placed in a Census varfield (varfield tag k in our system) using the following structure |s state id |c county id |t tract id |b block id |d last updated date

Data from this field is then used for created choropleth maps that can utilize both demographic data from the census bureau and annoynmized statistical data from our patron records. Examples can be seen within the Patron Maps repo (https://github.com/Minuteman-Library-Network/Patron-Maps).

api_info.ini

Requires valid credentials for both the Sierra holds API and sql access The file should be formatted like so

[api]

base_url = https://[local domain]/iii/sierra-api/v6

client_key = [enter Sierra API key]

client_secret = [enter Sierra API secret]

sql_host = [enter host for Sierra SQL server]

sql_user = [enter sql username]

sql_pass = [enter sql password]

About

Script for adding census bureau geoid values to patron records, using a combination of SQL, the Sierra patron API and the Census Bureau's Geocoding service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages