Skip to main content

This is a python package to interact with OHID Fingertips data tool. This can be used to load data from the Fingertips API into Python for further manipulation.

Project description

fingertips_py

This is a python package to interact with OHID's Fingertips data tool. Fingertips is a major repository of population and public health indicators for England. The site presents the information in many ways to improve accessibility for a wide range of audiences ranging from public health professionals and researchers to the general public. The information presented is a mixture of data available from other public sources, and those that are available through user access agreements with other organisations. The source of each indicator presented is available using the get_metadata_for_indicator() function.

This package can be used to load data from the Fingertips API into python for further use.

Installation

This packaged should be installed using pip:

pip install fingertips_py

Or it can be compiled from source (still requires pip):

pip install git+https://github.com/PublicHealthEngland/PHDS_fingertips_py.git

Usage

fingertips_py should be imported and used in line with standard python conventions. It is suggested that if the whole package is to be imported then the following convention is used:

import fingertips_py as ftp

The package returns data in a variety of types dependent on the function.

For more information on any function, you can use:

help(*fingertips_py function name*)

Or you can view the documents here.

Example

This is an example of a workflow for retrieving data for the indicator on Healthy Life Expectancy at Birth from the Public Health Outcomes Framework profile.

import fingertips_py as ftp


phof = ftp.get_profile_by_name('public health outcomes framework')
phof_meta = ftp.get_metadata_for_profile_as_dataframe(phof['Id'])
indicator_meta = phof_meta[phof_meta['Indicator'].str.contains('Healthy')]
print(indicator_meta)

    Indicator ID                                          Indicator  ...   
0          90362            0.1i - Healthy life expectancy at birth  ... 
55         92543  2.05ii - Proportion of children aged 2-2½yrs r...  ...

We can see that the Healthy life expectancy at birth indicator has an id of 90362. The data for this indicator at all geographical breakdowns can be retrieved using get_data_for_indicator_at_all_available_geographies()

healthy_life_data = ftp.get_data_for_indicator_at_all_available_geographies(90362)

Licence

This project is released under the GPL-3 licence.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fingertips_py-0.4.2.tar.gz (49.4 kB view details)

Uploaded Source

Built Distribution

fingertips_py-0.4.2-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

Details for the file fingertips_py-0.4.2.tar.gz.

File metadata

  • Download URL: fingertips_py-0.4.2.tar.gz
  • Upload date:
  • Size: 49.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for fingertips_py-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6710cd6490e4621550d539882e17ace8b5ac2218826a61425a65980d4f4030d9
MD5 2dd4cac8eeb38a56f3634ca582437258
BLAKE2b-256 a3aac62c80ba1bb022199f74645417ef21702ece2e88cf81ed75d4de0b36ab52

See more details on using hashes here.

Provenance

The following attestation bundles were made for fingertips_py-0.4.2.tar.gz:

Publisher: pypi.yml on DataS-DHSC/fingertips_py

Attestations:

File details

Details for the file fingertips_py-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fingertips_py-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13729dda1bb05c421547a7ab9469c27b460108c0d8d448de033c9e4afc41a3aa
MD5 08b39ec5d7747361b1abc14fd6f5924d
BLAKE2b-256 d74be7d621dec3deed474e598e619453a26e213f029f7e107fa2d6513b0f42ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for fingertips_py-0.4.2-py3-none-any.whl:

Publisher: pypi.yml on DataS-DHSC/fingertips_py

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page