Skip to main content

pyicane is a Python wrapper for the Statistical Office of Cantabria’s (ICANE) metadata restful API. This module parses ICANE’s json data and metadata into Python objects and common data structures such as Pandas dataframes [1]. All ICANE’s API classes and methods are covered; also, time-series data can be downloaded into a Python Pandas dataframe structure.

pyicane is written and maintained by Miguel Expósito Martín and is distributed under the Apache 2.0 License (see LICENSE file).

Installation

pyicane requires pandas and requests packages. For installation:

pip install pyicane

Usage

Get a list of categories

Typical usage often looks like this:

from pyicane import pyicane

categories = pyicane.Category.find_all()
print categories

Get Time Series Data in a Dataframe

Conversion to dataframe is a useful feature:

from pyicane import pyicane

time_series = pyicane.TimeSeries.get('census-series-1900-2001')
print time_series.data_as_dataframe()

Get Time Series Metadata in a Dataframe

Let’s check the most relevant metadata:

from pyicane import pyicane

time_series = pyicane.TimeSeries.get('census-series-1900-2001')
print time_series.metadata_as_dataframe()

Get last updated data

Which was the last ICANE’s API data update:

from pyicane import pyicane

print pyicane.Data.get_last_updated()

Metadata

Release files for pyicane 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyicane 0.1.2
File Size Uploaded
pyicane-0.1.2.tar.gz 183.2 kB Details

Release files / pyicane-0.1.2.tar.gz

Download URL pyicane-0.1.2.tar.gz
Size 183.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4e10d2353e5926c48900f594ac9b27df17d7fb5f90b88080b5d24a14ed30d90d
BLAKE2b-256 checksum
How to use checksums
5d2d7cf45fab3975944b3c71cf22245c6a120f6025d770802839456877aac8d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page