IMLS / estimating-wifi

Estimating Wifi is a pilot project to automate the censusing of proximal wifi devices via low-cost and open source tools.
https://10x.gsa.gov/projects/shared-components-for-museums-and-libraries/
Other
10 stars 2 forks source link

make sure library requests respond with a valid unique ID for each library (possibly using fscs key and sequence) for all library endpoints #312

Closed sknep closed 1 year ago

sknep commented 1 year ago

library entries accessed through the following paths: /rpc/lib_search_fscs /rpc/lib_search_state /rpc/lib_search_name

return results that have a lot of similar looking values for what we might use as an ID, but they are inconsistent:

An Alaska library, accessed through /rpc/lib_search_fscs, has these keys:

{
  "fscskey":"AK0001",
  "fscs_seq":2,
  "libid":"AK0001-002",
  "fscs_id":"AK0001-002",
  ...
}

While a Georgia library accessed through /rpc/lib_search_fscs has these keys:

{
  "fscskey":"GA0027",
  "fscs_seq":11,
  "libid":"GA0027",
  "fscs_id":"GA0027-011",
  ...
}

That same Georgia library accessed through /rpc/lib_search_state or /rpc/lib_search_name contains these, missing fscs_id:

[
{
  "fscskey":"GA0027",
  "fscs_seq":4,
  "libid":"GA0027",
   ...
}
]

while that first Alaska library accessed through /rpc/lib_search_state or /rpc/lib_search_name has these, with a libid that contains an fscs sequence, where the Georgia library did not have a sequence:

[
{
  "fscskey":"AK0001",
  "fscs_seq":2,
  "libid":"AK0001-002",
  ...
}
]

libid sometimes contains fscs key only, and sometimes it contains key and sequence. It's different depending on which State your library is in, even with in the same API call. fscs_id exists on one API call but not all three; where it is provided, it contains both fscs key and sequence. For some states, that means it duplicates libid.

Ideally, they'd respond with at least one reliable field in a consistent format, such as ZZ000-000, where ZZ is the state abbreviation followed by a library system id or "fscs key", then a hyphen, then the library branch id (often called fscs sequence).

Unfortunately, this format is not universally applied across states, library systems, and libraries. But we still need a unique key to show for each library, and it's hard to determine which of the many candidates is correct for this use. The key names and formats should at least be consistent between our own API calls, and if a UID is available in one call, it should be available in the others too.