{"id":20665615,"url":"https://github.com/thinkr-open/prenoms","last_synced_at":"2025-04-19T16:40:42.620Z","repository":{"id":18656181,"uuid":"84856429","full_name":"ThinkR-open/prenoms","owner":"ThinkR-open","description":"French Baby Names 1900-2020","archived":false,"fork":false,"pushed_at":"2023-09-12T08:52:30.000Z","size":202422,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T10:21:53.008Z","etag":null,"topics":["dataset","r"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThinkR-open.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-03-13T17:39:25.000Z","updated_at":"2022-09-02T09:52:32.000Z","dependencies_parsed_at":"2024-11-12T16:47:31.256Z","dependency_job_id":null,"html_url":"https://github.com/ThinkR-open/prenoms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fprenoms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fprenoms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fprenoms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fprenoms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThinkR-open","download_url":"https://codeload.github.com/ThinkR-open/prenoms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249740040,"owners_count":21318674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dataset","r"],"created_at":"2024-11-16T19:32:45.866Z","updated_at":"2025-04-19T16:40:42.591Z","avatar_url":"https://github.com/ThinkR-open.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  fig.align = \"center\",\n  out.width = \"100%\"\n)\n```\n\u003c!-- badges: start --\u003e\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)\n[![R-CMD-check](https://github.com/ThinkR-open/prenoms/workflows/R-CMD-check/badge.svg)](https://github.com/ThinkR-open/prenoms/actions)\n\u003c!-- badges: end --\u003e\n\n# {prenoms} \u003cimg src=\"https://raw.githubusercontent.com/ThinkR-open/thinkr-hex-stickers/master/hexes/thinkr-hex-prenoms.png\" align=\"right\" width=\"120\"/\u003e\n\n# About\n\n`{prenoms}` (namely \"firstnames\") allows you to explore the data on first names given to children born in metropolitan France between 1900 and 2021.\n\nThese data are available at the French level and by department.\n\n\u003e Source: These statistics come from the French civil status. They have been collected by the National\nInstitute of Statistics and Economic Studies (Insee), that collects, analyses and disseminates\ninformation on the French economy and society. These statistics are available\n[here](https://www.insee.fr/fr/statistiques/2540004#documentation).\n\n# Installation\n\n```{r, eval= FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github( \"ThinkR-open/prenoms\" )\nlibrary(\"prenoms\")\n```\n\n# Use package {prenoms}\n\nLoad package and its data:\n```{r warning=FALSE, message=FALSE}\nlibrary(prenoms)\ndata(\"prenoms_france\")\ndata(\"prenoms\")\ndata(\"departements\")\n```\n\nExample of study with names from current [ThinkR](https://thinkr.fr) staff through time:\n\n* [Colin](https://github.com/colinfay)\n* [Diane](https://github.com/DianeBeldame)\n* [Sébastien](https://github.com/statnmap)\n* [Cervan](https://github.com/Cervangirard)\n* [Vincent](https://github.com/VincentGuyader)\n* [Margot](https://github.com/MargotBr)\n* Estelle\n* [Arthur](https://github.com/ArthurData)\n* [Antoine](https://github.com/ALanguillaume)\n* [Florence](https://github.com/FlorenceMounier)\n* [Murielle](https://github.com/MurielleDelmotte)\n* [Swann](https://github.com/dagousket)\n* [Yohann](https://github.com/ymansiaux)\n\n```{r warning=FALSE, message=FALSE}\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(tidyr)\nlibrary(purrr)\n```\n\nLet's define a dataset holding our names and genders:\n\n```{r}\nteam_members \u003c- tribble(\n  ~name,      ~sex, \n  \"Colin\",     \"M\", \n  \"Diane\",     \"F\", \n  \"Sébastien\", \"M\", \n  \"Cervan\",    \"M\", \n  \"Vincent\",   \"M\", \n  \"Margot\",    \"F\",\n  \"Estelle\",  \"F\",\n  \"Arthur\",    \"M\", \n  \"Antoine\",   \"M\", \n  \"Florence\",  \"F\",\n  \"Murielle\",  \"F\",\n  \"Swann\",     \"F\",\n  \"Yohann\",    \"M\"\n)\n```\n\nAnd then craft a function that will retrieve only the names corresponding to our own names.\n\n```{r}\nget_thinkr_team_name_data \u003c- function(\n  prenoms_df, \n  team_members_df\n) {\n  prenoms_df %\u003e% \n    # Get data corresponding only to team member names\n    inner_join(\n      team_members, \n      by = c(\"name\", \"sex\")\n    ) %\u003e%\n    # Add missing combination for name x year \n    complete(\n      name = team_members$name,\n      year = 1900:2021,\n      fill = list( n = 0, prop = 0 )\n    ) %\u003e% \n    group_by(name, year, sex) %\u003e%\n    summarise(\n      n = sum(n),\n      .groups = \"drop\"\n    ) %\u003e%\n    arrange(year) %\u003e% \n    # If sex is not define (NA) we assumed it was\n    # the same as the corresponding team member's\n    mutate(\n      sex = map2_chr(\n        sex,\n        name,\n        function(\n          sex,\n          name\n        ) {\n          ifelse(\n            is.na(sex) \u0026 name %in% team_members$name,\n            team_members$sex[team_members$name == name],\n            sex\n          )\n        }\n      )\n    )\n}\n```\n\n### At France country scale\n\n```{r}\n# Data for the whole France\ndata(prenoms_france)\n\nthinkrs \u003c- get_thinkr_team_name_data(\n  prenoms_df = prenoms_france,\n  team_members_df = team_members\n)\n```\n\n```{r, graph-france, fig.dim=c(7,5)}\nthinkrs %\u003e%\n  ggplot() +\n  aes(x = year, y = n, color = name) +\n  geom_line() +\n  scale_x_continuous( breaks = seq(1900, 2021, by = 10) ) +\n  labs(title = \"ThinkR's team names evolution in France\") +\n  theme_bw()\n```\n\n### In the \"départment\" of ThinkR's headquarters: 93 (Seine-Saint-Denis)\n\n```{r}\n# Data by \"départment\"\ndata(prenoms)\n\nthinkrs_93 \u003c- prenoms %\u003e%   \n  filter(dpt == 93) %\u003e%\n  get_thinkr_team_name_data(\n    team_members\n  )\n```\n\n```{r, graph-departement, fig.dim=c(7,5)}\nthinkrs_93 %\u003e%\n  ggplot() +\n  aes(x = year, y = n, color = name) +\n  geom_line() +\n  scale_x_continuous( breaks = seq(1900, 2021, by = 10) ) +\n  labs(title = \"ThinkR's team names evolution in the 93 department\") +\n  theme_bw()\n```\n\n## Code of Conduct\n\nPlease note that this project is released with a [Contributor Code of Conduct](https://www.contributor-covenant.org/version/1/0/0/code-of-conduct.html). By participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkr-open%2Fprenoms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkr-open%2Fprenoms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkr-open%2Fprenoms/lists"}