Public
Edited
Oct 27, 2022
Insert cell
# DS - Write a function to parse *any* row of the AA data

Building on your assignment last week, convert your code to fit into a single function, which takes as input a single string that is a <tr> tag from any of the rows of raw AA data (from any of the zones). It should output ONE array or object, depending on how you have decided to structure your data; this array or object should also have nested array(s) and object(s), to have separate containers for each "meeting" (however you define meeting).

Here is an example of a very basic function that parses, reformats/restructures, and outputs the data into a desirable JS data structure:
https://observablehq.com/@aaronxhill/a-basic-string-function

Your submission should be an Observable notebook (published!) and you will submit its url to Canvas.

Helpful documentation for functions in JS:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions
Insert cell
tr1 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Union Baptist Church</h4><br />
<b>AA IT WORKS II - AA It Works II</b><br />
240 West 145th Street,
<br />(Betw 7th & 8th Avenues) NY 10039
<br />
<br />
<div class="detailsBox">
Thu=Altern.BB, Living Sober & Other A.A. Literature. <br />Fri.=Alternates between Step & Tradition.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Wednesdays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Thursdays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> BB = Big Book meeting
<br />
<br />
<b>Fridays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> S = Step meeting
<br />
<br />
<b>Tuesdays From</b> 10:00 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=36" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
Insert cell
tr2 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">SRO Building</h4><br />
<b>A CHANCE TO LIVE AGAIN - A Chance To Live Again</b><br />
109 West 129th Street, Basement,
<br />(@ Lenox Avenue) NY 10027
<br />
<br />
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Wednesdays From</b> 6:00 PM <b>to</b> 7:00 PM <br /><b>Meeting Type</b> BB = Big Book meeting
<br />
<br />
<b>Mondays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=32" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr3 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Our Lady of Lourdes Church</h4><br />
<b>ATTITUDE ADJUSTMENT - Attitude Adjustment</b><br />
469 West 142nd Street, Basement,
<br />(Betw Convent & Amsterdam Avenues) NY 10031
<br />
<br />
<div class="detailsBox">
Topic 1st Saturday.
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Saturdays From</b> 7:30 AM <b>to</b> 8:30 AM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=58" class="GetDirections">Get Directions</a>
</td>
</tr>
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">St. Phillip Church</h4><br />
<b>CONVENT - </b><br />
204 West 134th Street, 1st Floor,
<br />(Betw 7th & 8th Avenues) 10030
<br />
<br />
<div class="detailsBox">
B-3rd Saturday
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Saturdays From</b> 11:30 AM <b>to</b> 1:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=1028" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr4 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">St. Phillip Church</h4><br />
<b>CONVENT - </b><br />
204 West 134th Street, 1st Floor,
<br />(Betw 7th & 8th Avenues) 10030
<br />
<br />
<div class="detailsBox">
B-3rd Saturday
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Saturdays From</b> 11:30 AM <b>to</b> 1:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=1028" class="GetDirections">Get Directions</a>
</td>
</tr>
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Spiritual Renewal Church</h4><br />
<b>FELLOWSHIP AT NOON - Fellowship At Noon</b><br />
2044 Adam Clayton Powell Blvd.,
<br />(@ 122nd Street) NY 10027
<br />
<br />
<div class="detailsBox">
T If there is a fifth Wednesday.
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Mondays From</b> 12:15 PM <b>to</b> 1:15 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Wednesdays From</b> 12:15 PM <b>to</b> 1:15 PM <br /><b>Meeting Type</b> S = Step meeting
<br />
<br />
<b>Fridays From</b> 12:15 PM <b>to</b> 1:15 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=151" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr5 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Spiritual Renewal Church</h4><br />
<b>FELLOWSHIP AT NOON - Fellowship At Noon</b><br />
2044 Adam Clayton Powell Blvd.,
<br />(@ 122nd Street) NY 10027
<br />
<br />
<div class="detailsBox">
T If there is a fifth Wednesday.
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Mondays From</b> 12:15 PM <b>to</b> 1:15 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Wednesdays From</b> 12:15 PM <b>to</b> 1:15 PM <br /><b>Meeting Type</b> S = Step meeting
<br />
<br />
<b>Fridays From</b> 12:15 PM <b>to</b> 1:15 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=151" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr6 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;"></h4><br />
<b>GRUPO TRASMITELO - </b><br />
469 West 142nd Street, 1st Floor,
<br />(Betw. Amsterdam & Convent Avenues) 10031
<br />
<br />
<div class="detailsBox">
Spanish speaking meeting.
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Thursdays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=1366" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr7 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">St. Mary's Episcopal</h4><br />
<b>HARLEM HUMANISTS - </b><br />
521 W 126th St,
<br />Amsterdam & Old Broadway 10027
<br />
<br />
<div class="detailsBox">
Contact in Advance for Wheelcahir Accessibility
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Mondays From</b> 12:00 PM <b>to</b> 1:00 PM <br /><b>Meeting Type</b> O = Open meeting <br /><b>Special Interest</b> Agnostic
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=1490" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr8 = `
<tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">SRO Building Community Room</h4><br />
<b>K.I.S.S. - Keep It Simple (Kiss)</b><br />
109 West 129th Street, Basement,
<br />(Betw Lenox Avenue & Adam Clayton Powell Blvd) NY 10027
<br />
<br />
<div class="detailsBox">
All meetings are non-smoking.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 5:30 PM <b>to</b> 6:30 PM <br /><b>Meeting Type</b> S = Step meeting
<br />
<br />
<b>Sundays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=229" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr9 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Our Lady of Lourdes</h4><br />
<b>LEARNING TO LIVE SOBER - Learning To Live Sober</b><br />
469 West 142nd Street, Basement,
<br />(Betw Convent & Amsterdam Avenues) NY 10031
<br />
<br />
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Thursdays From</b> 6:00 PM <b>to</b> 7:00 PM <br /><b>Meeting Type</b> BB = Big Book meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=232" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr10 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;"></h4><br />
<b>LIVING CLEAN AND SOBER ON 121st STREET - Living Clean And Sober On 121st Street</b><br />
2044 Seventh Avenue,
NY 10027
<br />
<br />
<div class="detailsBox">
S 2nd, BB 3rd, OD 4th, Living Sober 5th wk.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 6:00 PM <b>to</b> 7:30 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=237" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr11 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">S.A.G.E.</h4><br />
<b>MEDITATION COMES TO HARLEM - Meditation Comes To Harlem</b><br />
127 West 127th Street,
<br />(Betw. 7th and Lenox) NY 10027
<br />
<br />
<div class="detailsBox">
Meeting is closed on holidays
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Mondays From</b> 4:30 PM <b>to</b> 5:30 PM <br /><b>Meeting Type</b> C = Closed Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=246" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr12 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Grace Congregational Baptist Church</h4><br />
<b>MID-HARLEM - Mid-Harlem</b><br />
310 West 139th Street, Basement,
<br />(Betw Eighth & Edgecombe Avenues) NY 10037
<br />
<br />
<div class="detailsBox">
T 1st Monday at 7PM <br />Open 1st Friday 8:10pm, Pitch other Fridays 8:10pm
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Mondays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> S = Step meeting
<br />
<br />
<b>Fridays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Fridays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> O = Open meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=250" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr13 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">St. James Church</h4><br />
<b>MONDAY NIGHT CHALLENGE - Monday Night Challenge</b><br />
409 West 141st Street, Basement,
<br />(@ St. Nicholas Avenue) NY 10031
<br />
<br />
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Mondays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=261" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr14 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Riverside Church</h4><br />
<b>PRIMARY PURPOSE - Primary Purpose</b><br />
91 Claremont Avenue, 4th Floor, Room 414,
<br />(Betw. Broadway & Riverside Drive)) NY 10027
<br />
<br />
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 3:00 PM <b>to</b> 4:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=303" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr15 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Upper Manhattan Mental Health Center</h4><br />
<b>PROMISES TWO FOR ONE - Promises Two For One</b><br />
1727 Amsterdam Avenue, 1st Floor in the rear.,
<br />(@ 145th Street) NY 10031
<br />
<br />
<div class="detailsBox">
1st Sun-OD; 2nd Sun-S; 3rd Sun-Topic; 4th Sun-T; 5th Sun-OD
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 9:30 AM <b>to</b> 10:30 AM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Sundays From</b> 11:00 AM <b>to</b> 12:00 PM <br /><b>Meeting Type</b> C = Closed Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=306" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr16 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Our Lady of Lourdes Church</h4><br />
<b>REALITY CHECK - Reality Check</b><br />
469 West 142nd Street, Basement,
<br />(Betw Convent & Amsterdam Avenues) NY 10037
<br />
<br />
<div class="detailsBox">
S 4th Saturday <br />Men's Meeting
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Saturdays From</b> 5:00 PM <b>to</b> 6:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting <br /><b>Special Interest</b> Men
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=308" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr17 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Riverside Church</h4><br />
<b>RIVERSIDE - Riverside</b><br />
91 Claremont Avenue, @ The Cloisters Club Room,
<br />(1 Block West of Broadway & 1/2 Block North of 120th Street) NY 10027
<br />
<br />
<div class="detailsBox">
Non-Smoking Meeting.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Mondays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> C = Closed Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=315" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr18 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">St. Aloysius School</h4><br />
<b>RIVERTON - Riverton</b><br />
219 West 132nd Street, Cafeteria,
<br />(Betw. Adam Clayton Powell Blvd. & F. Douglass Blvd.) NY 10027
<br />
<br />
<div class="detailsBox">
S 2nd & T 4th Tue <br />All meetings are non-smoking. No children allowed at meetings.
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Saturdays From</b> 3:00 PM <b>to</b> 4:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Saturdays From</b> 6:00 PM <b>to</b> 7:00 PM <br /><b>Meeting Type</b> O = Open meeting
<br />
<br />
<b>Tuesdays From</b> 8:00 PM <b>to</b> 9:00 PM
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=316" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr19 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Salem United Methodist Church Community Center</h4><br />
<b>SALEM - Salem</b><br />
211 West 129th Street, Downstairs in the Gym,
<br />(@ Adam Clayton Powell Blvd.) NY 10027
<br />
<br />
<div class="detailsBox">
O 2nd Wednesday
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Wednesdays From</b> 7:30 PM <b>to</b> 8:30 PM <br /><b>Meeting Type</b> C = Closed Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=320" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr20 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Convent Baptist Church Education Building</h4><br />
<b>SOBER ADULT MEN - Sober Adult Men</b><br />
425 West 144th Street, 1st Floor,
<br />(Betw. Convent Avenue & Hamilton Terrace) NY 10031
<br />
<br />
<div class="detailsBox">
Men's Meeting
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Wednesdays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> C = Closed Discussion meeting <br /><b>Special Interest</b> Men
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=352" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr21 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">St. Phillip's Church</h4><br />
<b>ST. NICHOLAS - St. Nicholas</b><br />
204 West 134th Street, Basement,
<br />(Betw Adam C. Powell & Frederick Douglas Blvds) NY 10030
<br />
<br />
<div class="detailsBox">
S 2nd, C 3rd, BB 4th, & Grapevine 5th Thu.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 4:00 PM <b>to</b> 5:00 PM <br /><b>Meeting Type</b> O = Open meeting
<br />
<br />
<b>Thursdays From</b> 7:00 PM <b>to</b> 8:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=363" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr22 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Harlem Hospital King Pavilion</h4><br />
<b>STEPS 3 and 11 - Steps Three-Eleven</b><br />
506 Lenox Avenue, Room #3101, 3rd Floor,
<br />(@ 135 Street) NY 10037
<br />
<br />
<div class="detailsBox">
B 1st, OD 2nd, S3 3rd, C Literature 4th, & S11 5th Sun.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 2:00 PM <b>to</b> 3:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=367" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr23 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Council Center for Problems of Living</h4><br />
<b>SUGAR HILL - </b><br />
1727 Amsterdam Avenue, 1st floor in the rear,
<br />@ 145th St. 10031
<br />
<br />
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Fridays From</b> 5:30 PM <b>to</b> 6:30 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=1575" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr24 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;"></h4><br />
<b>TUESDAY BIG BOOK STUDY - Tuesday Big Book Study</b><br />
1854 Amsterdam Avenue, Basment,
<br />(Corner of 152nd Street) NY 10031
<br />
<br />
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Tuesdays From</b> 6:00 PM <b>to</b> 7:00 PM <br /><b>Meeting Type</b> BB = Big Book meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=390" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr25 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Our Lady of Lourdes Church</h4><br />
<b>UPTOWN BIG BOOK WORKSHOP - </b><br />
469 West 142nd Street, Basement,
<br />(Betw. Convent & Amsterdam Avenues 10031
<br />
<br />
<div class="detailsBox">
Meeting meets each Saturday from mid-August thru mid-December
</div>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Saturdays From</b> 9:30 AM <b>to</b> 11:00 AM <br /><b>Meeting Type</b> BB = Big Book meeting <br /><b>Special Interest</b> Big Book Workshop
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=1428" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr26 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Metropolitan AME Church</h4><br />
<b>YOU MAY CARE AFTER - You May Care After</b><br />
58-66 West 135th Street,
<br />(Betw Malcolm X Boulevard & 5th Avenue) NY 10037
<br />
<br />
<div class="detailsBox">
Non-Smoking Meeting.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Tuesdays From</b> 6:30 PM <b>to</b> 7:30 PM <br /><b>Meeting Type</b> S = Step meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=432" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr1_9 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Harlem Children's Zone Admin. Offices</h4><br />
<b>125 - TWO FOR ONE - </b><br />
35 East 125 Street, 1st Floor Conference Room,
<br />(@ Madison Avenue) 10035
<br />
<br />
<div class="detailsBox">
O 2nd, S 3rd, Anniv. 4th & BB 5th Sat.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Saturdays From</b> 4:15 PM <b>to</b> 5:30 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=447" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr2_9 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Peter Jay Sharpe Building</h4><br />
<b>EAST HARLEM - East Harlem</b><br />
223 East 117th Street, 1st Floor Dining Room,
<br />(Betw. 2nd & 3rd Avenues) NY 10035
<br />
<br />
<div class="detailsBox">
Living Sober 1st Tuesday.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Tuesdays From</b> 6:30 PM <b>to</b> 7:30 PM <br /><b>Meeting Type</b> B = Beginners meeting <br /><b>Special Interest</b> Living Sober
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=139" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr3_9 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;"></h4><br />
<b>GRUPO NUEVA VIDA - Grupo Nueva Vida</b><br />
2126 2nd Avenue, 1st Floor,
<br />(Betw. 109th & 110th Streets) NY 10029
<br />
<br />
<div class="detailsBox">
Spanish speaking meetings.
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 5:00 PM <b>to</b> 6:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
<b>Mondays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
<b>Tuesdays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
<b>Wednesdays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> C = Closed Discussion meeting
<br />
<br />
<b>Thursdays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
<b>Fridays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
<b>Saturdays From</b> 8:00 PM <b>to</b> 9:00 PM <br /><b>Meeting Type</b> OD = Open Discussion meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=181" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
tr4_9 = ` <tr style="margin-bottom:10px">
<td style="border-bottom:1px solid #e3e3e3; width:260px" valign="top">
<h4 style="margin:0;padding:0;">Veterans Residence</h4><br />
<b>HARLEM 1 PM RECOVERY - Harlem 1 PM Recovery</b><br />
22 East 119th Street, 1st Floor Cafeteria,
<br />(Betw. Madison & 5th Avenues) NY 10035
<br />
<br />
<div class="detailsBox">
ID REQUIRED TO ENTER BUILDING
</div>
<span style="color:darkblue; font-size:10pt;">
<img src="../images/wheelchair.jpg" alt="Wheelchair Access" width="20" vspace="5" hspace="10" align="absmiddle"/>Wheelchair access
</span>
</td>
<td style="border-bottom:1px solid #e3e3e3;width:350px;" valign="top">
<b>Sundays From</b> 1:00 PM <b>to</b> 2:00 PM <br /><b>Meeting Type</b> T = Tradition meeting
<br />
<br />
<b>Mondays From</b> 1:00 PM <b>to</b> 2:00 PM <br /><b>Meeting Type</b> B = Beginners meeting
<br />
<br />
</td>
<td style="border-bottom:1px solid #dedede; width:90px; ">
<a href="getdirections.cfm?meetingid=219" class="GetDirections">Get Directions</a>
</td>
</tr>
`
Insert cell
Insert cell
function getMeetings (rawText) {

// get to the TRs, put in an array
// iterate through the array of TRs

// pull info for meeting metadata
let metaData = getMetadata(rawText)
let cleaned_Metadata = cleanMetadata(metaData)
let newMetameeting = getAddress(cleaned_Metadata)
// address accessibility
// addres gray details box

// pull info for meeting details
let meetingData_Arr= cleanMeetingdata(getMeetingdata(rawText))
let newMeetingdetails = getMeetingDetails(meetingData_Arr)

// fill new meeting object with metadata and details
let newAAmeeting = {}
newAAmeeting = getAddress(cleaned_Metadata)
newAAmeeting.meetingDetails = newMeetingdetails
return newAAmeeting
// push filled new meeting object to array holding all meetings
// allMeetings = []
// allMeetings.push(newAAmeeting)

}
Insert cell
getMeetings(tr5)
Insert cell
Insert cell
Insert cell
Insert cell
function getMetadata (rawText) {
var newMetadata = []
newMetadata = rawText.split('</td>')[0]
return newMetadata
}
Insert cell
metadata = getMetadata(tr1)
Insert cell
Insert cell
function cleanMetadata (rawText) {
var newMetadata = []
newMetadata = (rawText).replaceAll('\t', '')
return newMetadata
}
Insert cell
cleaned_Metadata = cleanMetadata(metadata)
Insert cell
cleaned_Metadata.split('</b>')[1].split
Insert cell
## Function to get Metadata Info
Insert cell
function getAddress (rawText) {
var newAddress = {}
newAddress.locationName = rawText.split(/>|</)[6]
newAddress.meetingName = rawText.split(/>|</)[12]
newAddress.streetAddress = rawText.split(/>|</)[16].split(/\t|\n/)[1].trim().replace(',', '')
// let address_arr = rawText.split(/>|</)[16].split(/\t|\n/)[1].trim().replace(',', '').split(' ')
// newAddress.buildingRoom = newAddress.streetAddress.split(' ')[address_arr.length - 1]
// newAddress.buildingRoom = newAddress.streetAddress.split(' ')[3].concat(' '+ newAddress.streetAddress.split(' ')[4])
newAddress.crossStreet = rawText.split(/>|</)[18].trim().split(/\(|\)/)[1]
newAddress.stateName = rawText.split(/>|</)[18].split(' ').at(-2)
newAddress.zipCode = rawText.split(/>|</)[18].split(' ').at(-1).trim()

if (newAddress.locationName === ('')){
newAddress.locationName = "n/a"
}
if (rawText.includes('Wheelchair Access')){
newAddress.accessibility = "Wheelchair Accessible"
}else{
newAddress.accessibility = "unknown"
}

if (rawText.includes('<div class="detailsBox">')){
//newAddress.altDetails = rawText.split(/>|</)[24].trim()
newAddress.altDetails = rawText.split('<div class="detailsBox">')[1].split(/\t|\n/)[1].trim().split('<br />')
}else{
newAddress.altDetails = "n/a"
}
return newAddress
}
Insert cell
getAddress(metadata_clean)
Insert cell
Insert cell
function getMeetingdata (rawText){
var newMeetingdata = []
newMeetingdata = rawText.split('</td>')[1].split('\t\t\t\t \t <b>')
newMeetingdata = newMeetingdata.slice(1)
return newMeetingdata
}
Insert cell
meetingData_Arr = getMeetingdata(tr1)
Insert cell
Insert cell
function cleanMeetingdata (array) {
var newMeetingdata = []
//newMeetingdata =
for(let i=0; i<array.length; i++){
newMeetingdata.push(
array[i].replaceAll('\t', ' ')
.replaceAll('<b>', '')
.replaceAll('</b>', '')
.replaceAll('<br />', '')
.trim()
)
}
return newMeetingdata
}
Insert cell
meetingData_Arr_clean = cleanMeetingdata(meetingData_Arr)
Insert cell
## Function to Convert to 24hr clock
Insert cell
function get24hTime(rawText){
var time = (rawText).split(":");
if (time[0] === "12") time[0] = "00";
if ((rawText).indexOf("PM") > -1) time[0] = parseInt(time[0])+12;
return time.join(":");
}
Insert cell
endTime = "11:22 PM"
Insert cell
get24hTime(endTime)
Insert cell
## Function to Get Meeting Details
Insert cell
function getMeetingDetails (array) {
let meetingDetails = []
for(let i = 0; i < array.length; i++){
let newMeeting = {}
newMeeting.day = array[i].split(' ')[0]
newMeeting.startTime = get24hTime(array[i].split(' ')[3].concat(' ' + array[i].split(' ')[4]))
newMeeting.endTime = get24hTime(array[i].split(' ')[6].concat(' ' + array[i].split(' ')[7]))
if (array[i].includes('Meeting Type')){
newMeeting.meetingType = array[i].split(' ')[10].concat(' '+ array[i].split(' ')[11]).concat(' '+ array[i].split(' ') [12]).concat(' '+ array[i].split(' ')[13])
}else{
newMeeting.meetingType = "n/a"
}
if (array[i].includes('Special Interest')){
newMeeting.specialInterest = array[i].split(' ')[16] //.concat(' '+ array[i].split(' ')[17]).concat(' '+ array[i].split(' ') [12]).concat(' '+ array[i].split(' ')[13])
}else{
newMeeting.specialInterest = "n/a"
}
//return newMeeting
meetingDetails.push(newMeeting)
}
return meetingDetails
}

Insert cell
getMeetingDetails(meetingData_Arr_clean)
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more