File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -132,17 +132,29 @@ def __get_number_of_projects(df):
132
132
import urllib .request
133
133
import matplotlib .pyplot as plt
134
134
import pandas as pd
135
-
135
+ '''
136
+ Import modules to create treemap of the frenquency of projects in the dataset
137
+ '''
136
138
url = 'https://download.brainimagelibrary.org/inventory/daily/reports/today.json'
137
139
file_path , _ = urllib .request .urlretrieve (url )
138
140
df = pd .read_json (file_path )
139
-
141
+ '''
142
+ Link for the data that will be used
143
+ '''
140
144
def get_projects_treemaps (df ):
145
+ '''
146
+ name function for treemap of projects
147
+ '''
141
148
df = df ['project' ].value_counts ().to_dict ()
142
149
sizes_list = list (df .values ())
143
150
names_list = list (df .keys ())
144
151
squarify .plot (sizes_list )
145
152
plt .show ()
153
+ '''
154
+ Input: project values
155
+ Output: treemap graph of projects frequency
156
+ Created a code for the visualization of projects frequency
157
+ '''
146
158
get_projects_treemaps (df )
147
159
148
160
You can’t perform that action at this time.
0 commit comments