Skip to main content

Quality Gate Status analytics image (flat) analytics

SCL Data - Data Ecosystem Working Group

IDB Logo

Welcome to idbsocialdatapy

The objective of this library is to help users access standardized SCLdata indicators on topics such as poverty, inequality, health, labor market, gender and diversity, education, and migration for the 26 countries of the region.

The project to develop the library in Python resulted from the implementation workshop for IDBSocialData. Individual developers showed interest in the library in Python and decided to collaborate voluntarily with the IDB to develop this tool.

Installation

To install the idbsocialdatapy library you can use:

$ pip install idbsocialdatapy

Metadata

There are many indicators in this library, with the metadata functions you will be able to find all the indicators we have available.

Dictionary

Get the dictionary for all the indicators in our API.

import idbsocialdatapy as idb
dictionary = idb.query_dictionary()

Countries, themes & sources

  • See available countries with iso-codes and regions.
  • See themes included in our indicators. For instance, labor markets, education, and social protection.
  • Review the sources we use to construct our indicators.
countries = idb.get_countries()
themes = idb.get_themes()
sources = idb.get_sources()

Data

Look for indicators

This is the main function of the library. With this function, you will be able to query all the indicators from our API. The function has four main inputs.

  1. indicator: needed. Pick one or multiple indicators to query.

  2. categories: optional. If no category is chosen, you will get the indicator for the total population. The categories you can pick from are the following:

categories comments
sex women or men
quintile indicator for different income quintiles
area urban or rural
age indicators for populations with different ages
ethnicity afro descendants, indigenous and non-afro non-indigenous
disability indicators for the population living with and without disabilities
migration migrant or non-migrant
  1. countries: optional. If you do not pick a category, you will get the information for all the countries available for that indicator. If you want to pick specific countries you will do so with the isoalpha3 code. You can get the isoalpha3 code for all the countries from the following function:
countries = idb.get_countries()
  1. yearstart: and yearend: optional. You can use these arguments if you want to limit the years you get data from.

Example

Here is an example using all the arguments. We will query the poverty indicators, disaggregated by gender, for Mexico, Colombia, and Brasil, for the period between 2005 and 2020.

poverty = idb.query_indicator(indicator = 'pobreza', # define indicator to consult 
                          categories = 'sex', # define category/ies I want to see in the indicator
                          countries = 'COL,BRA,MEX', #define countries you want data from
                          yearstart = '2005', # starting period
                          yearend = '2021') # ending period

Authors

idbsocialdatapy's original authors are:

License

Copyright © 2020. Banco Interamericano de Desarrollo ("BID"). Uso autorizado. AM-331-A3

Contributors

Metadata

Release files for idbsocialdatapy 0.2.1

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

Source distribution (sdist)

Source distribution for idbsocialdatapy 0.2.1
File Size Uploaded
idbsocialdatapy-0.2.1.tar.gz 13.7 kB Details

Built distribution (wheel)

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

Total release size: 23.7 kB

Release files / idbsocialdatapy-0.2.1.tar.gz

Download URL idbsocialdatapy-0.2.1.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
db94f0bb7f00cb06bd391295b0c276b448e591296d5931d4617852e03d2863de
BLAKE2b-256 checksum
How to use checksums
dfaed962270c0200d77cb988a4fa7378b0fb9add34617a3795619e580d34c2a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / idbsocialdatapy-0.2.1-py3-none-any.whl

Download URL idbsocialdatapy-0.2.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dcd4fb3e08e77e6ea042bc66713e22f65fb0245ae7fe796900c44f213e42ca8
BLAKE2b-256 checksum
How to use checksums
6416b4e0f6a1f894c791c3b5eafc7dc310b8b8d783353cbc89e725bd2863167a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.2.1 This release

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