{"id":25181072,"url":"https://github.com/trygu/ssb-pypi-statistics","last_synced_at":"2025-10-15T10:58:42.440Z","repository":{"id":265136016,"uuid":"895217682","full_name":"trygu/ssb-pypi-statistics","owner":"trygu","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-04T20:31:17.000Z","size":622,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T22:19:16.040Z","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/trygu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-27T19:24:31.000Z","updated_at":"2025-10-04T20:30:23.000Z","dependencies_parsed_at":"2024-11-27T21:31:48.067Z","dependency_job_id":"7f7821d2-dfca-4155-bcb9-3179f3ac359e","html_url":"https://github.com/trygu/ssb-pypi-statistics","commit_stats":null,"previous_names":["trygu/ssb-pypi-statistics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trygu/ssb-pypi-statistics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygu%2Fssb-pypi-statistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygu%2Fssb-pypi-statistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygu%2Fssb-pypi-statistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygu%2Fssb-pypi-statistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trygu","download_url":"https://codeload.github.com/trygu/ssb-pypi-statistics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygu%2Fssb-pypi-statistics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278671745,"owners_count":26025744,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-02-09T16:38:27.040Z","updated_at":"2025-10-06T20:00:09.757Z","avatar_url":"https://github.com/trygu.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSB Package Statistics Viewer\n\nThis project provides a tool to download, process, and interactively explore statistics about public packages using the [Libraries.io API](https://libraries.io/). It fetches data about all public packages associated with Statistics Norway and presents the results in an interactive table format.\n\nIf you're just interested in the processed results, visit the [GitHub Pages deployment](https://trygu.github.io/ssb-pypi-statistics/).\n\n## Features\n\n- **Package Data Fetching**: Fetches data about all public packages from Libraries.io.\n- **Interactive Table**: Displays package data in a dynamic, searchable, and sortable table using [Tabulator.js](http://tabulator.info/).\n- **CSV Download**: Allows users to download the dataset as a CSV file for offline use.\n- **DuckDB Integration**: Easily query and sample the data in the DuckDB Web Shell for further analysis.\n\n## Requirements\n\nTo fetch and process data using the Libraries.io API:\n1. **Libraries.io API Key**:\n   - You'll need a valid API key from Libraries.io. You can sign up for one [here](https://libraries.io/account).\n   - Add your API key to the appropriate part of the data-fetching script.\n\n2. **Python Environment**:\n   - Install the required Python dependencies:\n     ```bash\n     pip install pandas requests\n     ```\n\n## How to Use\n\n### 1. Download and Process Data\nRun the data-fetching script to download the package data:\n```bash\npython fetch_data.py\n```\nThe script will:\n- Fetch all public packages associated with Statistics Norway from Libraries.io.\n- Save the results as `results.csv` in the `src/` directory.\n\n### 2. Open the Results Viewer\n- Open `index.html` in your browser to view the interactive table.\n\n### 3. Explore the Results\n- Use the **\"Download CSV\"** button to save the data for offline use.\n- Use the **\"Open in DuckDB Web Shell\"** button to query the dataset directly in the DuckDB Web Shell.\n\n### Preprocessed Results\nIf you don't want to fetch and process the data yourself, you can access the processed results directly:\n- [Interactive Viewer on GitHub Pages](https://trygu.github.io/ssb-pypi-statistics/)\n\n## DuckDB Query Example\n\nThe DuckDB Web Shell button includes a query to:\n1. Load the dataset into a table called `ssb_packages`.\n2. Sample 10 random rows from the table.\n\nThe SQL query used:\n```sql\n-- Load CSV file and create a table\nCREATE TABLE ssb_packages AS\nSELECT *\nFROM read_csv_auto('https://trygu.github.io/ssb-pypi-statistics/results.csv');\n\n-- Sample 10 rows from the table\nFROM ssb_packages USING SAMPLE 10;\n```\n\n## Development Notes\n\n- Ensure the API key is correctly configured in the `fetch_data.py` script before running it.\n- The data viewer (`index.html`) is designed to use a preprocessed `results.csv`. Modify the DuckDB query URL in the HTML if hosting the dataset elsewhere.\n\n## Credits\n\n- [Libraries.io API](https://libraries.io/)\n- [DuckDB](https://duckdb.org/)\n- [Tabulator.js](http://tabulator.info/)\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrygu%2Fssb-pypi-statistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrygu%2Fssb-pypi-statistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrygu%2Fssb-pypi-statistics/lists"}