Skip to main content

No project description provided

Project description

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

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

idbsocialdatapy-0.2.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

idbsocialdatapy-0.2.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file idbsocialdatapy-0.2.1.tar.gz.

File metadata

  • Download URL: idbsocialdatapy-0.2.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for idbsocialdatapy-0.2.1.tar.gz
Algorithm Hash digest
SHA256 db94f0bb7f00cb06bd391295b0c276b448e591296d5931d4617852e03d2863de
MD5 20f452e58e59c78ff4b151f1dfd6328f
BLAKE2b-256 dfaed962270c0200d77cb988a4fa7378b0fb9add34617a3795619e580d34c2a1

See more details on using hashes here.

File details

Details for the file idbsocialdatapy-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for idbsocialdatapy-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dcd4fb3e08e77e6ea042bc66713e22f65fb0245ae7fe796900c44f213e42ca8
MD5 c507e9f0c19bd935a910b9480878b77d
BLAKE2b-256 6416b4e0f6a1f894c791c3b5eafc7dc310b8b8d783353cbc89e725bd2863167a

See more details on using hashes here.

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