The California State Senate passed a bill in April that provides a number of protections to immigrants in the state in light of recent crackdowns by Immigration and Customs Enforcement. The legislation limits the power of ICE agents to draw upon the resources of local law enforcement.

With the law’s passage, California is now being called the nation’s first “sanctuary state” at a time when the Trump administration has been targeting illegal immigration and so-called sanctuary cities.

8. Florida

> Pct. foreign born: 19.7% (4th highest)
> Median household income: $41,518 (foreign-born), $49,431 (native-born)
> Adults with a bachelor’s degree: 25.5% (foreign-born), 27.9% (native-born)
> Green cards issued in 2015: 605.1 per 100,000 (2nd highest)

Florida has accepted more immigrants in recent years than nearly any other state. The population grew by 3.7% from international migration between 2010 and 2016, more than any other state and roughly twice the national growth rate due to immigration. More than 40% of all Florida’s foreign-born population is from the Caribbean, and more than 25% is from South and Central America, both high shares compared to that of the nation as a whole. Approximately 605 green cards were issued per 100,000 state residents in the 2015 fiscal year, more than in any state other than New York.

While more foreign-born Floridians have been granted permanent resident status than most states combined over the last several years, the state has one of the larger wealth disparities between native- and non-native residents. The typical immigrant household in Florida earns roughly $8,000 less annually than the typical native-born household, far more than the $5,000 national figure.

Safety and continued residency are only some of the concerns facing non-natives living in the United States. Different parts of the country provide different opportunities for earnings, education, and homeownership. Some also have large communities of fellow immigrants, whose help and support can ease the process of assimilation for new Americans.

24/7 Wall St. reviewed data on the presence and prosperity of immigrants in each state and ranked all 50 based on their favorability for foreign-born residents. California ranks as the best state for immigrants, while South Dakota ranks as the worst.

Establishing a new life and finding success in the United States can be difficult. Immigrants are far less likely to earn more than Americans who were born in the U.S., and are more likely to live in poverty.

Notably, however, unemployment tends to be lower among immigrants than among U.S.-born residents. While the unemployment rate among native-born citizens is 5.3%, it is just 5.0% for immigrants. In Alaska, one of the best states for immigrants, the unemployment rate is 2.6 percentage points lower among foreign-born workers than among U.S. natives in the labor force. This phenomenon is likely in part related to the fact that immigrants must maintain employment to have their visa renewed.

One factor determining a state’s favorability for immigrants is the share of state residents who are non-natives. This ranges from a 27.0% share in California to just 1.5% in West Virginia. Having relatively few immigrants does not necessarily imply the state is inhospitable, however, as in the case of West Virginia, which ranks third best on our list.

However, many of the best states for immigrants, such as New York, California, New Jersey, and Florida, have large immigrant populations. These states are home to major metropolitan areas with distinct communities of immigrants from countries all over the world. For new immigrants, these communities provide access to others who speak their first language and have gone through the process of becoming a full-time resident. This is a potentially helpful, if not necessary, component of a smooth transition to full integration.

While we rank states based on the economic outcomes for foreign-born residents, it is important to note that outcomes in each state tend to vary based on more than simply a resident’s status as native-born or foreign-born.

For example, naturalized immigrants — those who have been granted citizenship — overwhelmingly tend to have much higher incomes, and are much more often highly-educated, than non-citizen foreign-born residents. Among immigrants, the poverty rate for those who are citizens is 11.4% — less than the rate for native-born residents — while nearly 25% of non-citizens from other countries are poor. There are also substantial differences in economic outcomes depending on the region of origin of non-natives living in each state.

To determine the best states for immigrants, 24/7 Wall St. constructed an index consisting of five socioeconomic measures intended to reflect the success and ease of assimilation for foreign-born citizens relative to the native-born population within a given state. Three of the measures — median household income, poverty rate, and unemployment — came from the U.S. Census Bureau’s 2015 American Community Survey. The disparities in median household income, poverty rate, and unemployment among the native- and foreign-born populations were standardized using min-max normalization and added to a composite index. The index also includes the normalized value for the share of the overall state population that is foreign born, which also came from the ACS, and the number of green cards issued within the state as a share of the total number of green cards issued nationwide in the 2015 fiscal year. Green card data came from the Department of Homeland Security’s 2015 Yearbook of Immigration Statistics. Supplementary data used in our analysis but not our index, such as educational attainment, household size, and employment composition by citizenship status, also came from the ACS.

Click here to see the 10 best states for immigrants.