Skip to content

Commit b8047f8

Browse files
committed
Added first version of correlation plot
1 parent 75549f9 commit b8047f8

13 files changed

Lines changed: 13707 additions & 1348 deletions

dashboard/analysis.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
1+
# -*- coding: utf-8 -*-
2+
###############################################################################
3+
# Copyright (c), Forschungszentrum Jülich GmbH, IAS-9, Germany. #
4+
# All rights reserved. #
5+
# This file is part of the survey_dashboard package. #
6+
# #
7+
# The code is hosted on GitHub at #
8+
# https://github.com/Materials-Data-Science-and-Informatics/survey_dashboard #
9+
# For further information on the license, see the LICENSE file #
10+
###############################################################################
11+
"""
12+
This module contains some function to process survey data in certain way and
13+
prepare the data for visualization
14+
"""
15+
import math
216
import pandas as pd
317
from typing import List, Tuple
418

@@ -88,8 +102,8 @@ def prepare_data_research_field(df: pd.DataFrame, key:str, key2:str='researchAre
88102
all_areas = df[key].value_counts()
89103
all_areas = all_areas.sort_index()
90104
research_areas = list(df[key2].value_counts().keys())
91-
data = {'All': all_areas.values, key:list(all_areas.keys()), 'x_value': list(all_areas.keys())}
92-
y_keys = ['All'] + research_areas
105+
data = {'Cum. Sum': all_areas.values, key:list(all_areas.keys()), 'x_value': list(all_areas.keys())}
106+
y_keys = ['Cum. Sum'] + research_areas
93107
for area in research_areas:
94108
area_counts = df[df[key2] == area][key].value_counts()
95109
area_counts = area_counts.sort_index()
@@ -116,4 +130,8 @@ def prepare_data_research_field(df: pd.DataFrame, key:str):
116130
data[area] = {'counts': area_counts.values, 'values': list(area_counts.keys())}
117131
118132
return data
119-
'''
133+
'''
134+
135+
def percentage_to_area(data, scale_m=1.0):
136+
radius_data = [2*math.sqrt(val*scale_m/math.pi) for val in data]
137+
return radius_data
Lines changed: 258 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,261 @@
1-
careerLevel
21
centerAffiliation
3-
dataFormats
4-
dataGenMethodSpec
5-
dataGenMethod
6-
Hub
7-
researchAreaCombined
8-
yearsInResearch
9-
software
10-
servNeeds_sub
11-
servFormat
2+
centerAffiliation_other
3+
researchFieldHGF
124
researchArea
13-
pubMotivation
14-
pubObstaclesA
5+
researchArea_other
6+
researchAreaING
7+
researchAreaING_other
8+
researchAreaGEO
9+
researchAreaGEO_other
10+
researchAreaMATH
11+
researchAreaMATH_other
12+
researchAreaPHYS
13+
researchAreaPHYS_other
14+
researchAreaLIFE
15+
researchAreaLIFE_other
16+
researchAreaBIO
17+
researchAreaBIO_other
18+
researchAreaMED
19+
researchAreaMED_other
20+
researchAreaAGRI
21+
researchAreaAGRI_other
22+
researchAreaPSYCH
23+
researchAreaPSYCH_other
24+
researchAreaCHEM
25+
researchAreaCHEM_other
26+
yearsInResearch
27+
careerLevel
28+
careerLevel_other
29+
orcid
30+
fairFamiliarity
31+
dataOrigin_MeasVsSim
32+
dataOrigin_SelvVsReuse
33+
dataAmount_lsf
34+
lsfIdent_1
35+
lsfIdent_2
36+
lsfIdent_3
37+
lsfIdent_4
38+
lsfIdent_5
39+
lsfIdent_6
40+
lsfIdent_7
41+
lsfIdent_8
42+
lsfIdent_9
43+
lsfIdent_10
44+
lsfIdent_11
45+
lsfIdent_other
46+
dataGenMethod_1
47+
dataGenMethod_2
48+
dataGenMethod_3
49+
dataGenMethod_4
50+
dataGenMethod_5
51+
dataGenMethod_6
52+
dataGenMethod_other
53+
dataGenMethodSpec_1_1
54+
dataGenMethodSpec_1_2
55+
dataGenMethodSpec_1_3
56+
dataGenMethodSpec_2_1
57+
dataGenMethodSpec_2_2
58+
dataGenMethodSpec_2_3
59+
dataGenMethodSpec_3_1
60+
dataGenMethodSpec_3_2
61+
dataGenMethodSpec_3_3
62+
dataGenMethodSpec_4_1
63+
dataGenMethodSpec_4_2
64+
dataGenMethodSpec_4_3
65+
dataGenMethodSpec_5_1
66+
dataGenMethodSpec_5_2
67+
dataGenMethodSpec_5_3
68+
dataGenMethodSpec_6_1
69+
dataGenMethodSpec_6_2
70+
dataGenMethodSpec_6_3
71+
dataGenMethodSpec_7_1
72+
dataGenMethodSpec_7_2
73+
dataGenMethodSpec_7_3
74+
dataFormats_1
75+
dataFormats_2
76+
dataFormats_3
77+
dataFormats_4
78+
dataFormats_5
79+
dataFormats_6
80+
dataFormats_7
81+
dataFormats_8
82+
dataFormats_9
83+
dataFormats_10
84+
dataFormats_11
85+
dataFormats_12
86+
dataFormats_13
87+
dataFormats_14
88+
dataFormats_15
89+
dataFormats_other
90+
dataInPublication
91+
dataGatherTime
92+
experimentDuration_sub
93+
dataAnalDuration_sub
94+
longtermStorage
95+
pubAmount
96+
pubMethod_1
97+
pubMethod_2
98+
pubMethod_3
99+
pubMethod_other
100+
pubRepo_1
101+
pubRepo_2
102+
pubRepo_3
103+
pubRepo_4
104+
pubRepo_5
105+
pubMotivation_1
106+
pubMotivation_2
107+
pubMotivation_3
108+
pubMotivation_4
109+
pubMotivation_5
110+
pubMotivation_6
111+
pubMotivation_7
112+
pubMotivation_other
113+
pubObstaclesA_0
114+
pubObstaclesA_1
115+
pubObstaclesA_2
116+
pubObstaclesA_3
117+
pubObstaclesA_4
118+
pubObstaclesA_5
119+
pubObstaclesA_6
120+
pubObstaclesA_7
121+
pubObstaclesA_other
122+
pubObstaclesB_0
123+
pubObstaclesB_1
124+
pubObstaclesB_2
125+
pubObstaclesB_3
126+
pubObstaclesB_4
127+
pubObstaclesB_5
128+
pubObstaclesB_6
129+
pubObstaclesB_7
130+
pubObstaclesB_other
131+
dataStorage_0
132+
dataStorage_1
133+
dataStorage_2
134+
dataStorage_3
135+
dataStorage_other
136+
docMethod_0
137+
docMethod_1
138+
docMethod_2
139+
docMethod_3
140+
docMethod_other
141+
docMetadata_2
142+
docMetadata_3
143+
docMetadata_4
144+
docMetadata_5
145+
docMetadata_6
146+
docMetadata_7
147+
docMetadata_8
148+
docMetadata_9
149+
docMetadata_other
150+
docDigital_2
151+
docDigital_3
152+
docDigital_4
153+
docDigital_5
154+
docDigital_6
155+
docDigital_7
156+
docDigital_8
157+
docDigital_9
158+
docDigital_other
159+
docAuto_2
160+
docAuto_3
161+
docAuto_4
162+
docAuto_5
163+
docAuto_6
164+
docAuto_7
165+
docAuto_8
166+
docAuto_9
167+
docAuto_other
15168
docStructured
16-
docStandards
169+
docDefSchema
170+
pubMetadata_0
171+
pubMetadata_1
172+
pubMetadata_21
173+
pubMetadata_22
174+
pubMetadata_23
175+
pubMetadata_24
176+
pubMetadata_31
177+
pubMetadata_32
178+
pubMetadata_33
179+
pubMetadata_41
180+
pubMetadata_42
181+
pubMetadata_43
182+
pubMetadata_44
183+
pubMetadata_51
184+
pubMetadata_52
185+
pubMetadata_61
186+
pubMetadata_62
187+
pubMetadata_71
188+
pubMetadata_72
189+
pubMetadata_81
190+
pubMetadata_82
191+
pubMetadata_83
192+
pubMetadata_91
193+
pubMetadata_92
194+
pubMetadata_93
195+
pubMetadata_other
196+
docStandards_1
197+
docStandards_2
198+
docStandards_3
199+
docStandards_4
200+
docStandards_5
201+
docStandards_6
202+
docStandards_7
203+
docStandards_8
204+
docStandards_9
205+
docStandards_10
206+
docStandards_11
207+
docStandards_12
208+
docStandards_13
209+
docStandards_14
210+
docStandards_15
211+
docStandards_16
212+
docStandards_17
213+
docStandards_18
214+
docStandards_19
215+
docStandards_20
216+
docStandards_21
217+
docStandards_22
218+
docStandards_23
219+
docStandards_24
220+
docStandards_25
221+
docStandards_26
222+
docStandards_other
223+
software_1
224+
software_2
225+
software_3
226+
docMotivation_0
227+
docMotivation_1
228+
docMotivation_2
229+
docMotivation_3
230+
docMotivation_4
231+
docMotivation_5
232+
docMotivation_6
233+
docMotivation_other
234+
docObstacles_0
235+
docObstacles_1
236+
docObstacles_2
237+
docObstacles_3
238+
docObstacles_4
239+
docObstacles_5
240+
docObstacles_6
241+
docObstacles_7
242+
docObstacles_8
243+
docObstacles_9
244+
docObstacles_other
245+
servNeeds_sub_0
246+
servNeeds_sub_1
247+
servNeeds_sub_2
248+
servNeeds_sub_3
249+
servNeeds_sub_4
250+
servNeeds_sub_5
251+
servNeeds_sub_6
252+
servNeeds_sub_7
253+
servNeeds_sub_8
254+
servNeeds_sub_9
255+
servNeeds_sub_other
256+
servFormat_1
257+
servFormat_2
258+
servFormat_3
259+
servFormat_4
260+
servFormat_5
261+
servFormat_6

dashboard/data/filters.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
All
2+
Cum. Sum
23
Chemistry
34
Earth Science
45
Engineering Science

0 commit comments

Comments
 (0)