{"id":42503806,"url":"https://github.com/dataforgoodfr/12_pinkbombs","last_synced_at":"2026-01-28T13:37:36.172Z","repository":{"id":224063814,"uuid":"751915387","full_name":"dataforgoodfr/12_pinkbombs","owner":"dataforgoodfr","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-24T09:55:42.000Z","size":17575,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-24T10:06:55.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dataforgoodfr.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2024-02-02T15:55:12.000Z","updated_at":"2024-04-25T12:27:04.032Z","dependencies_parsed_at":"2024-03-06T13:38:14.549Z","dependency_job_id":"eeece4ce-5353-4484-a99d-0bbc4acc4377","html_url":"https://github.com/dataforgoodfr/12_pinkbombs","commit_stats":null,"previous_names":["dataforgoodfr/12_pinkbombs"],"tags_count":0,"template":false,"template_full_name":"dataforgoodfr/python_template","purl":"pkg:github/dataforgoodfr/12_pinkbombs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforgoodfr%2F12_pinkbombs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforgoodfr%2F12_pinkbombs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforgoodfr%2F12_pinkbombs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforgoodfr%2F12_pinkbombs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dataforgoodfr","download_url":"https://codeload.github.com/dataforgoodfr/12_pinkbombs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataforgoodfr%2F12_pinkbombs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T13:02:32.985Z","status":"ssl_error","status_checked_at":"2026-01-28T13:02:04.945Z","response_time":57,"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":"2026-01-28T13:37:35.381Z","updated_at":"2026-01-28T13:37:36.164Z","avatar_url":"https://github.com/dataforgoodfr.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pinkbombs\n================\n\n\nThis repository contains the pyhton code needed to generate the figure for the [Pinkbombs website](https://www.pinkbombs.org).\n\n# Contributing\n\n## Use Poetry\n\n[Install Poetry](https://python-poetry.org/docs/):\n\n    python3 -m pip install \"poetry==1.4.0\"\n\nInstall dependencies:\n\n    poetry install\n\nAdd a dependency:\n\n    poetry add pandas\n\nUpdate dependencies:\n\n    poetry update\n\n## Use a venv \n\n    python3 -m venv name-of-your-venv\n\n    source name-of-your-venv/bin/activate\n\n## To launch pre-commits locally\n\n[Install precommit](https://pre-commit.com/)\n\n    pre-commit run --all-files \n \n## Test the code with Tox\n\n    tox -vv\n\n# How to\n## Generate the graphs and maps\nActivate your virtual environment:\n\n    source name-of-your-venv/bin/activate\n\nRun the generation script:\n\n    python pinkbombs/generate.py\n\nThe graphs and maps will be added to the `data` directory. They are separated by type (`graphs`and `maps`) and by language (`fr`and `en`):\n    \n    data\n    ├── graphs\n    │   ├── en\n    │   └── fr\n    └── maps\n        ├── en\n        └── fr\n\nCopy these to the [Pinkbombs webapp reppository](https://github.com/dataforgoodfr/12_pinkbombs_app) in the `public/dashboard/` directory.\n\n**NOTE**: This is a temporary feature, when the images are moved to S3, a workflow will do this automatically upon merge.\n\n## Adding a new visualization\nTo add a new graph or map, add a function that generates the visualization in the `pinkbombs/graphs/viz.py` or `pinkbombs/graphs/maps_viz.py` files respectively.\n\n**The function NEEDS to return a Plotly Figure object for graphs or an html string for maps**\n\nMake sure that the function is the import in the  `__init__.py` file in the graphs directory:\n\n    from .viz import my_viz_function\n    from .maps_viz import my_map_viz_function\n\nThe maps needs to the be added to the `config.py` file in order to have it automatically generated. Add the function to the correct section:\n\n    MAPPING     --\u003e     graphs/en\n    MAPPINGFR   --\u003e     graphs/fr\n    MAPS        --\u003e     maps/en\n    MAPSFR      --\u003e     maps/fr\n\n__Be sure to add to both the french and english section.__\n\nThe function needs to be added in the following dictionary entry format:\n\n    \"visualisation-id\": {\n        \"filename\": \"source-data.csv\",\n        \"function\": pb.my_viz_function,\n        \"parser\": pd.read_csv, # or pd.read_excel for example\n        \"arguments\": [ # add all the arguments in an ordered list\n            \"arg1\",\n            \"arg2\",\n            \"arg3\",\n            True,\n            0\n        ],\n    },\n\nDo not skip any argument to the function as these need to be in the correct order.\n\n## Temporary Python scripts for testing locally\nTo run the plotly graphs locally and generate html files you can view in your browser, you can use the script:\n\n    python3 pinkbombs/graphs/test_graphs.py \n\nNote that the changes to the html files in this folder won't be included in git as the folder `pinkbombs/graphs/test_html/` is included in `.gitignore`.  \n\nTo translate the data and zip the csv files for download, run locally: \n\n    python3 pinkbombs/graphs/translate_data.py\n    python3 pinkbombs/graphs/zip_data.py\n\nNote that this will regenerate all files and may not be adapted\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataforgoodfr%2F12_pinkbombs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataforgoodfr%2F12_pinkbombs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataforgoodfr%2F12_pinkbombs/lists"}