text_html_output_1.png
import pandas as pd

import plotly.express as px

data = pd.read_csv('/kaggle/input/kaggle-survey-2020/kaggle_survey_2020_responses.csv')
questions = data.iloc[0, :].T
data = data.iloc[1:, :]
data.rename({'Q1': 'AGE GROUP'}, axis=1, inplace=True)
data.rename({'Q2': 'GENDER'}, axis=1, inplace=True)
data.rename({'Q3': 'COUNTRY'}, axis=1, inplace=True)
data.rename({'Q4': 'EDUCATION'}, axis=1, inplace=True)
data.rename({'Q5': 'TITLE'}, axis=1, inplace=True)
data.rename({'Q6': 'CODING EXP'}, axis=1, inplace=True)
data.rename({'Q8': '1ST LANG'}, axis=1, inplace=True)
idata = data[data['COUNTRY'] == 'India']
imale = idata[idata['GENDER'] == 'Man']
ifemale = idata[idata['GENDER'] == 'Woman']

country_wise_distribution = data['COUNTRY'].value_counts()
fig = px.choropleth(country_wise_distribution.values, locations=country_wise_distribution.index, locationmode='country names', color=country_wise_distribution.values, labels={'color': 'Count', 'locations': 'Location'}, color_continuous_scale=px.colors.sequential.OrRd)
fig.update_layout(title='COUNTRYWISE DISTRIBUTION')

fig = px.histogram(data, y='COUNTRY', histnorm='percent')
fig.update_layout(xaxis={'ticksuffix': '%'})
fig.update_layout(xaxis_title='COUNT PERCENTAGE')
fig.update_traces(marker_color='rgb(255,128,128)', marker_line_color='rgb(255,128,128)', marker_line_width=1.5, opacity=1)
fig.show()