U.S. Immigration FiveThirtyEight-Style Visuals and Choropleth Maps

Hi Crawbears,

Today, we’ll look into the question: How have U.S. immigration trends and distribution changed by country over the past few decades? In order to better understand, visualize, and communicate our findings, let’s create FiveThirtyEight-style subplots using matplotlib and an interactive choropleth map using folium. We’ll work with official UN data on immigration to the United States from 1980 to 2013. If you’d like to explore other countries, you can find the original source data on immigration from around to the world into 45 countries here. Let’s break it down:

Part 1: Cleaning and wrangling, including modifying our columns, setting and resetting our index, adjusting data types using pd.to_numeric, coerce, fillna, and astype, creating a new ‘Total’ column using sum() and axis

Part 2: Area plot of immigration for Top 7 countries (using sort values) – Mexico, Philippines, China, India, Vietnam, Dominican Republic, and South Korea

Part 3: Box and line subplots of immigration for Meixco, China, and India

Part 4: Box and line subplots of immigration for Philippines, China, India, Vietnam, and South Korea

Part 5: Choropleth map using folium and geojson file

Let’s dig in.

Stay tuned for more cool visuals in upcoming posts.

If you’d like to explore, model, or visualize something, reach out to info@crawstat.com!

Till next time,

Rish

Leave a Reply

Discover more from crawstat.

Subscribe now to keep reading and get access to the full archive.

Continue reading