Women are underrepresented across all levels of government, including among candidates for office. A central factor in women’s reluctance to run for office is that politics is not seen as aligning with women’s communal goals, such as caring for others and working collaboratively. But governments, particularly local governments, vary in their communal policy priorities. We argue that this creates temporal and geographic variation in women’s entrance into politics, such that women will be more likely to run and win in jurisdictions that focus their resources on communal issues like education and social services. We introduce a comprehensive database of over 70,000 mayoral candidates from more than 4,000 municipalities in Brazil. Exploiting data on the electoral environment and spending trends over time, we demonstrate that women run for office more frequently in places that spend more money on communal areas. We then use a new method for analysis: analyzing the lack of balance in regression discontinuity to identify the places where women are more likely to win competitive elections and show that this aligns with local spending patterns. We then test whether these factors change who runs for office, showing that women with education backgrounds are much more likely to run and win in these ``women-friendly” places.