We consider the first-order hyperbolic shallow water equations, for which solutions are typically dominated by wave-breaking behavior. Numerical simulations and linearized analysis suggest that, in the presence of periodic spatial bathymetry, solutions of the shallow water equations exhibit dispersive effects. We perform a multiple-scale perturbation analysis in one and two horizontal dimensions to derive constant-coefficient effective equations that turn out to include higher-order dispersive terms. Analysis and simulations demonstrate that these equations possess solitary traveling-wave solutions and agree well with direct simulation of the original first-order hyperbolic system.