{"id":23291001,"url":"https://github.com/jplusplus/socialstyrelsen-scraper","last_synced_at":"2026-01-19T22:31:03.491Z","repository":{"id":57469082,"uuid":"112729064","full_name":"jplusplus/socialstyrelsen-scraper","owner":"jplusplus","description":"A scraper of statistical data from socialstyrelsen.se built on top of Statscraper.","archived":false,"fork":false,"pushed_at":"2021-11-09T14:56:55.000Z","size":90,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-06T12:53:02.116Z","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/jplusplus.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2017-12-01T10:47:11.000Z","updated_at":"2023-11-20T18:04:13.000Z","dependencies_parsed_at":"2022-09-19T08:40:11.479Z","dependency_job_id":null,"html_url":"https://github.com/jplusplus/socialstyrelsen-scraper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jplusplus/socialstyrelsen-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplusplus%2Fsocialstyrelsen-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplusplus%2Fsocialstyrelsen-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplusplus%2Fsocialstyrelsen-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplusplus%2Fsocialstyrelsen-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jplusplus","download_url":"https://codeload.github.com/jplusplus/socialstyrelsen-scraper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplusplus%2Fsocialstyrelsen-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: 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-12-20T05:13:49.665Z","updated_at":"2026-01-19T22:31:03.475Z","avatar_url":"https://github.com/jplusplus.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nThis is a scraper for statistical data from the statistcial databases http://www.socialstyrelsen.se built on top of the `Statscraper package \u003chttps://github.com/jplusplus/statscraper\u003e`.\n\nVery much alpha. Only tested on a selected topics.\n\nInstall\n-------\n\n  pip install -r requirements.txt\n\n\nExample usage\n-------------\n\n.. code:: python\n\n  from socialstyrelsen import SocialstyrelsenScraper\n\n  scraper = SocialstyrelsenScraper()\n  scraper.items  # List databasese\n  # [\u003cSocialstyrelsenDataset: abort (Aborter)\u003e, \u003cSocialstyrelsenDataset: amning (Amning)\u003e...]\n\n  dataset = scraper.get(\"ekonomisktbistandmanad\")  # Get a specific (by id)\n\n  # Inpect dataset\n  print dataset.dimensions\n  # [\u003cSocialstyrelsenDimension: MATT\u003e, \u003cSocialstyrelsenDimension: FOR\u003e, \u003cSocialstyrelsenDimension: LANGD\u003e, \u003cSocialstyrelsenDimension: OMR\u003e, \u003cSocialstyrelsenDimension: AGI\u003e, \u003cSocialstyrelsenDimension: AR\u003e]\n\n  print dataset.dimensions[\"OMR\"].allowed_values\n  # [\u003cSocialstyrelsenDimensionValue: 0 (Hela Riket)\u003e, \u003cSocialstyrelsenDimensionValue: 1 (Stockholm)\u003e, ...]\n\n  # Make a query, you have to explicitly define all dimension values you want\n  # to query.\n  res = dataset.fetch({\n      \"TABELL\": \"1\",\n      \"OMR\": [\"01\", \"03\"],\n      \"MANAD\": [\"4\", \"5\", \"6\"],\n      \"AR\": \"2017\",\n      \"MATT\": \"1\",\n  })\n\n  # Do something with the result\n  df = res.pandas\n\n\nTODO\n----\n\n- Currently only properly tested on \"ekonomiskt bistånd\"\n- Handle large queries.\n- Handle dimension labels\n\n\nDevelop\n------\n\nRun tests:\n\n  make tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjplusplus%2Fsocialstyrelsen-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjplusplus%2Fsocialstyrelsen-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjplusplus%2Fsocialstyrelsen-scraper/lists"}