I have a group data frame like this :
group_by_region_year_month=train_data.groupby(['Region Name (GO)','Year','Month'],as_index=False)
region_sum=group_by_region_year_month.agg({"AMV": "sum"})
Here, AMV
is my target variable in regression (this is the count of total vehicles).
I have data for each day from 2000-3-17 to 2017-10-11.
I want to show the variation of the count for each year and each month for each Region.
How best can I plot it?
I tried using seaborn.FacetGrid
in this way:
# g=sns.FacetGrid(row="Region Name (GO)", col="AMV", data=region_sum)
But it is taking too much time.
Is there any better alternative(s)?
Edit 1
I tried this :
sns.set(rc={'figure.figsize':(50,30)})
ax=sns.barplot(x='Region Name (GO)', y='AMV', hue='Year', data=train_data)
ax.set_xticklabels(ax.get_xticklabels(), rotation=90)
which gave me a very clumsy plot :
I did not use countplot
as countplot would give me a count of rows. But, I want the sum of all values in a group.
Can I represent it in any better way?