@@ -34,6 +34,8 @@ pub fn analyse(path: String) -> Nil {
34
34
|> list . map ( normalise_os ( _, "development-os" ) )
35
35
|> list . map ( normalise_os ( _, "production-os" ) )
36
36
|> list . map ( normalise_news )
37
+ |> list . map ( normalise_role )
38
+ |> list . map ( normalise_other_languages )
37
39
|> list . map (
38
40
normalise_field ( _, "gleam-experience" , fn ( x ) {
39
41
case x {
@@ -43,10 +45,11 @@ pub fn analyse(path: String) -> Nil {
43
45
} ) ,
44
46
)
45
47
46
- // "gleam-open-source", "gleam-user",
47
- // "individual-sponsor", "inserted-at", "ip", "job-role",
48
- // "organisation-name", "organisation-size", "organisation-sponsor",
49
- // "other-languages", "production-os", "professional-experience"
48
+ let assert Ok ( _ ) =
49
+ simplifile . write (
50
+ summary ,
51
+ "## Responses\n \n " <> int . to_string ( list . length ( data ) ) <> "\n \n " ,
52
+ )
50
53
51
54
add_counts ( data , "Gleam user" , "gleam-user" , yes )
52
55
add_counts ( data , "Gleam in production" , "gleam-in-production" , yes )
@@ -80,16 +83,308 @@ pub fn analyse(path: String) -> Nil {
80
83
add_counts ( data , "Project types" , "projects" , yes )
81
84
add_counts ( data , "Project types (Prod users)" , "projects" , in_prod )
82
85
86
+ add_counts ( data , "Does Gleam OSS" , "gleam-open-source" , yes )
87
+ add_counts ( data , "Does Gleam OSS (Prod user)" , "gleam-open-source" , in_prod )
88
+
89
+ add_counts ( data , "Sponsor" , "individual-sponsor" , yes )
90
+ add_counts ( data , "Sponsor (Prod user)" , "individual-sponsor" , in_prod )
91
+ add_counts ( data , "Org sponsor" , "organisation-sponsor" , yes )
92
+ add_counts ( data , "Org sponsor (Prod user)" , "organisation-sponsor" , in_prod )
93
+
94
+ add_counts ( data , "Org size" , "organisation-size" , yes )
95
+ add_counts ( data , "Org size (Prod user)" , "organisation-size" , in_prod )
96
+
97
+ add_counts ( data , "Job" , "job-role" , yes )
98
+
99
+ add_counts ( data , "Other languages" , "other-languages" , yes )
100
+ add_counts ( data , "Other languages (Prod users)" , "other-languages" , in_prod )
101
+
83
102
write_response_summaries ( data )
84
103
85
104
let assert Ok ( summary ) = simplifile . read ( summary )
86
105
io . print ( summary )
87
106
88
- get_all_for_field ( data , "organisation-name " ) |> io . debug
107
+ // get_all_for_field(data, "job-role ") |> io.debug
89
108
90
109
Nil
91
110
}
92
111
112
+ fn normalise_other_languages ( dict : Dict ( String , String ) ) -> Dict ( String , String ) {
113
+ use language <- normalise_multi_field ( dict , "other-languages" )
114
+
115
+ case language {
116
+ "HTML"
117
+ | "Html"
118
+ | "html/css"
119
+ | "HCL"
120
+ | "German"
121
+ | "Gleam"
122
+ | "French"
123
+ | "English"
124
+ | "english"
125
+ | "CSS"
126
+ | "CAP CDS"
127
+ | "Lots"
128
+ | "SCSS"
129
+ | "Russian"
130
+ | "Swedish"
131
+ | "Yaml" -> [ ]
132
+
133
+ "Abap" -> [ "ABAP" ]
134
+ "and Java" -> [ "Java" ]
135
+ "Assemblyscript" -> [ "AssemblyScript" ]
136
+ "bash" -> [ "Bash" ]
137
+ "c" -> [ "C" ]
138
+ "c#" -> [ "C#" ]
139
+ "c++" -> [ "C++" ]
140
+ "clojure" -> [ "Clojure" ]
141
+ "Common lisp" -> [ "Common Lisp" ]
142
+ "dart" -> [ "Dart" ]
143
+ "delphi" -> [ "Delphi" ]
144
+ "Eelang" -> [ "Erlang" ]
145
+ "Elixir Javascript Typescript Python Ruby" -> [
146
+ "Elixir" , "Javascript" , "Typescript" , "Python" , "Ruby" ,
147
+ ]
148
+ "elixir" -> [ "Elixir" ]
149
+ "elm" -> [ "Elm" ]
150
+ "erlang" -> [ "Erlang" ]
151
+ "f#" -> [ "F#" ]
152
+ "Go (unfortunately)" -> [ "Go" ]
153
+ "go php js" -> [ "Go" , "PHP" , "JavaScript" ]
154
+ "go" -> [ "Go" ]
155
+ "Golang" -> [ "Go" ]
156
+ "I also know the fundamentals of C and Elixir" -> [ "C" , "Elixir" ]
157
+ "java" -> [ "Java" ]
158
+ "Javascript" | "Js" | "js" | "JS" | "javascript" -> [ "JavaScript" ]
159
+ "JS and PHP" -> [ "JavaScript" , "PHP" ]
160
+ "JS/TS" | "js/ts" | "JavaScript/TypeScript" -> [ "JavaScript" , "TypeScript" ]
161
+ "kotlin" -> [ "Kotlin" ]
162
+ "Lean 4" -> [ "Lean" ]
163
+ "Nu Shell" | "nushell" -> [ "Nushell" ]
164
+ "postgres" | "Sql" -> [ "SQL" ]
165
+ "Powershell" | "Poweshell" | "PowerShell" -> [ "PowerShell" ]
166
+ "prolog" -> [ "Prolog" ]
167
+ "python" -> [ "Python" ]
168
+ "rescript" -> [ "ReScript" ]
169
+ "Ruby (on occasion)" | "a bit of ruby" | "ruby" -> [ "Ruby" ]
170
+ "rust" -> [ "Rust" ]
171
+ "Shell" -> [ "POSIX Shell" ]
172
+ "SScala" -> [ "Scala" ]
173
+ "TS" | "ts" | "TypScript" | "Typscript" | "Typescript" | "typescript" -> [
174
+ "TypeScript" ,
175
+ ]
176
+ "V (go)" -> [ "V" ]
177
+ "zig" -> [ "zig" ]
178
+
179
+ language -> [ language ]
180
+ }
181
+ }
182
+
183
+ fn normalise_role ( dict : Dict ( String , String ) ) -> Dict ( String , String ) {
184
+ use role <- normalise_field ( dict , "job-role" )
185
+ case string . trim ( role ) |> string . replace ( "," , ";" ) {
186
+ "Design Engineer" | "Maker" -> "Hardware Developer"
187
+
188
+ "Engineering Manager" -> "Software Development Manager"
189
+
190
+ "TI technician"
191
+ | "Product Owner"
192
+ | "Technical Content Developer"
193
+ | "Service Desk Analyst"
194
+ | "Consultant"
195
+ | "Controller"
196
+ | "Translator"
197
+ | "Other" -> "Other"
198
+
199
+ "Administrator System"
200
+ | "Devops Engineer"
201
+ | "DevOps"
202
+ | "DevSecOps Engineer"
203
+ | "Site reliability engenier"
204
+ | "Senior Site Reliability Engineer"
205
+ | "SRE" -> "System administrator"
206
+
207
+ "Machine Learning Engineer" | "Machine learning engineer" ->
208
+ "Machine Learning Engineer"
209
+
210
+ "Data Scientist" -> "Data Scientist"
211
+
212
+ "Principal Engineer" | "Principal Software Engineer" ->
213
+ "Principal Software Developer"
214
+
215
+ "Founding Engineer"
216
+ | "VP Data & Analytics"
217
+ | "Head of Engineering " <> _
218
+ | "Head of Engineering"
219
+ | "Director of Engineering"
220
+ | "Head of IT operations (sysadmin/developer)"
221
+ | "Head of Software Devlopement"
222
+ | "Head of Software" -> "Head of Development"
223
+
224
+ "QA" -> "QA"
225
+
226
+ "President"
227
+ | "Director"
228
+ | "COO"
229
+ | "Managing Director"
230
+ | "Founder"
231
+ | "Start-up founder"
232
+ | "CEO"
233
+ | "ceo/engineering lead" -> "Other C-level executive"
234
+
235
+ "Staff Engineer" | "Staff Software Engineer" | "Staff software engineer" ->
236
+ "Staff Software Developer"
237
+
238
+ "Designer" | "UX Designer" | "Web designer" -> "Designer"
239
+
240
+ "Principal Architect"
241
+ | "Archtect and Software engineer"
242
+ | "Software Architec"
243
+ | "Software Architect"
244
+ | "Software architect"
245
+ | "Solution Architect"
246
+ | "Soware Architect"
247
+ | "Cloud Engineer/Architect" -> "Software Architect"
248
+
249
+ "Vice President; Engineering"
250
+ | "CTO"
251
+ | "cto"
252
+ | "CTO/Chief Architect"
253
+ | "I guess officially CTO" <> _ -> "CTO"
254
+
255
+ "Researcher" | "Scientist" -> "Researcher"
256
+
257
+ "Student"
258
+ | "Intern"
259
+ | "Postdoc"
260
+ | "High School Student"
261
+ | "IT-student"
262
+ | "PhD Student (Computational neuroscience)"
263
+ | "Software Development Student"
264
+ | "Student; " <> _
265
+ | "Student (KU Leuven)"
266
+ | "University student"
267
+ | "Student"
268
+ | "student" -> "Student"
269
+
270
+ "Junior Instructor"
271
+ | "Lecturer"
272
+ | "Assistant Professor"
273
+ | "Teacher"
274
+ | "Teaching Assistant" -> "Educator"
275
+
276
+ "Lead Backend Engineer"
277
+ | "Lead Developer; independent consultant"
278
+ | "R&D Lead"
279
+ | "Lead dev"
280
+ | "Lead Developer"
281
+ | "Lead Engineer"
282
+ | "Lead Fullstack Developer"
283
+ | "Lead software engineer"
284
+ | "Senior dev + team lead"
285
+ | "Web team lead"
286
+ | "Tech Lead"
287
+ | "Tech lead"
288
+ | "tech lead" -> "Tech Lead"
289
+
290
+ "code monkey"
291
+ | "Infrastructure engineer"
292
+ | "iOS developer"
293
+ | "R&D Engineer"
294
+ | "Security engineer"
295
+ | "Sr Software Engineer"
296
+ | "Sr. Software Engineer (Backend)"
297
+ | "tools developer"
298
+ | "SEO Programmer"
299
+ | "Senior Data Engeneer"
300
+ | "Data engineer"
301
+ | "Intermediate Software Developer"
302
+ | "Junior Software Engineer"
303
+ | "Open Source Engineer"
304
+ | "Platform Engineer"
305
+ | "Senior Developer"
306
+ | "Senior Engineer"
307
+ | "Senior Software Engineer"
308
+ | "senior software engineer"
309
+ | "Senior Staff Software Engineer"
310
+ | "Senior SWE"
311
+ | "Computer Programmer"
312
+ | "Consulting Engineer"
313
+ | "Contractor"
314
+ | "Contractor/Senior Developer"
315
+ | "freelance"
316
+ | "Software Engineer " <> _
317
+ | "Software Engineer"
318
+ | "Freelancer"
319
+ | "System Engineer"
320
+ | "Systems Software Engineer"
321
+ | "Developer / Community specialist"
322
+ | "Devoloper and System Administrator"
323
+ | "Developer FullStack"
324
+ | "Developer Relations"
325
+ | "Developer"
326
+ | "developer"
327
+ | "Development"
328
+ | "Developper; not lead but kinda lead in my projects."
329
+ | "Front-end developer"
330
+ | "Frontend Engineer"
331
+ | "Frontend Developer"
332
+ | "Frontend engineer"
333
+ | "Frontend Engineer"
334
+ | "full stack dev"
335
+ | "Full stack developer"
336
+ | "Full Stack Software Developer"
337
+ | "Full Stack Web Developer"
338
+ | "Full-Stack developer"
339
+ | "Full-stack Software Developer"
340
+ | "Full-stack"
341
+ | "Fullstack developer"
342
+ | "Fullstack Developer"
343
+ | "fullstack developer"
344
+ | "Fullstack Engineer"
345
+ | "fullstack engineer"
346
+ | "Fullstack Software Developer"
347
+ | "Fullstack web dev"
348
+ | "Fullstack Web developer"
349
+ | "Fullstack"
350
+ | "Web Developer"
351
+ | "Web Devevloper"
352
+ | "web dev"
353
+ | "Software Developer"
354
+ | "Software developer"
355
+ | "Software Engineer"
356
+ | "Software engineer"
357
+ | "software engineer"
358
+ | "Software Engineer; UX/UI Designer"
359
+ | "Software Engineering Consultant"
360
+ | "Web Backend Developer"
361
+ | "Back-end Developer"
362
+ | "Backend Dev"
363
+ | "Backend developer"
364
+ | "Backend Developer"
365
+ | "backend developer"
366
+ | "Backend Engineer"
367
+ | "Backend engineer"
368
+ | "SWE" -> "Software Developer"
369
+
370
+ "Programming for fun for moment"
371
+ | "Unemployed" <> _
372
+ | "unemployed" <> _
373
+ | "jobless"
374
+ | "retired software architect"
375
+ | "Retired"
376
+ | // Self employed what?
377
+ "Self Employed"
378
+ | "N.A."
379
+ | "N/A"
380
+ | "None;" <> _
381
+ | "retired"
382
+ | "none" -> ""
383
+
384
+ role -> role
385
+ }
386
+ }
387
+
93
388
fn yes ( _ : c) -> Bool {
94
389
True
95
390
}
@@ -147,15 +442,16 @@ fn markdown_list(data: List(String)) -> String {
147
442
}
148
443
149
444
fn normalise_field (
150
- response : Dict ( a , b ) ,
151
- field_name : a ,
152
- normaliser : fn ( b ) -> b ,
153
- ) -> Dict ( a , b ) {
445
+ response : Dict ( String , String ) ,
446
+ field_name : String ,
447
+ normaliser : fn ( String ) -> String ,
448
+ ) -> Dict ( String , String ) {
154
449
case dict . get ( response , field_name ) {
155
450
Ok ( answer ) -> {
156
- answer
157
- |> normaliser
158
- |> dict . insert ( response , field_name , _)
451
+ case normaliser ( answer ) {
452
+ "" -> dict . delete ( response , field_name )
453
+ answer -> dict . insert ( response , field_name , answer )
454
+ }
159
455
}
160
456
Error ( _ ) -> response
161
457
}
0 commit comments