Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A scraper of statistical data from uc.se, built on top of Statscraper.

License

Notifications You must be signed in to change notification settings

jplusplus/uc_scraper

Open more actions menu

Repository files navigation

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

About

A scraper of statistical data from uc.se, built on top of Statscraper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.