{"id":684,"date":"2023-02-09T00:00:00","date_gmt":"2023-02-09T00:00:00","guid":{"rendered":"https:\/\/wp3.geodatasource.com\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/"},"modified":"2023-02-09T00:00:00","modified_gmt":"2023-02-09T00:00:00","password":"","slug":"how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu","status":"publish","type":"docs","link":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/","title":{"rendered":"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img.jpg\" alt=\"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu\" class=\"wp-image-508\" width=\"800\" height=\"400\" srcset=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img.jpg 1200w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img-300x150.jpg 300w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img-1024x512.jpg 1024w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img-768x384.jpg 768w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img-50x25.jpg 50w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img-920x460.jpg 920w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img-600x300.jpg 600w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img-320x160.jpg 320w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>D3 (Data-Driven Documents) is a JavaScript library for creating interactive data visualizations in web browsers. D3 uses web standards such as HTML, CSS, and SVG to bring data to life through graphical elements such as charts, maps, and plots. It makes it easy to create dynamic and interactive visualizations that are highly customizable and can be easily integrated into web applications.<\/p>\n\n\n\n<p>In addition, D3 allows developers to bind data to the Document Object Model (DOM), and then apply data-driven transformations to the document. This approach gives designers and developers a high level of control over the look and feel of the visualization, and allows for the creation of complex visualizations that are both interactive and responsive.<\/p>\n\n\n\n<p>World Atlas TopoJSON is a geographic data format that is used to represent the shapes of countries, states, and other geopolitical boundaries. It is based on TopoJSON, which is an extension of the popular JSON data format that is optimized for use with geospatial data. The World Atlas TopoJSON data format includes the shapes of the boundaries of countries, states, and other geopolitical entities, encoded as a series of connected lines and arcs.<\/p>\n\n\n\n<p>One of the main benefits of using World Atlas TopoJSON is that it allows for smaller file sizes compared to traditional geographic data formats such as Shapefiles or KML. This is because TopoJSON uses a lossy compression algorithm to reduce the size of the data by removing redundant line segments and arcs. The World Atlas TopoJSON data is also designed to be easily consumable by web-based data visualization tools, such as D3.js, which makes it a popular choice for creating interactive maps and other geospatial visualizations in web applications.<\/p>\n\n\n\n<p>The integration of D3 and World Atlas TopoJSON with the GeoDataSource Country-Region DropDown Menu will be demonstrated in this article. Upon selecting the country and region from the drop-down list, the associated country will be instantly highlighted in the world atlas.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Countries not available in World Atlas TopoJSON<\/h2>\n\n\n\n<p>Note that the following list shows the countries that are not available in the World Atlas TopoJSON:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Bonaire, Sint Eustatius and Saba<\/li><li>Bouvet Island<\/li><li>Cocos (Keeling) Islands<\/li><li>Christmas Island<\/li><li>French Guiana<\/li><li>Guadeloupe<\/li><li>Martinique<\/li><li>Reunion<\/li><li>Svalbard and Jan Mayen<\/li><li>French Southern Territories<\/li><li>Tokelau<\/li><li>Mayotte<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Integration steps<\/h2>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Download the GeoDataSource Country-Region DropDown Menu resources at <a href=\"https:\/\/github.com\/geodatasource\/country-region-dropdown-menu\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/geodatasource\/country-region-dropdown-menu<\/a><\/li><li>Run the following code in your site.<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;title&gt;Country-Region DropDown Menu&lt;\/title&gt;\n\n    &lt;!-- link for jquery style --&gt;\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery\/3.6.0\/jquery.min.js\"&gt;&lt;\/script&gt;\n    &lt;script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jqueryui\/1.12.1\/jquery-ui.min.js\"&gt;&lt;\/script&gt;\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/code.jquery.com\/ui\/1.12.1\/themes\/base\/jquery-ui.css\"&gt;\n\n    &lt;!-- link for bootstrap style --&gt;\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.7\/css\/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz\/K68vbdEjh4u\" crossorigin=\"anonymous\"&gt;\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.7\/css\/bootstrap-theme.min.css\" integrity=\"sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl\/Sp\" crossorigin=\"anonymous\"&gt;\n    &lt;script src=\"https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.7\/js\/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"&gt;&lt;\/script&gt;\n\n    &lt;script src=\"assets\/js\/geodatasource-cr.min.js\"&gt;&lt;\/script&gt;\n\n    &lt;!-- link to EN language po files --&gt;\n    &lt;link rel=\"gettext\" type=\"application\/x-po\" href=\"languages\/en\/LC_MESSAGES\/en.po\" \/&gt;\n    &lt;script type=\"text\/javascript\" src=\"assets\/js\/Gettext.js\"&gt;&lt;\/script&gt;\n\n    &lt;!-- D3 Resources --&gt;\n    &lt;script src=\"https:\/\/d3js.org\/d3.v7.min.js\"&gt;&lt;\/script&gt;\n    &lt;script src=\"https:\/\/d3js.org\/topojson.v3.min.js\"&gt;&lt;\/script&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;div class=\"container\"&gt;\n        &lt;div class=\"row\"&gt;\n            &lt;div class=\"col-md-12 text-center\" style=\"margin-bottom:40px;\"&gt;\n                &lt;h2&gt;Country-Region DropDown Menu&lt;\/h2&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"col-md-12\"&gt;\n                &lt;form class=\"form-horizontal\"&gt;\n                    &lt;div class=\"form-group\"&gt;\n                        &lt;label class=\"col-sm-2 control-label\"&gt;Country&lt;\/label&gt;\n                        &lt;div class=\"col-sm-10\"&gt;\n                            &lt;select class=\"form-control gds-cr\" country-data-region-id=\"gds-cr-one\" data-language=\"en\"&gt;&lt;\/select&gt;\n                        &lt;\/div&gt;\n                    &lt;\/div&gt;\n                    &lt;div class=\"form-group\"&gt;\n                        &lt;label for=\"gds-cr-one\" class=\"col-sm-2 control-label\"&gt;Region&lt;\/label&gt;\n                        &lt;div class=\"col-sm-10\"&gt;\n                            &lt;select class=\"form-control\" id=\"gds-cr-one\"&gt;&lt;\/select&gt;\n                        &lt;\/div&gt;\n                    &lt;\/div&gt;\n                &lt;\/form&gt;\n                &lt;br\/&gt;\n                &lt;div style=\"width:100%;overflow:auto;margin-top: 10px;\"&gt;\n                    &lt;svg id=\"map\" viewBox=\"0 0 1000 580\" style=\"width:100%;\"&gt;&lt;\/svg&gt;\n                &lt;\/div&gt;\n                &lt;script&gt;\n                    (function(){\n                        $(\"#gds-cr-one\").on('change',function() {\n                            var width = 960, height = 500;\n                            var svg = d3.select(\"#map\")\n                                .attr(\"width\", width)\n                                .attr(\"height\", height);\n                            var projection = d3.geoMercator()\n                                .center(&#91;0, 30])\n                                .scale(100);\n                            var path = d3.geoPath()\n                                .projection(projection);\n                            var g = svg.append(\"g\");\n                            d3.json(\"https:\/\/cdn.jsdelivr.net\/npm\/world-atlas@2.0.2\/countries-50m.json\").then(function(data) {\n                                var countries = topojson.feature(data, data.objects.countries);\n                                g.selectAll(\"path\")\n                                    .data(countries.features)\n                                    .enter()\n                                    .append(\"path\")\n                                    .attr(\"class\", \"country\")\n                                    .attr(\"d\", path)\n                                    .attr('fill', function (d) {\n                                        \/\/ map ISO3166 country name with WorldAtlas\n                                        var country_selected = $(\".gds-cr\").children(\"option\").filter(\":selected\").text();\n                                        if (country_selected == \"Antigua and Barbuda\") {country_selected = \"Antigua and Barb.\"}\n                                        else if (country_selected == \"Aland Islands\") {country_selected = \"\u00c5land\"}\n                                        else if (country_selected == \"Bosnia and Herzegovina\") {country_selected = \"Bosnia and Herz.\"}\n                                        else if (country_selected == \"Saint Barthelemy\") {country_selected = \"St-Barth\u00e9lemy\"}\n                                        else if (country_selected == \"Brunei Darussalam\") {country_selected = \"Brunei\"}\n                                        else if (country_selected == \"Bolivia (Plurinational State of)\") {country_selected = \"Bolivia\"}\n                                        else if (country_selected == \"Congo (the Democratic Republic of the)\") {country_selected = \"Dem. Rep. Congo\"}\n                                        else if (country_selected == \"Central African Republic\") {country_selected = \"Central African Rep.\"}\n                                        else if (country_selected == \"Cote d'Ivoire\") {country_selected = \"C\u00f4te d'Ivoire\"}\n                                        else if (country_selected == \"Cook Islands\") {country_selected = \"Cook Is.\"}\n                                        else if (country_selected == \"Dominican Republic\") {country_selected = \"Dominican Rep.\"}\n                                        else if (country_selected == \"Western Sahara\") {country_selected = \"W. Sahara\"}\n                                        else if (country_selected == \"Falkland Islands (Malvinas)\") {country_selected = \"Falkland Is.\"}\n                                        else if (country_selected == \"Micronesia (Federated States of)\") {country_selected = \"Micronesia\"}\n                                        else if (country_selected == \"Faroe Islands\") {country_selected = \"Faeroe Is.\"}\n                                        else if (country_selected == \"United Kingdom of Great Britain and Northern Ireland\") {country_selected = \"United Kingdom\"}\n                                        else if (country_selected == \"Equatorial Guinea\") {country_selected = \"Eq. Guinea\"}\n                                        else if (country_selected == \"South Georgia and the South Sandwich Islands\") {country_selected = \"S. Geo. and the Is.\"}\n                                        else if (country_selected == \"Heard Island and McDonald Islands\") {country_selected = \"Heard I. and McDonald Is.\"}\n                                        else if (country_selected == \"British Indian Ocean Territory\") {country_selected = \"Br. Indian Ocean Ter.\"}\n                                        else if (country_selected == \"Iran (Islamic Republic of)\") {country_selected = \"Iran\"}\n                                        else if (country_selected == \"Saint Kitts and Nevis\") {country_selected = \"St. Kitts and Nevis\"}\n                                        else if (country_selected == \"Korea (the Democratic People's Republic of)\") {country_selected = \"North Korea\"}\n                                        else if (country_selected == \"Korea (the Republic of)\") {country_selected = \"South Korea\"}\n                                        else if (country_selected == \"Cayman Islands\") {country_selected = \"Cayman Is.\"}\n                                        else if (country_selected == \"Lao People's Democratic Republic\") {country_selected = \"Laos\"}\n                                        else if (country_selected == \"Moldova (Republic of)\") {country_selected = \"Moldova\"}\n                                        else if (country_selected == \"Saint Martin (French Part)\") {country_selected = \"St-Martin\"}\n                                        else if (country_selected == \"Marshall Islands\") {country_selected = \"Marshall Is.\"}\n                                        else if (country_selected == \"North Macedonia\") {country_selected = \"Macedonia\"}\n                                        else if (country_selected == \"Northern Mariana Islands\") {country_selected = \"N. Mariana Is.\"}\n                                        else if (country_selected == \"French Polynesia\") {country_selected = \"Fr. Polynesia\"}\n                                        else if (country_selected == \"Saint Pierre and Miquelon\") {country_selected = \"St. Pierre and Miquelon\"}\n                                        else if (country_selected == \"Pitcairn\") {country_selected = \"Pitcairn Is.\"}\n                                        else if (country_selected == \"Palestine, State of\") {country_selected = \"Palestine\"}\n                                        else if (country_selected == \"Russian Federation\") {country_selected = \"Russia\"}\n                                        else if (country_selected == \"Solomon Islands\") {country_selected = \"Solomon Is.\"}\n                                        else if (country_selected == \"Saint Helena, Ascension and Tristan da Cunha\") {country_selected = \"Saint Helena\"}\n                                        else if (country_selected == \"South Sudan\") {country_selected = \"S. Sudan\"}\n                                        else if (country_selected == \"Sao Tome and Principe\") {country_selected = \"S\u00e3o Tom\u00e9 and Principe\"}\n                                        else if (country_selected == \"Sint Maarten (Dutch Part)\") {country_selected = \"Sint Maarten\"}\n                                        else if (country_selected == \"Syrian Arab Republic\") {country_selected = \"Syria\"}\n                                        else if (country_selected == \"Eswatini\") {country_selected = \"eSwatini\"}\n                                        else if (country_selected == \"Turks and Caicos Islands\") {country_selected = \"Turks and Caicos Is.\"}\n                                        else if (country_selected == \"Taiwan (Province of China)\") {country_selected = \"Taiwan\"}\n                                        else if (country_selected == \"Tanzania, United Republic of\") {country_selected = \"Tanzania\"}\n                                        else if (country_selected == \"United States Minor Outlying Islands\") {country_selected = \"U.S. Minor Outlying Is.\"}\n                                        else if (country_selected == \"Holy See\") {country_selected = \"Vatican\"}\n                                        else if (country_selected == \"Saint Vincent and the Grenadines\") {country_selected = \"St. Vin. and Gren.\"}\n                                        else if (country_selected == \"Venezuela (Bolivarian Republic of)\") {country_selected = \"Venezuela\"}\n                                        else if (country_selected == \"Virgin Islands (British)\") {country_selected = \"British Virgin Is.\"}\n                                        else if (country_selected == \"Virgin Islands (U.S.)\") {country_selected = \"U.S. Virgin Is.\"}\n                                        else if (country_selected == \"Viet Nam\") {country_selected = \"Vietnam\"}\n                                        else if (country_selected == \"Wallis and Futuna\") {country_selected = \"Wallis and Futuna Is.\"}\n                                        else {country_selected = country_selected}\n                                        if (d.properties.name == country_selected) {\n                                            return \"#FF0000\";\n                                        } else {\n                                            return \"#d9d8d8\";\n                                        }\n                                    })\n                                    .style('stroke', '#333333')\n                                    .style('stroke-width', 0.5);\n                            });\n                        });\n                    })();\n                &lt;\/script&gt;\n            &lt;\/div&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"3\"><li>Choose a country and a region from the dropdown menu.<\/li><li>Depending on the country and region you choose, a dropdown menu with a country highlighted world atlas will be visible.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1421\" height=\"993\" src=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot.png\" alt=\"Screenshot of country highlighted world atlas\" class=\"wp-image-503\" srcset=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot.png 1421w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot-300x210.png 300w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot-1024x716.png 1024w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot-768x537.png 768w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot-50x35.png 50w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot-920x643.png 920w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot-600x419.png 600w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/screenshot-320x224.png 320w\" sizes=\"auto, (max-width: 1421px) 100vw, 1421px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"5\"><li>Done.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Whether you are creating simple charts or complex data visualizations, D3 and World Atlas TopoJSON provide the tools and flexibility to bring your data to life in new and exciting ways. It is a useful data format for developers and data scientists who want to work with geographic data in web-based applications, and it provides a convenient and efficient way to represent and visualize the shapes of geopolitical boundaries.<\/p>\n\n\n\n<div style=\"height:44px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Looking for World Map Display?<\/h2>\n\n\n\n<p class=\"has-text-align-center\">Download our country region dropdown menu to create interactive data visualizations<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-a89b3969 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-background\" href=\"https:\/\/geodatasource.com\/software\/country-region-dropdown-menu\" style=\"background-color:#6ecd7e\">Download It Now<\/a><\/div>\n<\/div>\n\n\n\n<div style=\"height:68px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction D3 (Data-Driven Documents) is a JavaScript library for creating interactive data visualizations in web browsers. D3 uses web standards [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[21],"doc_tag":[],"class_list":["post-684","docs","type-docs","status-publish","hentry","doc_category-technical"],"year_month":"2026-05","word_count":1678,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Gary Chewter","author_nicename":"jianhong","author_url":"https:\/\/www.geodatasource.com\/resources\/author\/jianhong\/"},"doc_category_info":[{"term_name":"Technical","term_url":"https:\/\/www.geodatasource.com\/resources\/categories\/technical\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu |<\/title>\n<meta name=\"description\" content=\"This article shows how to use D3 and World Atlas TopoJSON with the GeoDataSource Country-Region DropDown Menu. Learn more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu |\" \/>\n<meta property=\"og:description\" content=\"This article shows how to use D3 and World Atlas TopoJSON with the GeoDataSource Country-Region DropDown Menu. Learn more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/geodatasource\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@_geodatasource\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/\",\"name\":\"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu |\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/gds-feb-article-img.jpg\",\"datePublished\":\"2023-02-09T00:00:00+00:00\",\"description\":\"This article shows how to use D3 and World Atlas TopoJSON with the GeoDataSource Country-Region DropDown Menu. Learn more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/gds-feb-article-img.jpg\",\"contentUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/gds-feb-article-img.jpg\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\",\"name\":\"GeoDataSource Articles & Tutorials\",\"description\":\"Resources About GeoDataSource Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#organization\",\"name\":\"GeoDataSource.com\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/logo-e1564122827936.png\",\"contentUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/logo-e1564122827936.png\",\"width\":220,\"height\":27,\"caption\":\"GeoDataSource.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/geodatasource\\\/\",\"https:\\\/\\\/x.com\\\/_geodatasource\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu |","description":"This article shows how to use D3 and World Atlas TopoJSON with the GeoDataSource Country-Region DropDown Menu. Learn more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/","og_locale":"en_US","og_type":"article","og_title":"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu |","og_description":"This article shows how to use D3 and World Atlas TopoJSON with the GeoDataSource Country-Region DropDown Menu. Learn more.","og_url":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/","article_publisher":"https:\/\/www.facebook.com\/geodatasource\/","og_image":[{"url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@_geodatasource","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/","url":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/","name":"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu |","isPartOf":{"@id":"https:\/\/www.geodatasource.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/#primaryimage"},"image":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/#primaryimage"},"thumbnailUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img.jpg","datePublished":"2023-02-09T00:00:00+00:00","description":"This article shows how to use D3 and World Atlas TopoJSON with the GeoDataSource Country-Region DropDown Menu. Learn more.","breadcrumb":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/#primaryimage","url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img.jpg","contentUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2023\/02\/gds-feb-article-img.jpg","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/how-to-use-d3-and-world-atlas-topojson-with-country-region-dropdown-menu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.geodatasource.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/www.geodatasource.com\/resources\/tutorials\/"},{"@type":"ListItem","position":3,"name":"How to use D3 and World Atlas TopoJSON with Country-Region DropDown Menu"}]},{"@type":"WebSite","@id":"https:\/\/www.geodatasource.com\/resources\/#website","url":"https:\/\/www.geodatasource.com\/resources\/","name":"GeoDataSource Articles & Tutorials","description":"Resources About GeoDataSource Services","publisher":{"@id":"https:\/\/www.geodatasource.com\/resources\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.geodatasource.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.geodatasource.com\/resources\/#organization","name":"GeoDataSource.com","url":"https:\/\/www.geodatasource.com\/resources\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.geodatasource.com\/resources\/#\/schema\/logo\/image\/","url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2019\/07\/logo-e1564122827936.png","contentUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2019\/07\/logo-e1564122827936.png","width":220,"height":27,"caption":"GeoDataSource.com"},"image":{"@id":"https:\/\/www.geodatasource.com\/resources\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/geodatasource\/","https:\/\/x.com\/_geodatasource"]}]}},"_links":{"self":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs\/684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/comments?post=684"}],"version-history":[{"count":0,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs\/684\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/media?parent=684"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/doc_category?post=684"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/doc_tag?post=684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}