Python tools for data collection 

Overview

Python Tools for Data Collection Image

Python script tools are essential for automating data collection and processing, leveraging the vast libraries and frameworks available in Python. These tools effectively extract data from various sources, such as APIs and online databases, ensuring timely and accurate data collection, which is crucial for maintaining up-to-date datasets. By automating the extraction process, Python scripts minimize the risk of human error while saving considerable time and effort.

Once the data is collected, Python script tools can standardize, format, and clean the raw data, preparing it for upload to ECAstats. Python scripts streamline the data-handling process from collection to preparation, making them essential for data-driven projects.

Scripts Tools

  • Sustainable Development Goal (SDG)

  • Gross Domestic Product (GDP)

  • Balance of Payment (BOP)

  • Agriculture (FAOSTAT)

  • Education

  • Government Finance

  • Human Development

  • Labour

  • Mo Ibrahim Governance

  • UN Comtrade

  • World Bank

Key Features

  • Automated Data Retrieval:

    Extract data from various APIs and online databases with minimal manual intervention.

  • Data Cleaning & Processing:

    Standardizes, formats, and cleans raw data to align with UNECA’s ECAstats.

  • Multi-Format Support:

    Exports collected data to CSV and Excel for easy access.

  • Flexible Data Export:

    Export processed data into CSV and Excel files in pivoted and non-pivoted formats.

  • Data Upload:

    Prepares Excel files for uploading to ECAstats.

Key Features Image

Use

  • Sustainable Development Goals (SDG):

    Scripts: Extract SDG indicators from the United Nations SDG API national and regional levels from UN Stats

  • Gross Domestic Product (GDP):

    Scripts: Extract GDP data from the United Nations GDP, API national and regional levels from UN Stats

  • Balance of Payments (BOP):

    Scripts: Extract Balance of Payments data from the IMF for IMF Data

  • Agriculture (FAOSTAT):

    Scripts: Gather production, trade, and food security data from FAOSTAT API: FAOSTAT

  • Education:

    Scripts: Extract education statistics from UNESCO API: UNESCO

  • Government Finance:

    Scripts: Extract public finance and expenditure data from IMF API IMF Data

  • Human Development:

    Scripts: Extract Human Development related indicators from UNDP API: UNDP

  • Labor Market:

    Scripts: Extract Labor Market from ILO and national labor bureaus ILO

  • Mo Ibrahim Governance:

    Scripts: Extract Mo Ibrahim Foundation performance indicators from Mo Ibrahim Foundation: Mo Ibrahim Foundation

  • UN Comtrade:

    Scripts: Extract international trade statistics for import/export from UN Comtrade

  • World Bank Data:

    Scripts: Extract macroeconomic and social indicators from World Bank API: World Bank

Resources

  • Python Script Repository

GitHub Repository

How to Get Started

  • Open Jupyter Notebook:

    Navigate to your script.

  • Open the Script File:

    Open the script file in Jupyter Notebook.

  • Run the Script:

    The script will collect and process data.

  • Check the Files:

    The script will generate and save Excel files. Check them for accuracy and completeness.

  • Upload the Files:

    Log in to ECAstats and upload the Excel files.

Contact

For more information, please email: ecastats@un.org