Scooter dispatch
The City Council were huge fans of Sam's prediction about whether scooter was blocking a sidewalk or not. So much so, they asked her to build a notification system to dispatch crews to impound scooters from sidewalks.
With the dataset she created, Sam can dispatch crews to the case's coordinates when a request has negative sentiment.

In this exercise, you will help Sam implement a system that dispatches crews based on sentiment and image recognition. You will help Sam pair human and machine for effective City management!
Diese Übung ist Teil des Kurses
<Kurs>Introduction to AWS Boto in Python</Kurs>Übungsanweisungen
- Get the SNS topic ARN for
'scooter_notifications'. - For every row, if sentiment is
'NEGATIVE'and there is an image of a scooter, construct a message to send. - Publish the notification to the SNS topic.
Interaktive praktische Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Get topic ARN for scooter notifications
topic_arn = sns.____(Name='____')['____']
for index, row in scooter_requests.iterrows():
# Check if notification should be sent
if (row['____'] == 'NEGATIVE') & (row['img_scooter'] == ____):
# Construct a message to publish to the scooter team.
message = "Please remove scooter at {}, {}. Description: {}".____(
row['long'], row['lat'], row['public_description'])
# Publish the message to the topic!
sns.____(____ = topic_arn,
____ = message,
____ = "Scooter Alert")