Air quality has emerged as a key determinant of important health outcomes in children and adults. This study aims to identify factors that influence local, within-community air quality, and to build a model for traffic-related air pollution (TRP).We utilized concentrations of NO2, NO, and total oxides of nitrogen (NOx), which were measured at 942 locations in 12 southern California communities. For each location, population density, elevation, land-use, and several indicators of traffic were calculated. A spatial random effects model was used to study the relationship of these predictors to each TRP. Variation in TRP was strongly correlated with traffic on nearby freeways and other major roads, and also with population density and elevation. After accounting for traffic, categories of land-use were not associated with the pollutants. Traffic had a larger relative impact in small urban (low regional pollution) communities than in large urban (high regional pollution) communities. For example, our best fitting model explained 70% of the variation in NOx in large urban areas and 76% in small urban areas. Compared with living at least 1,500m from a freeway, living within 250m of a freeway was associated with up to a 41% increase in TRP in a large urban area, and up to a 75% increase in small urban areas. Thus, traffic strongly affects local air quality in large and small urban areas, which has implications for exposure assessment and estimation of health risks.