From c22fe8e4b2fed42ab6a46ac6c123cea288850f48 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 8 Jul 2024 22:06:36 -0500 Subject: fix images for 2018 to 2021 posts --- content/blog/2020-09-25-happiness-map.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'content/blog/2020-09-25-happiness-map.md') diff --git a/content/blog/2020-09-25-happiness-map.md b/content/blog/2020-09-25-happiness-map.md index f150ea6..ffd8466 100644 --- a/content/blog/2020-09-25-happiness-map.md +++ b/content/blog/2020-09-25-happiness-map.md @@ -64,9 +64,6 @@ geo_data = gpd.read_file('https://raw.githubusercontent.com/datasets/geo-countri geo_data.head() ``` -![GeoJSON -Dataframe](https://img.cleberg.net/blog/20200925-world-choropleth-map/geojson_df.png) - Next, let's load the data from the Kaggle dataset. I've downloaded this file, so update the file path if you have it somewhere else. After loading, let's take a look at this dataframe: @@ -77,9 +74,6 @@ happy_data = pd.read_csv(r'~/Downloads/world_happiness_data_2019.csv') happy_data.head() ``` -![Happiness -Dataframe](https://img.cleberg.net/blog/20200925-world-choropleth-map/happiness_df.png) - # Clean the Data Some countries need to be renamed, or they will be lost when you merge the @@ -126,9 +120,6 @@ merged_df = merged_df.rename(columns = {'ADMIN':'GeoJSON_Country'}) merged_df = merged_df.rename(columns = {'Country or region':'Country'}) ``` -![Merged -Dataframe](https://img.cleberg.net/blog/20200925-world-choropleth-map/merged_df.png) - # Create the Map The data is finally ready to be added to a map. The code below shows the @@ -164,9 +155,6 @@ folium.Choropleth( Let's look at the resulting map. -![Choropleth -Map](https://img.cleberg.net/blog/20200925-world-choropleth-map/map.png) - # Create a Tooltip on Hover Now that we have a map set up, we could stop. However, I want to add a tooltip @@ -216,8 +204,4 @@ folium.LayerControl().add_to(world_map) world_map ``` -The final image below will show you what the tooltip looks like whenever you -hover over a country. - -![Choropleth Map -Tooltip](https://img.cleberg.net/blog/20200925-world-choropleth-map/tooltip_map.png) +The tooltip will now appear whenever you hover over a country. -- cgit v1.2.3