Skip to content

The Global Peace Index (GPI) is a way to measure peace between countries and regions. It uses a variety of factors, such as the level of violence, the number of weapons, and the quality of life. The GPI is a valuable tool to understand the state of peace in the world and track progress over time.

Notifications You must be signed in to change notification settings

mircothibes/Global-Peace-Index--GPI-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Global Peace Index (GPI)

The Global Peace Index (GPI) is a way to measure peace between countries and regions. It uses a variety of factors, such as the level of violence, the number of weapons, and the quality of life. The GPI is a valuable tool to understand the state of peace in the world and track progress over time.

The Global Peace Index (GPI) is a way to measure how peaceful different countries and regions are. It does this by looking at a variety of factors, such as the level of violence, the number of weapons, and the quality of life. The GPI is a valuable tool for understanding the state of peace in the world and for tracking progress over time.

The GPI is a valuable tool for understanding the state of peace in the world. It can help us to identify countries that are at risk of conflict and to develop policies that can promote peace. The GPI is also a useful tool for tracking progress over time and for measuring the effectiveness of peacebuilding efforts.

image

The code is a Dash app that uses the peace_index.csv dataset to create a map and charts that show the safety of countries around the world. The app allows users to select a year from 2011 to 2021 to see how the safety of countries has changed over time.

The first part of the code imports the necessary libraries, including pandas, folium, plotly.express, plotly.graph_objects, dash, base64, and dash_bootstrap_components. It also defines the app layout, which includes a header, a dropdown menu, and two divs that will contain the map and charts.

The next part of the code reads the peace_index.csv dataset and filters it to only include the years 2011 to 2021. It then calculates the global average safety score for each year.

The next part of the code creates the map and charts. The map uses the folium library to create a choropleth map that shows the safety score of each country. The charts use the plotly libraries to create a bar chart of the 10 least safe countries in the selected year and a line chart of the global average safety score over time.

The final part of the code defines the callback function that updates the map and charts when the user selects a different year in the dropdown menu.

The code is well-organized and easy to follow. It uses a variety of libraries to create a visually appealing and informative app. The app is a valuable tool for understanding the safety of countries around the world.

Additionally, you can change the theme button to white or black and view the DataMind company logo. There is also a "visit the webpage" phrase that you can click on to open the DataMind website.

About

The Global Peace Index (GPI) is a way to measure peace between countries and regions. It uses a variety of factors, such as the level of violence, the number of weapons, and the quality of life. The GPI is a valuable tool to understand the state of peace in the world and track progress over time.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages