Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

Commit

Permalink
added percentage indicator in legend of PIE chart(s), regenerated too
Browse files Browse the repository at this point in the history
  • Loading branch information
itzmeanjan committed Sep 12, 2019
1 parent 6ed1f73 commit 3f7f1f5
Show file tree
Hide file tree
Showing 181 changed files with 9 additions and 4 deletions.
Binary file modified plots/mca_andaman_21042018_company_category.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andaman_21042018_company_class.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andaman_21042018_company_principalBusinessActivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andaman_21042018_company_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andaman_21042018_company_subCategory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andhrapradesh_21042018_company_category.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andhrapradesh_21042018_company_class.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andhrapradesh_21042018_company_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_andhrapradesh_21042018_company_subCategory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_arunachalpradesh_21042018_company_category.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_arunachalpradesh_21042018_company_class.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_arunachalpradesh_21042018_company_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_arunachalpradesh_21042018_company_subCategory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_assam_21042018_company_category.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_assam_21042018_company_class.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_assam_21042018_company_principalBusinessActivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_assam_21042018_company_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_assam_21042018_company_subCategory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_bihar_21042018_company_category.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_bihar_21042018_company_class.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_bihar_21042018_company_principalBusinessActivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_bihar_21042018_company_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_bihar_21042018_company_subCategory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/mca_chandigarh_21042018_company_category.png
Binary file modified plots/mca_chandigarh_21042018_company_class.png
Binary file modified plots/mca_chandigarh_21042018_company_status.png
Binary file modified plots/mca_chandigarh_21042018_company_subCategory.png
Binary file modified plots/mca_chhattisgarh_21042018_company_category.png
Binary file modified plots/mca_chhattisgarh_21042018_company_class.png
Binary file modified plots/mca_chhattisgarh_21042018_company_status.png
Binary file modified plots/mca_chhattisgarh_21042018_company_subCategory.png
Binary file modified plots/mca_dadranagarhaveli_21042018_company_category.png
Binary file modified plots/mca_dadranagarhaveli_21042018_company_class.png
Binary file modified plots/mca_dadranagarhaveli_21042018_company_status.png
Binary file modified plots/mca_dadranagarhaveli_21042018_company_subCategory.png
Binary file modified plots/mca_damananddiu_21042018_company_category.png
Binary file modified plots/mca_damananddiu_21042018_company_class.png
Binary file modified plots/mca_damananddiu_21042018_company_status.png
Binary file modified plots/mca_damananddiu_21042018_company_subCategory.png
Binary file modified plots/mca_delhi_21042018_company_category.png
Binary file modified plots/mca_delhi_21042018_company_class.png
Binary file modified plots/mca_delhi_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_delhi_21042018_company_status.png
Binary file modified plots/mca_delhi_21042018_company_subCategory.png
Binary file modified plots/mca_goa_21042018_company_category.png
Binary file modified plots/mca_goa_21042018_company_class.png
Binary file modified plots/mca_goa_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_goa_21042018_company_status.png
Binary file modified plots/mca_goa_21042018_company_subCategory.png
Binary file modified plots/mca_gujarat_21042018_company_category.png
Binary file modified plots/mca_gujarat_21042018_company_class.png
Binary file modified plots/mca_gujarat_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_gujarat_21042018_company_status.png
Binary file modified plots/mca_gujarat_21042018_company_subCategory.png
Binary file modified plots/mca_haryana_21042018_company_category.png
Binary file modified plots/mca_haryana_21042018_company_class.png
Binary file modified plots/mca_haryana_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_haryana_21042018_company_status.png
Binary file modified plots/mca_haryana_21042018_company_subCategory.png
Binary file modified plots/mca_himachalpradesh_21042018_company_category.png
Binary file modified plots/mca_himachalpradesh_21042018_company_class.png
Binary file modified plots/mca_himachalpradesh_21042018_company_status.png
Binary file modified plots/mca_himachalpradesh_21042018_company_subCategory.png
Binary file modified plots/mca_jammuandkashmir_21042018_company_category.png
Binary file modified plots/mca_jammuandkashmir_21042018_company_class.png
Binary file modified plots/mca_jammuandkashmir_21042018_company_status.png
Binary file modified plots/mca_jammuandkashmir_21042018_company_subCategory.png
Binary file modified plots/mca_jharkhand_21042018_company_category.png
Binary file modified plots/mca_jharkhand_21042018_company_class.png
Binary file modified plots/mca_jharkhand_21042018_company_status.png
Binary file modified plots/mca_jharkhand_21042018_company_subCategory.png
Binary file modified plots/mca_karnataka_21042018_company_category.png
Binary file modified plots/mca_karnataka_21042018_company_class.png
Binary file modified plots/mca_karnataka_21042018_company_status.png
Binary file modified plots/mca_karnataka_21042018_company_subCategory.png
Binary file modified plots/mca_kerala_21042018_company_category.png
Binary file modified plots/mca_kerala_21042018_company_class.png
Binary file modified plots/mca_kerala_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_kerala_21042018_company_status.png
Binary file modified plots/mca_kerala_21042018_company_subCategory.png
Binary file modified plots/mca_lakshadweep_21042018_company_category.png
Binary file modified plots/mca_lakshadweep_21042018_company_class.png
Binary file modified plots/mca_lakshadweep_21042018_company_status.png
Binary file modified plots/mca_lakshadweep_21042018_company_subCategory.png
Binary file modified plots/mca_madhyapradesh_21042018_company_category.png
Binary file modified plots/mca_madhyapradesh_21042018_company_class.png
Binary file modified plots/mca_madhyapradesh_21042018_company_status.png
Binary file modified plots/mca_madhyapradesh_21042018_company_subCategory.png
Binary file modified plots/mca_maharashtra_21042018_company_category.png
Binary file modified plots/mca_maharashtra_21042018_company_class.png
Binary file modified plots/mca_maharashtra_21042018_company_status.png
Binary file modified plots/mca_maharashtra_21042018_company_subCategory.png
Binary file modified plots/mca_manipur_21042018_company_category.png
Binary file modified plots/mca_manipur_21042018_company_class.png
Binary file modified plots/mca_manipur_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_manipur_21042018_company_status.png
Binary file modified plots/mca_manipur_21042018_company_subCategory.png
Binary file modified plots/mca_meghalaya_21042018_company_category.png
Binary file modified plots/mca_meghalaya_21042018_company_class.png
Binary file modified plots/mca_meghalaya_21042018_company_status.png
Binary file modified plots/mca_meghalaya_21042018_company_subCategory.png
Binary file modified plots/mca_mizoram_21042018_company_category.png
Binary file modified plots/mca_mizoram_21042018_company_class.png
Binary file modified plots/mca_mizoram_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_mizoram_21042018_company_status.png
Binary file modified plots/mca_mizoram_21042018_company_subCategory.png
Binary file modified plots/mca_nagaland_21042018_company_category.png
Binary file modified plots/mca_nagaland_21042018_company_class.png
Binary file modified plots/mca_nagaland_21042018_company_status.png
Binary file modified plots/mca_nagaland_21042018_company_subCategory.png
Binary file modified plots/mca_odisha_21042018_company_category.png
Binary file modified plots/mca_odisha_21042018_company_class.png
Binary file modified plots/mca_odisha_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_odisha_21042018_company_status.png
Binary file modified plots/mca_odisha_21042018_company_subCategory.png
Binary file modified plots/mca_puducherry_21042018_company_category.png
Binary file modified plots/mca_puducherry_21042018_company_class.png
Binary file modified plots/mca_puducherry_21042018_company_status.png
Binary file modified plots/mca_puducherry_21042018_company_subCategory.png
Binary file modified plots/mca_punjab_21042018_company_category.png
Binary file modified plots/mca_punjab_21042018_company_class.png
Binary file modified plots/mca_punjab_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_punjab_21042018_company_status.png
Binary file modified plots/mca_punjab_21042018_company_subCategory.png
Binary file modified plots/mca_rajasthan_21042018_company_category.png
Binary file modified plots/mca_rajasthan_21042018_company_class.png
Binary file modified plots/mca_rajasthan_21042018_company_status.png
Binary file modified plots/mca_rajasthan_21042018_company_subCategory.png
Binary file modified plots/mca_sikkim_21042018_company_category.png
Binary file modified plots/mca_sikkim_21042018_company_class.png
Binary file modified plots/mca_sikkim_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_sikkim_21042018_company_status.png
Binary file modified plots/mca_sikkim_21042018_company_subCategory.png
Binary file modified plots/mca_tamilnadu_21042018_company_category.png
Binary file modified plots/mca_tamilnadu_21042018_company_class.png
Binary file modified plots/mca_tamilnadu_21042018_company_status.png
Binary file modified plots/mca_tamilnadu_21042018_company_subCategory.png
Binary file modified plots/mca_telangana_21042018_company_category.png
Binary file modified plots/mca_telangana_21042018_company_class.png
Binary file modified plots/mca_telangana_21042018_company_status.png
Binary file modified plots/mca_telangana_21042018_company_subCategory.png
Binary file modified plots/mca_tripura_21042018_company_category.png
Binary file modified plots/mca_tripura_21042018_company_class.png
Binary file modified plots/mca_tripura_21042018_company_principalBusinessActivity.png
Binary file modified plots/mca_tripura_21042018_company_status.png
Binary file modified plots/mca_tripura_21042018_company_subCategory.png
Binary file modified plots/mca_uttarakhand_21042018_company_category.png
Binary file modified plots/mca_uttarakhand_21042018_company_class.png
Binary file modified plots/mca_uttarakhand_21042018_company_status.png
Binary file modified plots/mca_uttarakhand_21042018_company_subCategory.png
Binary file modified plots/mca_uttarpradesh_21042018_company_category.png
Binary file modified plots/mca_uttarpradesh_21042018_company_class.png
Binary file modified plots/mca_uttarpradesh_21042018_company_status.png
Binary file modified plots/mca_uttarpradesh_21042018_company_subCategory.png
Binary file modified plots/mca_westbengal_21042018_company_category.png
Binary file modified plots/mca_westbengal_21042018_company_class.png
Binary file modified plots/mca_westbengal_21042018_company_status.png
Binary file modified plots/mca_westbengal_21042018_company_subCategory.png
13 changes: 9 additions & 4 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
exit(1)

'''
Takes a Dict[str, int], which is generated by function(s) defined below
Takes a Dict[str, int], which is generated by function(s) defined below
( categorizes company dataset, for a certain State in India, using various parameters )
& a targetPath on local file system ( an image of `*.png` form ),
where to store this generated PIE chart.
Expand All @@ -30,10 +30,15 @@ def plotCategorizedCompanyDataForACertainState(dataSet, targetPath, title):
'weight': 'normal',
'size': 12
}
labels = sorted(dataSet, key=lambda elem:
dataSet[elem], reverse=True)
# calculating total # of companies we're considering here, for a certain state
total = sum([dataSet[i] for i in dataSet])
_tmpLabels = sorted(dataSet, key=lambda e:
dataSet[e], reverse=True)
# now PIE chart's labels will include a percentage field too, in its legend
labels = ['{} ( {:.4f} % )'.format(
i, dataSet[i]*100/total) for i in _tmpLabels]
# this is the actual data to be plotted
data = [dataSet[i] for i in labels]
data = [dataSet[i] for i in _tmpLabels]
# figure on which pie chart to be drawn ( of size 2400x1200 )
plt.figure(figsize=(24, 12), dpi=100)
patches, _ = plt.pie(data) # plotting pie chart
Expand Down

0 comments on commit 3f7f1f5

Please sign in to comment.