Policies such as Staying Home, bubbling, and Staying with Your Community, recommending that individuals reduce contact with diverse communities, including families and schools, have been introduced to mitigate the spread of the COVID-19 pandemic. However, these policies are violated if individuals from various communities gather - a latent risk in the real society where people move among various unreported communities. We aimed to create a physical index to assess the possibility of contact between individuals from diverse communities, which serves as an indicator of the potential risk of SARS-CoV-2 spread if taken into account combined with existing indices. Moving Direction Entropy (MDE), which quantifies the diversity of moving directions of individuals in each local region, is here proposed as an index to evaluate a region's risk of contacts of individuals from diverse communities. MDE was computed for each inland municipality in Tokyo using mobility data collected from smartphones from before to during the COVID-19 pandemic. To validate the hypothesis that the impact of inter-community contact on infection expansion becomes larger for a virus with larger infectivity, we compared the correlations of the expansion of infectious diseases with indices including MDE and the densities of supermarkets, restaurants, etc. In addition, we analyzed the temporal changes in MDE in municipalities. First, the MDEs for local regions showed significant invariance between different periods according to Spearman's rank correlation coefficient (>0.9). Second, the MDE was found to correlate with the rate of infection cases of COVID-19 over local populations in the 53 inland regions: 0.76 in average during the periods of expansion. The density of restaurants had a similar correlation with COVID-19. The correlation with MDE was higher for COVID-19 than for influenza, which was higher than for sexually transmitted diseases, that is, in the order of infectivity, which supports the hypothesis in Methods. Third, the spread of COVID-19 was accelerated in regions with high-rank MDEs compared to those with high-rank restaurant densities during and after the period of governmental declarations of emergency (p < .001). Fourth, the MDEs tended to be high and increased during the pandemic period in regions where influx or daytime movement was active. A possible explanation for the third and fourth findings is that policymakers and living people have been overlooking MDE. We propose monitoring the regional values of MDE to reduce the risk of infection spread. To aid in this monitoring, we present a method to create a heat map of MDE values, thereby drawing public attention to behaviors that facilitate contact between communities during a highly infectious disease pandemic. This study was not registered in a clinical trial registry because it used mobility data from smartphones and other available data, without trials.