UNCTAD provides datasets on trade, investment, development, globalization, economic indicators and other aspects of international trade and development.
UNCTAD provides UNCTADStat with a CSV download interface and REST API. Engineers use `requests` against the UNCTADStat API with datacode and reporter parameters, then process multi-dimensional JSON into pandas DataFrames for international investment analysis.
UNCTAD investment and trade data enables AI tools for global FDI analysis and supply chain intelligence. RAG systems indexed on UNCTAD World Investment Reports answer questions about FDI trends with authoritative UN data. AI models trained on UNCTAD data predict FDI flows from regulatory and infrastructure indicators.
# pip install requests pandas
import requests, pandas as pd
resp = requests.get(
"https://unctadstat.unctad.org/datacentre/dataviewer/US.FdiFlowsCountry",
params={"output-format": "csv", "startYear": 2018, "endYear": 2023}
)
from io import StringIO
df = pd.read_csv(StringIO(resp.text), skiprows=2)
df.columns = df.columns.str.strip()
print(df.head(10))Official dataset source
More datasets used by Python data engineers.
The Federal Reserve Bank of St. Louis FRED database provides over 800,000 economic time series from 100+ sources, including interest rates, inflation, GDP, and employment data. Widely used in financial and economic data pipelines via the fredapi Python library for loading macro data into analytical systems.
The FEC provides access to campaign finance data, including information on political contributions, campaign expenditures, fundraising activities and financial disclosures filed by political candidates, parties and committees in the United States.
Access datasets on child well-being, education enrolment, nutrition, immunisation, child mortality, and child protection indicators worldwide from UNICEF. Used in data engineering for humanitarian analytics pipelines, SDG progress tracking, and building global child health indicator dashboards in Python.