# Clipboard
https://www.transfernow.net/dl/20250228xKnd7ikT/vscyfoOT
## Quick Clipboard
```py
sorted(crime_df['Offense Parent Group'].unique())
sorted(crime_df['Offense'].unique())
#crime_df['Offense'].str.contains('bike|bicycle', regex=True, flags=re.IGNORECASE).sum() # 0.
#crime_df['Offense'].str.contains('larceny|theft', regex=True, flags=re.IGNORECASE).sum() # 356,078.
#crime_df['Offense'].str.contains('vehicle', regex=True, flags=re.IGNORECASE).sum() # 309,192.
(crime_df['Offense'] == 'Motor Vehicle Theft').sum() # 82,275.
# Filter DataFrame.
veh_theft_df = crime_df[(crime_df['Offense'] == 'Motor Vehicle Theft')]
print(veh_theft_df.shape)
veh_theft_df.sample(5)
# Folium stuff.
import folium
from folium.plugins import HeatMap
seattle_map = folium.Map(
location=[veh_theft_df['Latitude'].median(), veh_theft_df['Longitude'].median()],
zoom_start=13
)
HeatMap(
data=veh_theft_df[['Latitude', 'Longitude']].values,
radius=12
).add_to(seattle_map)
seattle_map.save("../output/seattle_vehicle_theft_map.html")
```
## Code Hospital
Put your code that doesn't work here!
```py
print(f"{superhero_name} is well known for being {height_metres) tall.")
```
---
## Superhero Strings
### `+` Concatenation Operator
```py
print (superhero_name + " can " + superpower )
```
```py
print("My superhero's name is '" + superhero_name + "'.")
```
```py
print ("The hero Gotham never knew it needed was " + superhero_name +".")
```
```py
print(superhero_name + " is actaully " + first_name)
```
```py
print("Super Hero Name: " + superhero_name)
print("Super Hero Height: " + height_metres)
print("Super Hero Birth Year: " + year_of_birth)
print("Super Hero Super Power: " + superpower)
```
### f-strings
```py
print(f"{superhero_name}'s is {height_metres} tall.")
```
```py
print (f"{superhero_name}'s height is {height_metres} metres.")
```
```py
print(f"{superhero_name} is {height_metres} tall in meters")
```
```py
print("My name is {} and I was born in {}." .format(superhero_name, year_of_birth))
```
# Discoveries
Paste any code here related to Seattle Cycles
```py
station_size_tally = pd.DataFrame(station_df['current_group'].value_counts().reindex(labels))
station_size_tally
figsize = (8, 4)
fig, ax = plt.subplots(figsize=figsize)
columns = ax.bar(
x=station_size_tally.index,
height=station_size_tally['count']
)
plt.show()
```
```py
import matplotlib.pyplot as plt
station_df.plot(kind="scatter", x="long", y="lat", alpha=0.4)
plt.show()
```
```py
#\/\/\/\Install First \/\/\/
#pip install plotly
import plotly.graph_objects as go
# Create the scattergeo plot
fig = go.Figure(go.Scattergeo(
lat= station_df['lat'],
lon= station_df['long'],
mode='markers',
marker=dict(
size=8,
color='blue',
symbol='circle'
)
))
# Update layout for better visualization
fig.update_layout(
title='Geographical Points',
geo=dict(
showland=True,
#landcolor='rgb(243, 243, 243)',
center=dict(
lat=42.00,
lon=-122.00
),
)
)
# Show the plot
fig.show()
#Don't know how to use a better map
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```
```py
# paste here
```