Skip to main content

socio4health

Lifecycle: maturing MIT license GitHub contributors commits

Overview

Package socio4health is an extraction, transformation and loading (ETL) classification tool designed to simplify the intricate process of collecting and merging data from multiple sources, focusing on sociodemographic and census datasets from Colombia, Brazil, and Peru, into a harmonized dataset.

  • Seamlessly retrieve data from online data sources through web scraping, as well as from local files.
  • Support for various data formats, including .csv, .xlsx, .xls, .txt, .sav, fixed-width files and geospatial files, ensuring versatility in sourcing information.
  • Consolidating extracted data into a pandas (or dask) DataFrame.

Dependencies

pandas logo Dask
Dask is a flexible parallel computing library for analytics.
pandas logo Pandas
Pandas is a well-known open source data analysis and manipulation tool.
pandas logo Geopandas
Python tools for geographic data.
numpy logo Numpy
The fundamental package for scientific computing with Python.
scrapy logo Scrapy
Framework for extracting the data you need from websites.
scrapy logo Matplotlib
Library for creating static, animated, and interactive visualizations in Python.
scrapy logo Torch
Python package for tensor computation and deep neural networks.

Installation

socio4health can be installed via pip from PyPI.

# Install using pip
pip install socio4health

Optional extras

Use the following extras to install optional dependencies:

pip install "socio4health[scraping]"
pip install "socio4health[ml]"
pip install "socio4health[geo]"
pip install "socio4health[all]"
pip install "socio4health[dev]"
pip install "socio4health[test]"

How to Use it

To use the socio4health package, follow these steps:

  1. Import the package in your Python script:

    from socio4health import Extractor()
    from socio4health import Harmonizer
    
  2. Create an instance of the Extractor class:

    extractor = Extractor()
    
  3. Extract data from online sources and create a list of data information:

    url = 'https://www.example.com'
    depth = 0
    ext = 'csv'
    list_datainfo = extractor.s4h_extract(url=url, depth=depth, ext=ext)
    harmonizer = Harmonizer()
    

For more detailed examples and use cases, please refer to the socio4health documentation.

Resources

Package Website

The socio4health website package website includes API reference, user guide, and examples. The site mainly concerns the release version, but you can also find documentation for the latest development version.

Organisation Website

Harmonize is an international project that develops cost-effective and reproducible digital tools for stakeholders in Latin America and the Caribbean (LAC) affected by a changing climate. These stakeholders include cities, small islands, highlands, and the Amazon rainforest.

The project consists of resources and tools developed in conjunction with different teams from Brazil, Colombia, Dominican Republic, Peru, and Spain.

Organizations

bsc logo uniandes logo

Authors / Contact information

Here is the contact information of authors/contributors in case users have questions or feedback.

Diego Irreño (developer)
Erick Lozano (developer)
Juan Montenegro (developer)
Ingrid Mora (documentation)

Metadata

Release files for socio4health 1.0.9

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

Source distribution (sdist)

Source distribution for socio4health 1.0.9
File Size Uploaded
socio4health-1.0.9.tar.gz 43.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for socio4health 1.0.9
File Interpreter ABI Platform
socio4health-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 82.5 kB

Release files / socio4health-1.0.9.tar.gz

Download URL socio4health-1.0.9.tar.gz
Size 43.7 kB
Tags Source
SHA-256 checksum
How to use checksums
36194d3a94c700cf5928bd850a3a114d3c2a4985f7f50f15d6a1bbe39e39e98c
BLAKE2b-256 checksum
How to use checksums
1ee0530b065abcaaef82207a8f2187d5e373b2230d95efdd40cc2a9ff2e71dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / socio4health-1.0.9-py3-none-any.whl

Download URL socio4health-1.0.9-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c378ec0a4a2f6bd77fd28ea7ce72b4a38c8de5f7c0e825364b06e99a4b155da
BLAKE2b-256 checksum
How to use checksums
a8d0a6a6f6f9d8f0e44e3c1961e1909d345ad407279ce49dc0e5e1176eae9a8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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