Library Occupancy Counters, specific for the University of Florida Libraries but the underlying logic would work for any site supporting the Store Traffic TMAS API.
Store Traffic powers the people counting solution for the University of Florida Libraries, particularly as the UF Libraries attempt to keep students, faculty, and staff safe with occupancy limits necessitated by COVID-19.
This project polls the TMAS API every five minutes, getting occupancy dashboard metrics, per configured location. These XML API results are parsed into JSON and stored in AWS S3 at predictive paths. The AWS S3 bucket is open to public-read and any CORS GET request, so any frontend can interact with it without authentication or configuration. The NodeJS/Express app that manages this is served on Heroku. There is a sample static site and a React site. Note that the Heroku site should not be publicly linked to directly, it is meant as an example of the running site deployed - the Heroku instance size is moderate, just enough to handle the background polling-parsing and uploading to S3.
The frontend display provided with this project is not at all the only way to display this data. However, it does provide a workable model of how to use Bulma-styled card components to display an SVG circular capacity indicator. The frontend can be loaded as flat HTML/CSS/JS files to any site. They manage fetching the S3 bucket data per configured location. The primary page shows the status of all configured facilities, but the sites folder has stub pages for each facility to be displayed individually, without headers and footers, so that they can be embedded in iFrames on any page without breaking the rest of the page styling.
The public folder is the easiest way to deploy this, though there is also a React Frontend that implements a slightly more programmatically robust way of building similar functionality.
Contributions to the codebase or to suggested changes are welcome. Standard forking and PRs are requested, with common OpenSource expectations of professionalism and courtesy.
The License is GPLv3 for this code.
Maintenance: As the TMAS API is itself proprietary, this code is subject to fall out of viability if TMAS updates its API, and for the codebase to function, it is of course required to have viable API keys and location IDs.