This is a non-official scraper for statistical data from the (https://www.uc.se/konkursstatistik)[uc.se] built on top of the Statscraper package <https://github.com/jplusplus/statscraper>.
The scraper is limited to the data availble through https://www.uc.se/konkursstatistik
Install
$ pip install uc_scraper
Example usage
from uc import UCScraper
# Init scraper
scraper = UCScraper()
# List all available datasets
print(scraper.items)
# [<UCDataset: Riks- och länsstatistik (b'Riks- och l\xc3\xa4nsstatistik')>, <UCDataset: Kommunstatistik (b'Kommunstatistik')>, <UCDataset: Branschstatistik (b'Branschstatistik')>]
# Select a dataset
dataset = scraper.items["Branschstatistik"]
# List all available dimensions
print(dataset.dimensions)
#
# Make a query
res = dataset.fetch() # Get latest available data by default
# Analyze the results with Pandas
df = res.pandas
# You are able to query month ranges
res = dataset.fetch({"from": "2019-06"})
res = dataset.fetch({"from": "2019-06", "to": "2019-07"})
Develop
Set up:
$ pip install -r requirements.txt
Run tests:
$ make tests
Deploy to pypi (assuming you have Twine installed, if not pip install twine)
$ make tests
Metadata
Release files for uc-scraper 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uc_scraper-0.2.tar.gz | 3.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uc_scraper-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / uc_scraper-0.2.tar.gz
| Download URL | uc_scraper-0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62fb128c3febdc738b93830b48e12c7d8bf7cc65623cdb7ae672f0560731c452
|
|
BLAKE2b-256 checksum How to use checksums |
0e46196ca25cd4fb7f487f72ba9205fe77b49ccc0aa8c23be56dbd86d94723d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8
|
Release files / uc_scraper-0.2-py3-none-any.whl
| Download URL | uc_scraper-0.2-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
976cff3e6fc4dac8fd3a778029b9fb5055074d0bf84688b9f4ada368c4441c04
|
|
BLAKE2b-256 checksum How to use checksums |
29a4501e2c9f9caa887fb10d936d23c8c2033fa5ae97c43df2af78e4f66f0efb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8
|
Security for uc-scraper 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.