Street Sweeping Reminders
A No Tow subscription service where emails can be sent to registered constituents reminding them of sweeping days for a nominated street.
The Summer/Winter sweeping timetable is automatically adjusted by the scripts and does not require developer intervention to restrict notifications in the winter months.
See Summer/Winter section of lyris.asp below.
Summary
Residents can use the page at https://www.cityofboston.gov/publicworks/sweeping/.
First the resident searches for their street or a calendar. Matching street results are returned from a master schedule/calendar and the resident nominates which streets should be included in the alert. The resident then supplies an email address and a preferred email reminder time.
Subscription from this page registers the resident for street sweeping reminders, and also for Street Occupancy alerts.
The sending of emails is managed by a Lyris email server installed on the city network. The body of the email is constructed in a script called by lyris at lyris.asp
.
This service is active, there appear to be around 5 new subscriptions per day. There are 100,488 (as at 2021-10-01) current active subscriptions, but many may be old and refer to defunct emails. Lyris should be able to provide bounce reports.
If the list is managed in Lyris, then entries removed in Lyris should be manually removed from the PwdSweepingEmails table or the remindme.asp (see Subscription Search) will be inaccurate.
Statistics
Lyris maintains subscribers (members) in its no-tow list.
Total List
39,218 (lyris)
101,139 (PwdSweepingEmails - Towing DB)
August 2021 subscriptions
317
September 2021 subscriptions
473
August 2021 Unsubscribe
-258
August 2021 unsubscribe
-256
Note: Lyris subscribes street occupancy and street sweeping members to the same no-tow list.
Note: Lyris manages its list members and removes those which cannot be delivered to. Hence the numbers in Lyris are lower than in the Towing DB tables.
Code
This is an ASP application hosted on ZPCOBWEB01.web.cob (a DMZ IIS Server).
The code is is found in the following folder:
: web.config
This is the configuration file and this contains the database credentials.
: default.asp
This page contains a list of cancellations. It looks like known sweeping holidays (e.g. Veterans day) are loaded for the year in advance, and then ad-hoc cancellations (e.g. Snow or Ice) are loaded as the cancellation is advised by PWD. Cancellations for general street sweeping and overnight sweeping are maintained separately.
The search form for the registration process is contained on this page. The search is conducted against the PwdSweeping
table in the Towing
database on vSQL01 (aka ZPDMZSQL01).
The residents subscription choices (streets & dates) are managed by this page for use in the subscription process.
Subscription is initiated on this page but the actual subscription process is handed off to subscribetostreet.asp
(see below).
Also the user can download a file which can be imported into calendars supporting the iCalendar format (this is most calendars). The file generation and download is managed by addtocalendar.ics.asp
(see below)
If the default page is called with a querystring, then a search is performed and results returned. This is a relatively sophisticated search and provides schedules and the next sweeping event date.
Announcements column has a very outdated entry for 2013.
: subscribetostreet.asp
This page controls subscriptions and unsubscriptions.
Subscriptions:
Subscribing involves first removing and then adding the residents email and street into the table PwdSweepingEmails
in the Towing
database on vSQL01 (aka ZPDMZSQL01).
if this is a first time subscription, the user is added or removed from the Lyris email server at http://listserv.cityofboston.gov/subscribe/subscribe.tml.
If this is not a first time subscription, then the users time preference is added to the
members_
table in theLyris
database on vSQL01 (aka(ZPDMZSQL01).
Unsubscriptions:
Unsubscribing involves removing the residents email and street from the table PwdSweepingEmails
in the Towing
database on vSQL01 (aka ZPDMZSQL01).
: addtocalendar.ics.asp
The iCalendar (ics) format is presently supported by: Google Calendar, Apple Calendar (formerly iCal), IBM Notes (formerly Lotus Notes), Yahoo! Calendar, Evolution (software), eM Client, Lightning extension for Mozilla Thunderbird and SeaMonkey, and partially by Microsoft Outlook and Novell GroupWise
This page extracts a schedule from the PwdSweeping
table in the Towing
database on vSQL01 (aka ZPDMZSQL01) and formats into an ics format and then downloads the ics file to the residents computer.
:lyris.asp
This page is a microservice endpoint managed by IIS/ASP.
A list of cancellation and block-out dates is provided at the top of the script. (This list mirrors those input into default.asp).
The endpoint is designed to be called with an email address and date in the querystring. The script will return nothing if the email recipient is not scheduled to receive an email, and a full html if the recipient is due an email (according to the streets and Email time preference settings).
The script runs SQL statements against the PWDSweepingEmails
, PWDSweeping
and PwdDist
tables in the Towing
database on vSQL01 and applies logic to determine if an email is required for that recipient.
(See Lyris below in Connected Services)
The script manages the annual program dates according to this "rule":
The Daytime Street Cleaning Program runs from April 1 to November 30 in most Boston neighborhoods ... (however) ... Daytime street sweeping continues into the winter in the North End, South End, and Beacon Hill ... (which) ... stops on December 31 and starts up again on March 1.
The body text for the Street Sweeping reminder emails is set in this script.
The body of the Street Occupancy emails is also set in this script.eh
:admin/Default.aspx
This page allows an administrator to login, alter and export detailed and low-level street cleaning metadata in the PwdSweeping
table.
Login information is in DashLane.
Database
The database server used by this sub-service is vSQL01 (aka ZPDMZSQL01). The server is hosted in the DMZ in the web.cob (aka lincdom) domain. Developers need a separate and specific account to be set up on the web.cob domain to view/edit databases and tables on this server.
Towing
The main database used by this sub-service is Towing.
It appears that the code uses a trusted connection to the database server. To connect to this database you first need to have an account in the lincdom domain. Then you need to have the Microsoft SQL Server Management Studio installed on your work PC. Then you need to connect to the server at zpdmzsql01.web.cob using your lincdom account (user:LINCDOM\username + password:userpassword). This should work.
The tables used by this sub-service are:
Table Name
Key Fields
Description
PwdSweeping
MainID
St_name
Dist(rict)
StartTime
EndTime
Side
... [schedule info]
Contains street sweeping schedule information for streets in the city.
This table is managed from the admin/default.aspx page.
PwdSweepingEmails
EmailAddr
StreetID
Contains information on who has subscribed to what.
StreetID maps to the MainID in the PwdSweeping table.
This table is maintained by the scripts in this sub-service. It is also used by the Subscription Search (aka remind me).
Lyris
There is a database called Lyris on the same server (vSQL01).
The Lyris list server (on zLyris) uses the Lyris
database on vSQL01. The recipients (members) and their send-time preferences are stored in the members_
table.
Both Lyris and the Towing
DB maintain a list of subscribers.
The list in Lyris (the members list) is maintained and bad emails and unsubscribes them,
The list in the
Towing
DB is not maintained and hence there are many unsubscribed members in toTowing
DB email tables.
Recipients are selected by Lyris from its (curated) list, but the recipients preferences and streets etc are taken from the Email table in the Towing
DB.
members_
EmailAddr_
FullName_
List_
Neighborhood
NowTowTimePreference
Allston_Brighton_
BackBay_BeaconHill
BayVillage_
Charlestown_
Chinatown_Downtown_
Dorchester_
EastBoston_
Fenway_Kenmore_
HydePark_
JamaicaPlain_
Mattapan_
MidDorchester_
MissionHill_
NorthEnd_WestEnd_
Roslindale_
Roxbury_
SouthBoston_
SouthEnd_
WestRoxbury_
A list of subscribed members.
[NowTowTimePreference] is 24hr clock for email time pref.
Connected Services
Lyris
Lyris is used for dispatching the street sweeping emails. This is an in-house email server (a mailing list server) which has a subscription API at http://listserv.cityofboston.gov/subscribe/subscribe.tml. The list subscribed to for sweeping alerts is no-tow
.
The list used is named no-tow
, subscribers are added to the list, and removed from it when they unsubscribe.
Lyris is responsible for:
Maintaining the list of current subscribers (members),and
Scheduling and initiating the 7am, 2pm and 5pm mailings each day, and
Physically sending the emails required.
BUT Lyris does not
Know the members preferred email time, or
Know the members street selection, or
Blackout dates, or
Generate or manage the email body text
(These are managed by the :lyris.asp script)
Street Administration
A page at admin/default.aspx allows an administrator to maintain information on the partitioning and scheduling of Boston City streets cleaning activities used (primarily) by the NoTow suite of apps..
PWD tend to re-organize street cleaning at the start of the "season" in March/April, and they will update the database table, using the admin page, at that time. Subsequent schedule changes are maintained in the table by PWD staff as they occur. The main PWD staff member doing this work is Paul Taylor. Any errors and omissions reported during the year are reviewed by Paul Taylor and (if required) he updates/alters the database using the admin page. This final step could be done by Digital provided a note is sent to Paul after the change is made.
The current street sweeping database can be dumped to a csv here: https://www.cityofboston.gov/publicworks/sweeping/admin/database.csv
Districts can be found from an ArcGIS map on the COB ArcGIS server.
Additional street information, including linear feet from street origin to intersections can be found here: http://zppwdapp01.web.cob:83/apps/stations/ (created and maintained by Paul Taylor)
Potential Data Issues
(Needs verifying)
The email registration for Street Occupancy and Street Sweeping alerts uses an ID from the the PwdSweeping table (MainID). If a street is split or merged, it is possible that email registrations could become orphaned.
Examples:
169th Street get split into two (for sweeping activities). The original schedule started at 0ft and ended at 1000ft, with a MainID of 236 and sweeping was even days. The street now gets split by adding a new street partition (MainID of 423) from 501ft to 1000ft and sweeping is set for odd days. The original (MainID 236) is updated so it now starts at 0ft but ends at 500ft. The issue is that anyone who lives between 500 and 1000ft will be registered against MainID 236 instead of MainID 423 and will thus get email reminders for the wrong days.
A similar type of issue could occur if streets are merged, but in this case registrations the street being "removed" would stop getting emails even though from their perspective the sweeping continues unchanged.
Last updated
Was this helpful?