Trade Balance (US$, Not Inflation-adjusted)
Gapminder datapoints for 'trade_balance_us_not_inflation_adjusted'
@gapminder.trade_balance_us_not_inflation_adjusted
Gapminder datapoints for 'trade_balance_us_not_inflation_adjusted'
@gapminder.trade_balance_us_not_inflation_adjusted
External balance on goods and services (formerly resource balance) equals exports of goods and services minus imports of goods and services (previously nonfactor services). Data are in current U.S. dollars.
HOW TO JOIN WITH METADATA
• Concepts (labels/units)
– Use the concept id trade_balance_us_not_inflation_adjusted
to look up labels and units in @gapminder.metadata.concepts.
SELECT * FROM @gapminder.metadata.concepts WHERE concept = 'trade_balance_us_not_inflation_adjusted'
.
• Countries and names
– Join your datapoints on geo to @gapminder.metadata.entities_geo_country to get readable country/area names
(e.g., name
) and membership attributes such as world_4region
, income_groups
.
• Regions and other group labels
– After you have a region code from the country table (e.g., world_4region
),
you can join to:
· @gapminder.metadata.entities_geo_world_4region on world_4region
→ region names/colors/shapes
· @gapminder.metadata.entities_geo_world_6region on world_6region
→ region names
· @gapminder.metadata.entities_geo_income_groups on income_groups
→ income group names
Example:
SELECT d.time,
c.name AS country,
d.trade_balance_us_not_inflation_adjusted AS value
FROM @gapminder.trade_balance_us_not_inflation_adjusted.trade_balance_us_not_inflation_adjusted_by_geo_time d
LEFT JOIN @gapminder.metadata.entities_geo_country c ON d.geo = c.country;
CREATE TABLE trade_balance_us_not_inflation_adjusted_by_geo_time (
"geo" VARCHAR,
"time" BIGINT,
"trade_balance_us_not_inflation_adjusted" DOUBLE
);
Anyone who has the link will be able to view this.