Python Extras

Find your country on a Map using Python

import plotly.express as px

country = input(“Enter the country name: “)

data = {

    ‘Country’: [country],

    ‘Values’: [100]  }

fig = px.choropleth(

    data,

locations=’Country’,

    locationmode=’country names’,

    color=’Values’,

    color_continuous_scale=’Inferno’,

    title=f’Country Map Highlighting {country}’)

fig.show()

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button