  We study the superconductor-insulator transition (SIT) in $d$-wave
superconducting ultrathin films. By means of the kernel polynomial method, the
Bogoliubov-de Gennes equations are solved for square lattices with up to
$360\times 360$ unit cells self-consistently, making it possible to observe
fully the nanoscale spatial fluctuations of the superconducting order
parameters and discriminate accurately the localized quasiparticle states from
the extended ones by the lattice-size scaling of the generalized inverse
participation ratio. It is shown that Anderson localization can not entirely
inhibit the occurrence of the local superconductivity in strongly-disordered
$d$-wave superconductors. Separated by an insulating 'sea' completely, a few
isolated superconducting 'islands' with significant enhancement of the local
superconducting order parameters can survive across the SIT. The
disorder-driven SIT, therefore, is a transition from a $d$-wave superconductor
to a Bose insulator which consists of localized Cooper pairs. Unlike an
$s$-wave superconductor which presents a robust single-particle gap across the
SIT, the optical conductivity of a $d$-wave superconductor reveals a gapless
insulating phase, where the SIT can be detected by observing the disappearance
of the Drude weight with the increasing disorder.
