{"id":20397297,"url":"https://github.com/tlaplus/survey","last_synced_at":"2026-03-19T15:38:50.478Z","repository":{"id":152785811,"uuid":"492664643","full_name":"tlaplus/Survey","owner":"tlaplus","description":"Results TLA+ Surveys","archived":false,"fork":false,"pushed_at":"2022-05-19T17:35:00.000Z","size":790,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-05T13:58:08.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tlaplus.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-16T02:55:03.000Z","updated_at":"2022-05-19T03:39:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f833d57-6aec-4e81-9e45-eeb2a5306712","html_url":"https://github.com/tlaplus/Survey","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tlaplus/Survey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlaplus%2FSurvey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlaplus%2FSurvey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlaplus%2FSurvey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlaplus%2FSurvey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlaplus","download_url":"https://codeload.github.com/tlaplus/Survey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlaplus%2FSurvey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30184885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T04:13:06.543Z","updated_at":"2026-03-06T16:03:28.118Z","avatar_url":"https://github.com/tlaplus.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"TLA+ Surveys\"\ndate: \"(`r Sys.Date()`)\"\noutput: \n  github_document:\n    toc: true\n    toc_depth: 2\n    html_preview: false\n---\n\n[2022 survey](https://docs.google.com/forms/d/1GQnqZgfJKTZgZd-TydtdqT8axvRrTdWH7M87VUt0_Wk/edit?usp=sharing)\n\n\n```{r, echo=FALSE, warning=FALSE, message=FALSE}\n## Import from csv file exported from Google Forms.\ndata \u003c- read.csv(header=TRUE, sep = \",\", file = \"2022.csv\")\n\n## Rename column names 10 and 19 to 26 (https://www.tutorialkart.com/r-tutorial/r-dataframe-change-column-name/).\ncolnames(data)[2:4] \u003c- c(\"Frequency\", \"Expertise\", \"Learned\")\ncolnames(data)[8] \u003c- c(\"Welcome\")\ncolnames(data)[10:11] \u003c- c(\"Country\", \"Underrepresented\")\nIA \u003c- c(\"Spec2Code\", \"Doc\", \"Library\", \"Performance\", \"Lang\", \"CI/CD\", \"Extensibility\", \"IDE\")\ncolnames(data)[19:26] \u003c- IA\n\n#data \u003c- data %\u003e% filter(Welcome == \"No\") \n#data \u003c- data %\u003e% filter(Underrepresented == \"Yes\") \n\n########### Geography\n\n## Convert empty/NA into \"Unknown\" to prevent countrycode from converting it into Namibia.\ndata[c(10)] \u003c- lapply(data[c(10)], gsub, pattern = \"^$\", replacement = \"Unknown\", ignore.case = TRUE)\n\n## Map human-provided countries to iso country names.\nlibrary(countrycode)\ndata$iso2c \u003c- countrycode(data$Country, origin = \"country.name\", destination = \"iso2c\")\ndata$countryname \u003c- countrycode(data$Country, origin = \"country.name\", destination = \"country.name\")\n\nlibrary(dplyr)\nlibrary(ggplot2)\nggplot(data %\u003e% count(countryname), aes(x = reorder(countryname, -n), y = n, fill = countryname)) + \n  geom_bar(stat = \"identity\") +\n  xlab(\"Country\") + theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1)) +\n  theme(legend.position = \"none\")\n\n## Map human-provided countries to iso country names.\nlibrary(countrycode)\ndata$iso2c \u003c- countrycode(data$Country, origin = \"country.name\", destination = \"iso2c\")\n\n## (https://stackoverflow.com/a/64769847/6291195)\nlibrary(maps)\nworld_map \u003c- map_data(\"world\")\nworld_map \u003c- subset(world_map, region != \"Antarctica\")\n## The following line does the trick that iso2c from above works with the map.\nworld_map$region \u003c- iso.alpha(world_map$region)\n\nC \u003c- data %\u003e% filter(!is.na(iso2c)) %\u003e% count(iso2c)\nggplot(data %\u003e% filter(!is.na(iso2c)) %\u003e% count(iso2c)) +\n  geom_map(\n    dat = world_map, map = world_map, aes(map_id = region),\n    fill = \"white\", color = \"#7f7f7f\", size = 0.25 ) +\n  geom_map(map = world_map, aes(map_id = iso2c, fill = n), size = 0.25) +\n  scale_fill_gradient(low = \"#fff7bc\", high = \"#cc4c02\", name = \"Respondants\") +\n  expand_limits(x = world_map$long, y = world_map$lat)\n\n########### Improvement Areas\n\n## Remove bogus strings from column 19 to 26 (https://stackoverflow.com/a/56963488/6291195).\nnm1 \u003c- c(19:26) \ndata[nm1] \u003c- lapply(data[nm1], gsub, pattern = \" - Most Important\", replacement = \"\")\ndata[nm1] \u003c- lapply(data[nm1], gsub, pattern = \" - Least Important\", replacement = \"\")\ndata[nm1] \u003c- lapply(data[nm1], gsub, pattern = \"N/A / I do not use this\", replacement = \"\")\n\n## Convert column 19 to 26 to numeric (https://stackoverflow.com/a/2290107/6291195).\ndata[, nm1] \u003c- sapply(data[, nm1], as.numeric)\n\n## Replace all NA with value 6 (to end with 0 after next lapply).\ndata[nm1] \u003c- lapply(data[nm1], function(x) replace(x, is.na(x), 6))\ndata[nm1] \u003c- lapply(data[nm1], function(x) 6 - x)\n\nlibrary(tidyr)\nlibrary(ggplot2)\n\n{ggplot(pivot_longer(data %\u003e% summarise_at(19:26, sum, na.rm = TRUE), cols=1:8, names_to = \"Area\", values_to = \"Points\")\n       , aes(x = reorder(Area, -Points), y = Points, fill = Area)) + \n  geom_bar(stat = \"identity\") +\n  ggtitle(\"All Demographics\") +\n  xlab(\"Improvement Area\") + theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1)) +\n  theme(legend.position = \"none\")}\n\n{ggplot(pivot_longer(data %\u003e% filter(Frequency == \"Rarely\") %\u003e% summarise_at(19:26, sum, na.rm = TRUE), cols=1:8, names_to = \"Area\", values_to = \"Points\")\n       , aes(x = reorder(Area, -Points), y = Points, fill = Area)) + \n  geom_bar(stat = \"identity\") +\n  ggtitle(\"Rarely Demographics\") +\n  xlab(\"Improvement Area\") + theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1)) +\n  theme(legend.position = \"none\")}\n\nggplot(pivot_longer(data %\u003e% filter(Frequency == \"Monthly\") %\u003e% summarise_at(19:26, sum, na.rm = TRUE), cols=1:8, names_to = \"Area\", values_to = \"Points\")\n       , aes(x = reorder(Area, -Points), y = Points, fill = Area)) + \n  geom_bar(stat = \"identity\") +\n  ggtitle(\"Monthly Demographics\") +\n  xlab(\"Improvement Area\") + theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1)) +\n  theme(legend.position = \"none\")\n\nggplot(pivot_longer(data %\u003e% filter(Frequency == \"Weekly\") %\u003e% summarise_at(19:26, sum, na.rm = TRUE), cols=1:8, names_to = \"Area\", values_to = \"Points\")\n       , aes(x = reorder(Area, -Points), y = Points, fill = Area)) + \n  geom_bar(stat = \"identity\") +\n  ggtitle(\"Weekly Demographics\") +\n  xlab(\"Improvement Area\") + theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1)) +\n  theme(legend.position = \"none\")\n\nggplot(pivot_longer(data %\u003e% filter(Frequency == \"Daily\") %\u003e% summarise_at(19:26, sum, na.rm = TRUE), cols=1:8, names_to = \"Area\", values_to = \"Points\")\n       , aes(x = reorder(Area, -Points), y = Points, fill = Area)) + \n  geom_bar(stat = \"identity\") +\n  ggtitle(\"Daily Demographics\") +\n  xlab(\"Improvement Area\") + theme(axis.text.x = element_text(angle = 45, vjust = 0.5, hjust=1)) +\n  theme(legend.position = \"none\")\n\n########### Experience\n\n## Convert semantically ordered categorial/characters into numericals for correlation analysis.\ndata$FrequencyNum \u003c- as.numeric(factor(data$Frequency, levels = c(\"Rarely\", \"Monthly\", \"Weekly\", \"Daily\")))\ndata$ExpertiseNum \u003c- as.numeric(factor(data$Expertise, levels = c(\"I can neither read nor write TLA+\", \"I can write useful specifications for work, but it's a struggle\", \"I can write simple specifications\", \"I am productive writing TLA+\", \"I am an expert\")))\ndata$LearnedNum \u003c- as.numeric(factor(data$Learned, levels = c(\"Recently\", \"Within last 12 months\", \"Within last 5 years\", \"Longer than 5 years ago\")))\n\nnm2 \u003c- c(\"FrequencyNum\",\"ExpertiseNum\", \"LearnedNum\")\ndata[nm2] \u003c- lapply(data[nm1], function(x) replace(x, is.na(x), 0))\n\nlibrary(ggcorrplot)\nmy_data \u003c- data[, nm2]\np.mat \u003c- cor_pmat(my_data)\ncorr \u003c- round(cor(my_data), 3)\nggcorrplot(corr, p.mat = cor_pmat(my_data),\n           hc.order = TRUE, type = \"lower\",\n           color = c(\"#FC4E07\", \"white\", \"#00AFBB\"),\n           outline.col = \"white\", lab = TRUE)\n```\n\n#### README.md is generated from README.Rmd on a host with all libraries installed via:\n```shell\nRscript -e \"rmarkdown::render('README.Rmd')\"\n```\n### Install required libraries and R packages (on macOS) with:\n```shell\nbrew install pandoc r\nRscript -e \"install.packages(c('rmarkdown', 'ggplot2','dplyr', 'here'), repos='http://cran.us.r-project.org')\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlaplus%2Fsurvey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlaplus%2Fsurvey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlaplus%2Fsurvey/lists"}