Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
338 commits
Select commit Hold shift + click to select a range
33232f7
observable:typos
nicotlm Oct 13, 2025
8a54d34
dev.yaml : try with other github action
nicotlm Oct 21, 2025
1ccfcaf
dev.yaml : test
nicotlm Oct 22, 2025
fb0521c
dev.yaml : update comment
nicotlm Oct 22, 2025
6b13560
dev.yaml : update delete
nicotlm Oct 22, 2025
0b0a242
Merge branch 'fusion_site_ssplab' of https://github.com/InseeFrLab/ss…
nicotlm Oct 22, 2025
ff61341
Add english version to the site (#115)
nicotlm Oct 23, 2025
a2a81e9
update post merge
nicotlm Oct 23, 2025
68deafd
manifeste moved to root
nicotlm Oct 23, 2025
48064cf
update readme
nicotlm Oct 23, 2025
44e5576
add a wiki
nicotlm Oct 23, 2025
64cb603
Add event cloture 10% #117
nicotlm Oct 23, 2025
4229c9c
remove DSDS #110
nicotlm Oct 23, 2025
36f34b4
with test table as html - no babeldown translation
nicotlm Oct 23, 2025
31f7850
project:GDP tracker and translation #116
nicotlm Oct 23, 2025
d03f6dd
project:GDP tracker and translation images #116
nicotlm Oct 23, 2025
309a74c
project: no author #116 #110
nicotlm Oct 23, 2025
61952a7
typos
nicotlm Oct 23, 2025
caafbe5
script function to generate template - no work
nicotlm Oct 23, 2025
fb49124
with Python functions to create project based on project_template
nicotlm Oct 23, 2025
4887397
with uv env
nicotlm Oct 23, 2025
34a07fd
transfer wiki
nicotlm Oct 24, 2025
99d260f
categories streamlining
nicotlm Oct 24, 2025
9257614
JOCAS (FR) : #116
nicotlm Oct 24, 2025
4df7460
update template.py
nicotlm Oct 24, 2025
efa27c9
with updated link to github and deletion of multiple footnotes
nicotlm Nov 7, 2025
3a5d85b
deletion of polars-tuto
nicotlm Nov 7, 2025
87cad9e
typos variable about.en
nicotlm Nov 7, 2025
95c5f65
variable link to repo
nicotlm Nov 7, 2025
4dfbbdc
projects description
nicotlm Nov 7, 2025
6ae89a2
add formation R MTES - issue #118
nicotlm Nov 7, 2025
7187800
update link training sspcloud - issue #118
nicotlm Nov 7, 2025
6c6929e
add formation Observable - issue #118
nicotlm Nov 7, 2025
70a16e2
update english version #116 #114
nicotlm Nov 7, 2025
0bf2a8e
with github icon
nicotlm Nov 7, 2025
fc7b767
update to match call from shell
nicotlm Nov 7, 2025
53ba0f0
update translate to translate index.qmd
nicotlm Nov 7, 2025
32c012f
update readme for translate and project creation
nicotlm Nov 7, 2025
bf14ae7
with doremifasol #116 and english version #114
nicotlm Nov 7, 2025
34c632e
add DREES datavisualisation on COVID19 tests - issue #114 and #116
nicotlm Nov 7, 2025
523fa59
add JOCAS english version - issue #114
nicotlm Nov 7, 2025
d80330d
format template.py
nicotlm Nov 7, 2025
0a72c20
add pynsee, EN and FR versions - issue #114 #116
nicotlm Nov 7, 2025
a246d3a
update project template
nicotlm Nov 7, 2025
38eabdd
add open science monitor, EN and FR versions - issue #114 #116
nicotlm Nov 7, 2025
26658b9
update template with github repo
nicotlm Nov 7, 2025
8e8f8cf
small updates
nicotlm Nov 7, 2025
9b2c6d1
with github fa
nicotlm Nov 12, 2025
cee1102
fix bug in pynsee index.qmd with github fa
nicotlm Nov 12, 2025
178fc0c
update link to repo code + harmonization between pages
nicotlm Nov 12, 2025
b7d6a44
with Curiexplore, FR and EN, #116 #114
nicotlm Nov 12, 2025
4517617
with .venv
nicotlm Nov 12, 2025
8806161
translate function: search in project dir
nicotlm Nov 12, 2025
4949d2a
update Curiexplore #114 #116
nicotlm Nov 12, 2025
0c7af33
add lockdown population movement, FR and EN versions #114 #116
nicotlm Nov 12, 2025
6545144
update readme
nicotlm Nov 12, 2025
5f3e4c1
update site-url for preview
nicotlm Nov 12, 2025
f03ac86
update github link curiexplore
nicotlm Nov 12, 2025
6d64964
harmonization categories with gdp_media
nicotlm Nov 12, 2025
70237eb
add project "prevoir croissance en lisant le journal", FR #104 and EN…
nicotlm Nov 12, 2025
794df3a
with english image
nicotlm Nov 12, 2025
9ee6b50
add project amelioration RP, FR #104 and EN #116
nicotlm Nov 12, 2025
5ade4c3
add project cybercrime, FR #104 and EN #116
nicotlm Nov 12, 2025
cf77f59
fix cybercrime
nicotlm Nov 12, 2025
d41f19a
add blog JMS2022 #104 and link to JMS in extraction_CS
nicotlm Nov 13, 2025
0d7483f
blog : add caveat for blog
nicotlm Nov 13, 2025
5ed9aa3
blog : mapreduce vs hadoop #104
nicotlm Nov 13, 2025
c4a3b48
rebase on main : network day
nicotlm Nov 13, 2025
d6dc50b
project: add enquete asso, FR #104 and EN #116
nicotlm Nov 14, 2025
053ef39
clean dev.yaml
nicotlm Nov 14, 2025
64f3a0f
project: add outlier dsn, FR #104 and EN #116
nicotlm Nov 14, 2025
cbc71be
with default logo for listings
nicotlm Nov 14, 2025
6bf9bea
update index not to have too many cards
nicotlm Nov 14, 2025
aa96849
fix bug with logo
nicotlm Nov 14, 2025
b427f1a
creation of similar projects by default
nicotlm Nov 14, 2025
c670060
add old project: segregation
nicotlm Nov 14, 2025
f993425
glossary for translation - first attempt
nicotlm Nov 14, 2025
7dff7c3
typo webscraping
nicotlm Nov 14, 2025
c13f250
update scripts
nicotlm Nov 14, 2025
f782449
update readme
nicotlm Nov 14, 2025
906cbd5
add project "webscraping IPC", FR #104 and EN #116
nicotlm Nov 14, 2025
d69fb37
add similar project : ipc and webscrapping
nicotlm Nov 14, 2025
85b85db
add similar project : new data
nicotlm Nov 14, 2025
3529911
add similar project: automatic coding - to update
nicotlm Nov 14, 2025
e2ac386
add similar project: webscraping - to update
nicotlm Nov 14, 2025
a8a14f6
add similar project : package - to update
nicotlm Nov 14, 2025
c38cdc3
Update build-render job conditions in dev.yaml
nicotlm Nov 14, 2025
e273869
Add push trigger for all branches in dev workflow
nicotlm Nov 14, 2025
e66d35e
Update glossary with new French-English terms
nicotlm Nov 14, 2025
a3e80ea
test preview
nicotlm Nov 17, 2025
91836a5
return to dev.yml at 053ef391bab84b45326c3a0e32650b654ea73dd1
nicotlm Nov 17, 2025
dbfd9ef
test preview
nicotlm Nov 17, 2025
deef54b
test preview -2
nicotlm Nov 17, 2025
24c4de3
rebase on main
nicotlm Nov 17, 2025
5c752b6
update concurrency
nicotlm Nov 17, 2025
46d7d40
update dev.yml with no push
nicotlm Nov 17, 2025
8b8cba0
name to dev.yml
nicotlm Nov 17, 2025
15ac45a
with pr_number in dev.yml
nicotlm Nov 17, 2025
930815f
add similar project : package - final
nicotlm Nov 17, 2025
3d4c022
add similar project: automatic coding - final
nicotlm Nov 17, 2025
3828e9d
add similar project: webscraping - final
nicotlm Nov 17, 2025
b1c5781
typo
nicotlm Nov 17, 2025
cdf1edb
with short presentation of what a project is
nicotlm Nov 17, 2025
720dc36
modif suite point mensuel
nicotlm Nov 18, 2025
3a543e7
add a new row for documentation and harmonization of references to JMS
nicotlm Nov 18, 2025
e8ec4e6
add project on food products classification , FR #104 and EN #116
nicotlm Nov 18, 2025
a346855
add project RSVERO, FR #104 and EN #116
nicotlm Nov 18, 2025
3d31253
harmonization translation - MSO/SSM
nicotlm Nov 18, 2025
f43e42d
update template with categories for listing
nicotlm Nov 18, 2025
2f2708b
rebase on main
nicotlm Nov 18, 2025
45c4dd5
Merge branch 'main' into fusion_site_ssplab
nicotlm Nov 18, 2025
e04eba9
merge main into fusion_ssplab
nicotlm Nov 18, 2025
5b33516
translate : add removal of usual issues with Qmd table
nicotlm Nov 18, 2025
e32d9d7
add project: 2021 webscraping ipc
nicotlm Nov 18, 2025
6c6ce55
fix typo link to previous event
nicotlm Nov 18, 2025
82e5f40
typo link to manifesto
nicotlm Nov 19, 2025
0c11f85
with function to extract project details
nicotlm Nov 19, 2025
32a86f2
add project on new sources of data - CB data
nicotlm Nov 19, 2025
e615550
move resil/matching project
nicotlm Nov 19, 2025
d33cf9c
harmonization tags for private data sources
nicotlm Nov 19, 2025
095fa5f
add mobile phone data use
nicotlm Nov 19, 2025
97a112f
update readme with categories harmonization
nicotlm Nov 19, 2025
95cc5df
update tabac.png
nicotlm Nov 19, 2025
2bf35fe
typo blog
nicotlm Nov 19, 2025
e6d7dd0
fix image link and delete default image
nicotlm Nov 19, 2025
3908460
update default image for english version
nicotlm Nov 19, 2025
c08b512
fix typo
nicotlm Nov 19, 2025
bf23e62
delete unnecessary arg pr_number
nicotlm Nov 19, 2025
53fe892
update homepage style (EN)
nicotlm Nov 19, 2025
85649d2
move projects (english version) to homepage - try
nicotlm Nov 19, 2025
7bea5e4
cpi and updates links webscraping ipc
nicotlm Nov 21, 2025
10f72da
.nojekyll useless
nicotlm Dec 5, 2025
63c286a
Merge branch 'main' into fusion_site_ssplab
nicotlm Dec 9, 2025
3311969
update announcement
nicotlm Dec 9, 2025
2070f7f
without init.sh
nicotlm Dec 9, 2025
8f34f0c
add title list projects
nicotlm Dec 16, 2025
170056f
Merge remote-tracking branch 'origin/main' into fusion_site_ssplab
nicotlm Dec 16, 2025
b63c123
dev.yml back to previous merge
nicotlm Dec 16, 2025
dfe009d
fix typo intro
nicotlm Dec 16, 2025
0a06ee9
harmonization listings
nicotlm Dec 16, 2025
a8dec0f
add project electricity and forecast, FR #104 and EN # 116 and harmo…
nicotlm Dec 16, 2025
22fba1e
add project bank account, FR #104 and EN # 116
nicotlm Dec 16, 2025
d6dea3e
small fixes
nicotlm Dec 16, 2025
40f4d32
fix typo segregation
nicotlm Dec 16, 2025
f62f759
fix bug segregation
nicotlm Dec 17, 2025
0cdf425
harmonization date desc
nicotlm Dec 17, 2025
1c5b949
harmonization of metadata
nicotlm Dec 17, 2025
399fd08
remove category fasttext
nicotlm Dec 18, 2025
aa45701
update contributing with latest version of website
nicotlm Dec 18, 2025
cfc0576
Rename CONTRIBUTING.md to CONTRIBUTING.Qmd
nicotlm Dec 18, 2025
db818af
test contributing
nicotlm Dec 18, 2025
d9eaa9c
test 2
nicotlm Dec 18, 2025
d0b6878
test code annotation md
nicotlm Dec 18, 2025
ae1272d
test 3 code annotation
nicotlm Dec 18, 2025
b041199
update contributing
nicotlm Dec 18, 2025
1daca4c
update translate of contributing
nicotlm Dec 19, 2025
584c082
fix typos
nicotlm Dec 19, 2025
c542a7f
fix typos
nicotlm Dec 19, 2025
d1c488b
update file names
nicotlm Dec 22, 2025
b88e1e3
update file name in script
nicotlm Dec 22, 2025
d4ebb03
script to fetch last commit
nicotlm Dec 22, 2025
0ce7100
with function to clone the repo and dic of repos to clone
nicotlm Dec 22, 2025
02136a8
with function to replace in qmd files
nicotlm Dec 22, 2025
150c9f0
multiple replacements
nicotlm Dec 22, 2025
44fa111
with function to update commit_sha
nicotlm Dec 22, 2025
21306ff
with main function to check if recent commit, clone repo, update loca…
nicotlm Dec 22, 2025
33885bf
Updating project/2022_satellites/cards based on last commit 862f2dc2f…
nicotlm Dec 22, 2025
3654347
final touch with special caracters
nicotlm Dec 22, 2025
6cd2854
Remerge 'main' into fusion_site_ssplab to allow pre_view
nicotlm Dec 22, 2025
422ccc8
remove field video
nicotlm Dec 22, 2025
e23e178
fix typo dev
nicotlm Dec 22, 2025
6a5b6cc
with gha to create a PR
nicotlm Dec 22, 2025
3e19aa5
creates a branch and push to that branch
nicotlm Dec 22, 2025
c923395
renaming GHA
nicotlm Dec 22, 2025
0d48d60
with update trigger event
nicotlm Dec 22, 2025
5572d71
fix trigger event
nicotlm Dec 22, 2025
09c83ce
Update project/2022_satellites/cards based on commit made to https:/…
actions-user Dec 22, 2025
c2637ab
Update project/2022_codif_ape/cards based on commit 0d474addc0735a610…
actions-user Dec 22, 2025
4503634
update rbanch creation
nicotlm Dec 22, 2025
0312e95
Merge branch 'fusion_site_ssplab' of https://github.com/InseeFrLab/ss…
nicotlm Dec 22, 2025
3ab9584
update script with dedicated branch
nicotlm Dec 22, 2025
9c8d8fa
test
nicotlm Dec 23, 2025
73722a0
update script to loop over file
nicotlm Dec 23, 2025
a717663
update script to comment multiple website insertions
nicotlm Dec 23, 2025
018e9b1
update script to checkout and replacements to be made
nicotlm Dec 23, 2025
644a5f8
update script
nicotlm Dec 23, 2025
8fbb499
fix typo
nicotlm Dec 23, 2025
7a60854
remote branch deletion
nicotlm Dec 23, 2025
f03d758
update branch deletion order
nicotlm Dec 23, 2025
dad4d9c
improve feedback from script
nicotlm Dec 23, 2025
2cee3c3
Merge branch 'main' into fusion_site_ssplab
nicotlm Jan 15, 2026
d1a420c
post merge - update latest content homepage
nicotlm Jan 15, 2026
b034bdb
post merge - mv cartographia
nicotlm Jan 15, 2026
5438648
post merge - fix
nicotlm Jan 15, 2026
a0d77d6
blog : add description
nicotlm Jan 15, 2026
ba1932b
add scanR project
nicotlm Feb 5, 2026
d20bb3e
add details about dsn results and outcome
nicotlm Feb 5, 2026
d945a4a
disable automatic auto_fetch
nicotlm Feb 5, 2026
69701ba
Update based on main : update cartographia and add infolettre_22 afte…
nicotlm Feb 5, 2026
41e4bec
update scanR based on methodo
nicotlm Feb 5, 2026
00e52cf
update scanR
nicotlm Feb 5, 2026
955224a
move notebook polars to ssphub org #119
nicotlm Feb 6, 2026
ffd9f81
Add reviews (#132)
nicotlm Mar 16, 2026
0e9c29e
sndsTools: add new project and translation (#133)
strayMat Mar 17, 2026
32a3e2f
delete project 2022_alimentation after review from LG
nicotlm Mar 17, 2026
4df8fe0
Merge branch 'main' of https://github.com/InseeFrLab/ssphub into fusi…
nicotlm Mar 17, 2026
275fdb1
project : no date and add a filter
nicotlm Mar 18, 2026
d1238c9
update names
nicotlm Mar 18, 2026
ec52c15
with render & preview
nicotlm Mar 18, 2026
65efef0
update readme
nicotlm Mar 18, 2026
7174778
fix path to R scripts
nicotlm Mar 18, 2026
4e831ba
clean up post merge main - mv talk dares
nicotlm Mar 18, 2026
1eb3bce
update readme
nicotlm Mar 18, 2026
6e52973
init infolettre
nicotlm Mar 25, 2026
75dd3e5
update readme
nicotlm Mar 25, 2026
941eacc
open science meetup
nicotlm Mar 26, 2026
3babe3f
uRos conf
nicotlm Mar 26, 2026
886e062
with talk ssm agreste
nicotlm Mar 26, 2026
2aa9b2b
review projet étudiant
nicotlm Mar 26, 2026
5a2be1c
talk ssm agri
nicotlm Mar 26, 2026
f601aba
rm journées os
nicotlm Mar 26, 2026
b740967
with infographie
nicotlm Mar 26, 2026
20d4fe9
with retour ssm agri
nicotlm Mar 27, 2026
df5d949
with default argument to max number of newsletter
nicotlm Mar 30, 2026
e511fc1
update readme
nicotlm Mar 30, 2026
28136b8
Ajout actualités infolettre 24
Mar 30, 2026
a5add48
Correction coquilles
Mar 30, 2026
22406fd
Correction coquilles
Mar 30, 2026
a982217
update lang to FR
nicotlm Mar 30, 2026
82d79c8
typos and relecture
nicotlm Mar 30, 2026
fed9c9b
remarks uRos
nicotlm Mar 30, 2026
cd7bccf
review MH
nicotlm Mar 30, 2026
8164b76
with MH parts
nicotlm Mar 30, 2026
eda0830
Merge branch 'main' into fusion_site_ssplab
nicotlm Mar 30, 2026
abe752a
clean up post merge - mv files to event
nicotlm Mar 30, 2026
3136c16
Merge branch 'main' into fusion_site_ssplab - final infolettre 24
nicotlm Mar 30, 2026
0b496f0
with llms-txt
nicotlm Apr 8, 2026
50ff9eb
fix typo install package
nicotlm Apr 8, 2026
219ca27
with FR version
nicotlm Apr 8, 2026
417dcaa
update readme
nicotlm Apr 8, 2026
3375892
review readme until translation
nicotlm Apr 8, 2026
a028bb6
update readme - translation
nicotlm Apr 9, 2026
9f0e382
update readme - titles
nicotlm Apr 9, 2026
117106d
update readme - S3
nicotlm Apr 9, 2026
427a7cf
Mise à jour IPC (#141)
CChemin Apr 9, 2026
289bcdb
mv to rv
nicotlm Mar 18, 2026
4ae0ad2
update GHA mv to rv
nicotlm Mar 18, 2026
2eb8c4d
fix path to rproject
nicotlm Mar 18, 2026
23cf4b7
update rv
nicotlm Mar 18, 2026
12d1f57
Merge branch 'main' of https://github.com/InseeFrLab/ssphub into dev_uv
nicotlm Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 47 additions & 0 deletions .github/workflows/auto_fetch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Update external data"

on:
workflow_dispatch:
# push:
# branches:
# - fusion_site_ssplab
# schedule:
# - cron: '42 10 7 * *' # Runs once a month (the 7th) at 10h42 UTC to avoid GHA overload

jobs:
fetching-data:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"

- name: Install jq
run: sudo apt-get install jq

- name: Run synchronization script
id: run_script
run: |
chmod +x scripts/2_synchronize.sh
./scripts/2_synchronize.sh
if [ -n "$(git branch --list auto_fetch)" ]; then
echo "branch_created=true" >> $GITHUB_OUTPUT
else
echo "branch_created=false" >> $GITHUB_OUTPUT
fi

- name: Create Pull Request
if: steps.run_script.outputs.branch_created == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update based on latest commits"
title: "Update projects with latest external docs"
body: "This PR updates the projects external docs based on the latest commits from these repositories."
branch: "auto_fetch"
base: "main"
20 changes: 11 additions & 9 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,20 @@ jobs:
with:
node-version: "18"

- uses: actions/setup-python@v6 # for post on onyxia https://github.com/actions/setup-python?tab=readme-ov-file
with:
python-version: "3.10" # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Set up R
uses: r-lib/actions/setup-r@v2

- run: pip install jupyter nbformat # for post on onyxia
- name: Installing latest rv # cf https://github.com/marketplace/actions/a2-ai-setup-rv
uses: a2-ai/setup-rv@v1.0.0

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Install R Dependencies
run: |
rv sync -c scripts/rproject.toml
rv activate -c scripts/

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
- name: Render bilingual project
run: |
Rscript scripts/1_render.R

- name: Deploy preview
id: deploy-preview
Expand All @@ -63,7 +66,6 @@ jobs:
preview-branch: ${{ env.PREVIEW_BRANCH }}
action: deploy
comment: false
pr_number: ${{ github.event.pull_request.number }}

- name: Comment PR (custom)
uses: marocchino/sticky-pull-request-comment@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ jobs:
target: netlify
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}


18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,25 @@ node_modules/
go.sum
.hugo_build.lock

# Quarto
_freeze/
*.html
*.json
!scripts/2_repo_fetch.json
*.feed*
site_libs/

# For gh-pages
/.quarto/
_site/

rp_parquet/
*.quarto_ipynb
**/*.quarto_ipynb
course_files/

# Venv
.venv/
*/.venv/
__pycache__/
*/__pycache__/
426 changes: 293 additions & 133 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

248 changes: 208 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,234 @@
# Site web du réseau des data scientists du service statistique public
# Code du site du réseau du SSPHub, le réseau des data scientists du SSP (english below)

Code source du `SSPHub`, le site du réseau des _data scientists_ du service statistique public (SSP).
Ce repo est le repo du [`SSPHub`](https://ssphub.netlify.app/), le site qui permet de partager du contenu entre data scientists du SSP.
Il permet aussi de présenter des projets innovants portés au sein du SSP.

Contenu disponible sur https://ssphub.netlify.app.

Site web construit avec `Quarto`
Le site est ouvert à toutes les contributions.
Pour savoir comment contribuer, veuillez vous référer aux indications données ci-dessous.

_Des assistants d'IA générative ont été utilisés à différents stades du processus._

# How to
# Website of the data scientists of the French Official Statistical System

This repository contains the code for the [`SSPHub`](https://ssphub.netlify.app/), a collaborative platform designed for data scientists working within the French Official Statistical System. The website serves as a hub for sharing content, best practices, and innovative projects developed by data scientists across the system.

# How to use this repo ?

## Set up

To get started with this repository, the more convenient is to have :

- An account on [SSPCloud](https://datalab.sspcloud.fr/);
- A service on the SSPCloud (such as VSCode or another IDE) with **R installed**;
- A GitHub account;
- If you plan to deploy the website, you will also need credentials for the `InseeFrLab/ssphub` repository.

## How to contribute

Contribution guidelines are detailed in the [`contributing.md`](https://github.com/InseeFrLab/ssphub/blob/fusion_site_ssplab/CONTRIBUTING.md) file. Please refer to this document for instructions on how to submit changes, report issues, or suggest new features.

## How to render / preview when coding

To render or preview the website during development, you can use the following commands:

- To render the site:

```bash
Rscript scripts/1_render.R
```

- To preview the site:

```bash
Rscript scripts/3_preview.R
```

- To render and preview simultaneously:
```bash
Rscript scripts/3_render_preview.R
```

If a pull request (PR) is opened, a preview of the website is automatically generated. The link to this preview is available in the PR details on GitHub. Every push to the remote repository will automatically update the website preview.

## How to add an innovative project

When adding a new project, you must:

- initialize a new project;
- translate the project (French and English);
- check with the preview and render.

### Initialize a new project

Projects can be added to the website using Python. Use the following commands to generate a new project folder and file:

```bash
cd scripts
uv run 1_template.py name_of_the_folder (optional: name_of_the_template.qmd)
```

**Example:**

```bash
cd scripts
uv run 1_template.py "2022_JOCAS"
```

### Harmonization of categories

When creating a project, have a careful look at categories.
If you create a new category, perform a global "search and replace" to add this category to all relevant past listings, ensuring consistency across the previous projects.

For convenience, you can introduce code snippets for the YAML section to ensure consistency across projects. Here is an example:

```yaml
"add private data tags (FR)": {
"prefix": "prdata",
"body": " - données de caisse\n - données de téléphonie mobile\n - données CB\n - données comptes bancaires",
"description": "adds categories for listing of similar projects related to private data sources"
},

"add private data tags (EN)": {
"prefix": "en_prdata",
"body": " - scanner data\n - mobile phone data\n - credit card data\n - bank account data",
"description": "adds categories for listing of similar projects related to private data sources"
},
```

## faire une infolettre
### Translate a page to English

Deadline pour envoi en validation (n1) : une semaine avant le dernier jour ouvré du mois
A project webpage has to be written in French (a `index.qmd` file) and in English (a `index.en.qmd` file).
You can translate manually a page to English or use automated translation tool.

**1 - préparer la veille:**
To use automated translation tool, you will need:

- [ ] mettre à jour les articles issus du groupe de veille à partir du repo [ssphub_veille](https://github.com/SSPHub/ssphub_veille)
- [ ] regarder les sujets possibles parmi la liste des articles issus du groupe de veille sur grist (sujets possible : OCR ? + comment on se répartit les articles)
- A DeepL API key stored as `DEEPL_API_KEY`.
- Your working directory must be set to `ssphub/scripts`.

**2 - inclure la veille dans la newsletter:**
Run the following command to translate the `index.qmd` file of a project or subdirectory into `index.en.qmd`:

- [ ] depuis le dossier ssphub, lancer `{bash} bash scripts/init_infolettre.sh` : va déterminer le nouveau numéro de l'infolettre, créer une branche nommée infolettre_27, créer un dossier infolettre/infolettre_27 et y copier le template + commiter le tout. On peut spécifier le numéro de l'infolettre en indiquant `{bash} bash scripts/init_infolettre.sh 27`
- [ ] dans l'infolettre initialisée (infolettre/infolettre_27/index.qmd) rédiger le qmd avec:
- la veille
- les actualités
- la dataviz
- tout autre sujet
- [ ] Une fois l'infolettre ok, faire une PR sur main pour relecture. Un site de preview sera déployé (lien indiqué automatiquement en commentaire dans la PR)
- [ ] mise à disposition de l'infolettre sur le site du ssphub en mergeant la branche sur le main
- [ ] envoi infolettre par email avec les outils du repo [newsletter_tools](https://github.com/SSPHub/newsletter_tools)
- [ ] envoi infolettre par Tchap avec les outils du repo [newsletter_tools](https://github.com/SSPHub/newsletter_tools)
```bash
Rscript 2_translate.R project_subdir
```

Cf. les readme des repo :
**Example:**

```bash
Rscript scripts/2_translate.R 2022_JOCAS
```

**Important Notes:**

- Carefully review the translated webpage. Automated translation may introduce formatting issues, such as backslashes or hyphens, which can cause rendering errors.
- Common issues include:
- `description: | -` instead of `description: |`
- `{{\< fa brands github >}}` instead of `{{< fa brands github >}}`
- Markdown tables may contain excessive whitespace or incorrect separators.
- The translation script removes some issues (e.g., extra quotes, multiple spaces, or excessive `-`), but manual review is still necessary:
- Listing categories in the YAML section **must be translated**.
- Ensure that each row in the Qmd table is coded in a single line.

## How to write a newsletter

Deadline pour envoi en validation (n1) : une semaine avant le dernier jour ouvré du mois.
L'infolettre est rédigée uniquement en français.

**1 - Préparer la veille:**

- Mettre à jour les articles issus du groupe de veille à partir du dépôt [ssphub_veille](https://github.com/SSPHub/ssphub_veille).
- Regarder les sujets possibles parmi la liste des articles issus du groupe de veille sur Grist.

**2 - Initialiser la newsletter:**

- Depuis le dossier `ssphub`, lancer :

```bash
bash scripts/init_infolettre.sh
```

Cela déterminera le nouveau numéro de l'infolettre, créera une branche nommée `infolettre_27`,
créera un dossier `infolettre/infolettre_27` et y copiera le template, puis committera le tout.
Vous pouvez spécifier le numéro de l'infolettre en indiquant :

```bash
bash scripts/init_infolettre.sh 27
```

**3 - Inclure la veille et rédiger la newsletter:**

- Dans l'infolettre initialisée (`infolettre/infolettre_27/index.qmd`), rédiger le fichier `.qmd` avec :
- La veille
- Les actualités
- La dataviz
- Tout autre sujet

- Une fois l'infolettre prête, faire une PR sur `main` pour relecture.
Un site de preview sera déployé (lien indiqué automatiquement en commentaire dans la PR).
- Mettre à disposition l'infolettre sur le site du SSPHub en mergeant la branche sur `main`.
- Envoyer l'infolettre par email et Tchap avec les outils du dépôt [newsletter_tools](https://github.com/SSPHub/newsletter_tools).

_Cf._ les readme des repo :

- https://github.com/SSPHub/newsletter_tools
- https://github.com/SSPHub/ssphub_veille

## Add files to S3 storage
## How to add files to SSPHub's S3 storage

To avoid files being lost when one's SSPHub account is updated on the SSPCloud,
website material must be stored in the SSPHub's S3 storage.

### Config

- Easiest is to switch to S3 config before launching SSPCloud service. No need to initialize the connection then.
**Recommended configuration**
The easiest way to configure SSPHub's S3 access is to switch to the S3 configuration before launching the SSPCloud service.
This avoids the need to manually initialize the connection.

**Manual configuration**
If you prefer to configure S3 manually, you will need the following secrets from one of the admin of SSPHub:

- `S3_SSPHUB_ACCESS_KEY`
- `S3_SSPHUB_SECRET_ACCESS_KEY`
- `AWS_ENDPOINT_URL` (already configured in SSPCloud)

- Otherwise, you have to have the following secrets :
- S3_SSPHUB_ACCESS_KEY
- S3_SSPHUB_SECRET_ACCESS_KEY
- S3_SSPHUB_BUCKET
- AWS_ENDPOINT_URL (is already configured in SSPCloud)
- Initialize the connection :
`mc alias set s3ssphub $AWS_ENDPOINT_URL $S3_SSPHUB_ACCESS_KEY $S3_SSPHUB_SECRET_ACCESS_KEY`
You will then need to initialize the connection using the Minio client:

```bash
mc alias set s3ssphub $AWS_ENDPOINT_URL $S3_SSPHUB_ACCESS_KEY $S3_SSPHUB_SECRET_ACCESS_KEY
```

### Use

Then use Minio client to intervene with CLI.
If you're using the 2nd option, you should replace s3 with s3 ssphub.
Once configured, you can use the Minio client to interact with S3 via the command line.
You can check your Minio config with `mc alias list` and the list of minio aliases will be echoed.

Replace `s3` with `s3ssphub` in the above examples if you are using the manual configuration.

- **List files:**

```bash
mc ls --recursive s3/ssphub/
```

- **Copy files to S3:**

```bash
mc cp ./file.txt s3/ssphub/dossier/mon_fichier.txt
```

- **Delete files from S3:**
```bash
mc rm s3/ssphub/images/photo.jpg
```

## How to publish

Publishing is fully automated using Continuous Integration (CI) via the [`prod.yaml`](https://github.com/InseeFrLab/ssphub/blob/fusion_site_ssplab/.github/workflows/prod.yaml) workflow file. Any changes merged into the `main` branch will automatically trigger a deployment of the updated website.

The [`dev.yaml`](https://github.com/InseeFrLab/ssphub/blob/fusion_site_ssplab/.github/workflows/dev.yaml) workflow file deploys an automated preview on Github pages when a pull request targetting the main branch is opened.

- List files :
`mc ls --recursive s3/$S3_SSPHUB_BUCKET/`
# Credits

- Copy files to S3 :
`mc cp ./file.txt s3/$S3_SSPHUB_BUCKET/dossier/mon_fichier.txt`
Special thanks to:

- Delete files from S3 :
`mc rm s3/$S3_SSPHUB_BUCKET/images/photo.jpg`
- [babelquarto](https://docs.ropensci.org/babelquarto/)
- Quarto
Loading
Loading