30 Day Map Challenge: Day 1 (Points)¶
This is a notebook for day 1 of 30 Day Map Challenge.
Imports¶
In [1]:
Copied!
import geopandas as gpd
import matplotlib as mpl
import numpy as np
import pandas as pd
import shapely
from lonboard import Map, ScatterplotLayer
import geopandas as gpd
import matplotlib as mpl
import numpy as np
import pandas as pd
import shapely
from lonboard import Map, ScatterplotLayer
Access the data¶
This data comes from NYC Open Data, where we use Motor Vehicle Collisions - Crashes. First download this data via Export > CSV
, save it somewhere on disk, and update the path
variable in the next cell for that location.
In [2]:
Copied!
path = "/Users/kyle/Downloads/Motor_Vehicle_Collisions_-_Crashes_20231101.csv"
path = "/Users/kyle/Downloads/Motor_Vehicle_Collisions_-_Crashes_20231101.csv"
Read the data:
In [3]:
Copied!
df = pd.read_csv(path, dtype={"ZIP CODE": str})
df = pd.read_csv(path, dtype={"ZIP CODE": str})
Let's first take a peek at our data:
In [4]:
Copied!