{"id":4245,"date":"2023-12-09T13:59:27","date_gmt":"2023-12-09T13:59:27","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=4245"},"modified":"2025-02-05T14:20:38","modified_gmt":"2025-02-05T14:20:38","slug":"how-to-create-a-stock-market-treemap-in-python","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python","title":{"rendered":"How to Create a Stock Market Treemap in Python"},"content":{"rendered":"\n<p>I found this really interesting treemap on the <a href=\"https:\/\/finviz.com\/map.ashx\" target=\"_blank\" rel=\"noreferrer noopener\">Finviz website<\/a>. I felt inspired to try and create something similar using the EODHD APIs fundamentals data, Python, and React.js.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2812\" height=\"1572\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png\" alt=\"\" class=\"wp-image-4246\"\/><figcaption class=\"wp-element-caption\">Image from <a href=\"https:\/\/finviz.com\/map.ashx\" target=\"_blank\" rel=\"noreferrer noopener\">Finviz<\/a><\/figcaption><\/figure>\n<\/div>\n\n\n<p>I did some research into what data the EODHD APIs can provide and through which API endpoints. I also investigated what libraries Python and React.js has to create such visualisations. This representation of data is called a treemap.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-sourcing-the-data\">Sourcing the data<\/h2>\n\n\n\n<p>The data we would like to use will come from the EODHD <a href=\"https:\/\/eodhd.com\/financial-apis\/stock-etfs-fundamental-data-feeds\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fundamental APIs<\/a>. In order to retrieve the data we need, you will need a subscription that provides &#8220;<a href=\"https:\/\/eodhd.com\/pricing\" target=\"_blank\" rel=\"noreferrer noopener\">Fundamental Data<\/a>&#8220;. It&#8217;s also important to note that there are daily limits on how much data can be retrieved. While writing this article I did manage to exceed the daily limit on one of the days, which I believe is 5000. The Finviz full tree map by &#8220;Sector&#8221; would require a significant amount of requests. In order to work within the limits I found that there are 4300 &#8220;Common Stocks&#8221; listed in the NASDAQ, so that&#8217;s what was used for this tutorial.<\/p>\n\n\n\n<p>Create yourself a new Python project and install the &#8220;<a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-Python-Financial-Library\" target=\"_blank\" rel=\"noreferrer noopener\">eodhd<\/a>&#8221; Python library, then create yourself a configuration file called &#8220;<strong>config.py<\/strong>&#8221; that looks like this.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2edd41c425fa58ef680d9adcc3dadc4d\"><code lang=\"python\" class=\"language-python\">API_KEY=\"<strong>YOUR API KEY<\/strong>\"<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Create yourself a Python file that will retrieve a list of the &#8220;<strong>Common Stocks<\/strong>&#8221; on the &#8220;<strong>NASDAQ<\/strong>&#8220;. The &#8220;<strong>list_symbols<\/strong>&#8221; variable below contains the list of symbols E.g., &#8220;<strong>AAPL.US<\/strong>&#8220;.<\/p>\n\n\n\n<p>Iterate through the symbols and request the fundamentals data for each symbol. This process can take a while. Once the 4300 entries has been processed, the results are saved in a &#8220;<strong>data.csv<\/strong>&#8221; and &#8220;<strong>data.json<\/strong>&#8221; for further processing.<\/p>\n\n\n\n<p>I had a look through the Fundamental Data (and there is a lot). The information I need is the &#8220;<strong>Sector<\/strong>&#8221; from &#8220;<strong>General<\/strong>&#8221; and the &#8220;<strong>MarketCapitalzation<\/strong>&#8221; from &#8220;<strong>Highlights<\/strong>&#8220;.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-8297f83b6c49419762cbe00262cffdfc\"><code lang=\"python\" class=\"language-python\">import config as cfg\nfrom eodhd import APIClient\n\ndef main() -&gt; None:\n    api = APIClient(cfg.API_KEY)\n\n    df_symbols = api.get_exchange_symbols(\"US\")\n    df_symbols = df_symbols[df_symbols[\"Exchange\"] == \"NASDAQ\"]\n    df_symbols = df_symbols[df_symbols[\"Type\"] == \"Common Stock\"]\n    df_symbols = df_symbols[[\"Code\"]] + \".US\"\n\n    list_symbols = df_symbols[\"Code\"].tolist()\n    # print(list_symbols)\n\n    results = []\n    for ticker in list_symbols:\n        print(f\"Processing: {ticker} :\")\n        json_data = api.get_fundamentals_data(ticker)\n\n        result = {}\n        result[\"Ticker\"] = ticker\n        result[\"Sector\"] = json_data[\"General\"][\"Sector\"]\n        result[\"MarketCapitalization\"] = json_data[\"Highlights\"][\"MarketCapitalization\"]\n        print(result)\n\n        results.append(result)\n        print(\"Length: \", len(results))\n\n    with open(\"data.json\", \"w\") as file:\n        json.dump(results, file, indent=4)\n\n    df = pd.DataFrame(results)\n    df.to_csv(\"data.csv\", index=False)\n    print(df)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-preprocessing-the-data\">Preprocessing the data<\/h2>\n\n\n\n<p>For the next stage, I will read the &#8220;<strong>data.csv<\/strong>&#8221; into a Pandas Dataframe, and preprocess it. The next part can be split into sections. The first section is to filter down the data we require, which in this case will be the &#8220;<strong>Technology<\/strong>&#8221; sector. I noticed there were some null values that we will want to remove with &#8220;<strong>dropna<\/strong>&#8220;, and then convert the column into an integer type.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-cb0917488f5814c0f792d654c43a19e2\"><code lang=\"python\" class=\"language-python\">   df = pd.read_csv(\"data.csv\")\n    df_technology = df[df[\"Sector\"] == \"Technology\"]\n    df_technology = df_technology.dropna(subset=[\"MarketCapitalization\"])\n    df_technology[\"MarketCapitalization\"] = df_technology[\n        \"MarketCapitalization\"\n    ].astype(int)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>I filtered down the dataset by the 10 largest markets by &#8220;<strong>MarketCapitalization<\/strong>&#8220;. The &#8220;<strong>MarketCapitalization<\/strong>&#8221; is listed in millions of USD. I converted this to a percentage, and rounded it to two decimal places to make it more visually appealing.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2632cbd370edadf7b957183721dcd235\"><code lang=\"python\" class=\"language-python\">    df_technology_top10 = df_technology.nlargest(10, \"MarketCapitalization\")\n    df_technology_top10[\"Percentage\"] = ((\n        df_technology_top10[\"MarketCapitalization\"]\n        \/ df_technology_top10[\"MarketCapitalization\"].sum()\n    ) * 100).round(2)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>What I am working towards is a JSON string that can be easily loaded by a React.js application. Typically most libraries will expect at very least columns called &#8220;<strong>name<\/strong>&#8221; and &#8220;<strong>value<\/strong>&#8220;. In some cases &#8220;<strong>children<\/strong>&#8221; will be required too. In order to get to our end state I will drop &#8220;<strong>Sector<\/strong>&#8221; as we know its &#8220;<strong>Technology<\/strong>&#8221; and &#8220;<strong>MarketCapitalization<\/strong>&#8221; as we will use &#8220;<strong>Percentage<\/strong>&#8221; instead. I then renamed the columns to map &#8220;<strong>Ticker<\/strong>&#8221; to &#8220;<strong>name<\/strong>&#8220;, &#8220;<strong>Percentage<\/strong>&#8221; to &#8220;<strong>value<\/strong>&#8220;, and set &#8220;<strong>children<\/strong>&#8221; to None.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-99885c5e5f7678bfcc993c47d4d11cf8\"><code lang=\"python\" class=\"language-python\">    df_technology_top10.drop(columns=[\"Sector\", \"MarketCapitalization\"], inplace=True)\n    df_technology_top10.rename(columns={\"Ticker\": \"name\", \"Percentage\": \"value\"}, inplace=True)\n    df_technology_top10[\"children\"] = None\n    print(df_technology_top10)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Save the results as &#8220;<strong>technology_top10.csv<\/strong>&#8220;, that will be in the input to the React.js application.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-0246449b7da7fc3d591652f7d0c9b996\"><code lang=\"python\" class=\"language-python\">    df_technology_top10.to_csv(\"technology_top10.csv\", index=False)\n    with open(\"technology_top10.json\", \"w\") as file:\n       df_technology_top10.to_json(file, orient=\"records\")<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<h2 class=\"wp-block-heading\" id=\"h-rendering-the-treemap-in-python\">Rendering the Treemap in Python<\/h2>\n\n\n\n<p>There are libraries available to render a treemap in Python. &#8220;<strong>squarify<\/strong>&#8221; which uses &#8220;<strong>matplotlib<\/strong>&#8221; looks like the most common. I tried it out but it did seem very basic.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-04afd7dc27769c5c4ec8b58d62373acd\"><code lang=\"python\" class=\"language-python\">import squarify\nimport matplotlib.pyplot as plt\n\n    labels = df_technology_top10[\"name\"].tolist()\n    sizes = df_technology_top10[\"value\"].tolist()\n\n    squarify.plot(sizes=sizes, label=labels, alpha=0.7, pad=False)\n    plt.axis(\"off\")\n    plt.show()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1770\" height=\"1116\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Python-squarify-treemap.png\" alt=\"\" class=\"wp-image-4247\"\/><figcaption class=\"wp-element-caption\">Screenshot by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>The good news is it worked with minimal code, the bad news is that this is about as good as it gets. You can&#8217;t add additional information easily. It can be done but requires all the blocks to be the same dimensions which defeats the purpose. It&#8217;s useful to know how to do this but I personally don&#8217;t think it&#8217;s all that exciting to look at.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-rendering-the-treemap-in-react-js\">Rendering the Treemap in React.js<\/h2>\n\n\n\n<p>I have my &#8220;<strong>technology_top10.json<\/strong>&#8221; file to use as an input for my React.js web app. It looks like this:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-68a59843e03d736ea76d8dac94937753\"><code lang=\"python\" class=\"language-python\">[{\"name\":\"AAPL.US\",\"value\":34.76,\"children\":null},{\"name\":\"MSFT.US\",\"value\":31.71,\"children\":null},{\"name\":\"NVDA.US\",\"value\":13.24,\"children\":null},{\"name\":\"AVGO.US\",\"value\":5.42,\"children\":null},{\"name\":\"ADBE.US\",\"value\":3.19,\"children\":null},{\"name\":\"ASML.US\",\"value\":3.18,\"children\":null},{\"name\":\"AMD.US\",\"value\":2.41,\"children\":null},{\"name\":\"CSCO.US\",\"value\":2.26,\"children\":null},{\"name\":\"INTC.US\",\"value\":2.0,\"children\":null},{\"name\":\"INTU.US\",\"value\":1.84,\"children\":null}]<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>I will use the standard &#8220;<strong>create-react-app<\/strong>&#8221; tool to create myself a React.js starter application.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-0e7e3a369ce3fa81d8f4a3d465012c09\"><code lang=\"python\" class=\"language-python\">% <strong>npx create-react-app treemap<\/strong> <strong>--template typescript<\/strong><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>When this has completed you should be able to run the React.js with &#8220;<strong>npm run start<\/strong>&#8220;.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-92a4a4c0dec7f50ce56b29b4f0dbef8a\"><code lang=\"python\" class=\"language-python\">% cd treemap \ntreemap % npm run start<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2226\" height=\"1800\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/React.js-create-react-app-1.png\" alt=\"\" class=\"wp-image-4250\"\/><figcaption class=\"wp-element-caption\">Screenshot by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Please note that I&#8217;m using a Typescript template with &#8220;<strong>&#8211;template typescript<\/strong>&#8220;. We are going to use the &#8220;<strong>react-d3-treemap<\/strong>&#8221; library, that you can install in the usual way, &#8220;<strong>npm install react-d3-treemap &#8211;legacy-peer-deps<\/strong>&#8220;.<\/p>\n\n\n\n<p>You will want to make the following adjustments to the default code.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Replace the App.tsx<\/strong>.<\/li>\n<\/ol>\n\n\n\n<p>You will see that I included the contents of the &#8220;<strong>technology_top10.json<\/strong>&#8221; below.  I had to replace the &#8220;<strong>children: null<\/strong>&#8221; with &#8220;<strong>children: []<\/strong>&#8221; to get this to work.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-f80bbaaad2d5997fc09fe12e973f01f4\"><code lang=\"python\" class=\"language-python\">import \".\/App.css\";\nimport TreeMap from \"react-d3-treemap\";\nimport React from \"react\";\n\ninterface TreeMapInPutData {\n  name: string;\n  value?: number;\n  children: Array&lt;TreeMapInPutData&gt; | null;\n  onClick?: any;\n}\n\nexport default class App extends React.Component&lt;\n  unknown,\n  { data: TreeMapInPutData }\n&gt; {\n  private treeMapRef: React.RefObject&lt;TreeMap&lt;TreeMapInPutData&gt;&gt;;\n  constructor(props: {}) {\n    super(props);\n    this.state = {\n      data: {\n        name: \"Technology\",\n        children: [\n          { name: \"AAPL.US\", value: 34.76, children: [] },\n          { name: \"MSFT.US\", value: 31.71, children: [] },\n          { name: \"NVDA.US\", value: 13.24, children: [] },\n          { name: \"AVGO.US\", value: 5.42, children: [] },\n          { name: \"ADBE.US\", value: 3.19, children: [] },\n          { name: \"ASML.US\", value: 3.18, children: [] },\n          { name: \"AMD.US\", value: 2.41, children: [] },\n          { name: \"CSCO.US\", value: 2.26, children: [] },\n          { name: \"INTC.US\", value: 2.0, children: [] },\n          { name: \"INTU.US\", value: 1.84, children: [] },\n        ],\n      },\n    };\n    this.treeMapRef = React.createRef();\n  }\n\n  render() {\n    return (\n      &lt;div className=\"div-style\"&gt;\n        &lt;TreeMap&lt;TreeMapInPutData&gt;\n          nodeStyle={{\n            fontSize: 12,\n            paddingLeft: 10,\n            stroke: \"transparent !important\",\n            alignSelf: \"center !important\",\n            alignContent: \"center !important\",\n          }}\n          data={this.state.data}\n        \/&gt;\n      &lt;\/div&gt;\n    );\n  }\n}\n<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>2. <strong>Replace the App.css<\/strong><\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2ecbb15c7495bcd9b3586f8778baf34a\"><code lang=\"python\" class=\"language-python\">.App {\n  font-family: sans-serif;\n  text-align: center;\n}\n\n.div-style {\n  display: inline-grid;\n  grid-template-columns: 30% 70%;\n}\n<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>3. <strong>Replace the index.jsx<\/strong><\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-fa87202001b07931276fd2b1acfd4bac\"><code lang=\"python\" class=\"language-python\">import { StrictMode } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport App from \".\/App\";\n\nconst rootElement = document.getElementById(\"root\");\nReactDOM.render(\n  &lt;StrictMode&gt;\n    &lt;App \/&gt;\n  &lt;\/StrictMode&gt;,\n  rootElement\n);\n<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>And the result looks like this&#8230;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1248\" height=\"1378\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Technology-top-10-treemap.png\" alt=\"\" class=\"wp-image-4251\"\/><figcaption class=\"wp-element-caption\">Screenshot by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>This looks and works a lot better than the Python alternative. The boxes all have a mouse-over tooltip enabled. The numbers under the symbols is the percentage of the full area.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-summary\">Summary<\/h2>\n\n\n\n<p>You may be wondering why I didn&#8217;t build this all in React.js. There are a number of reasons why I used Python for the data collection and preprocessing.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>React.js works client-side within the user&#8217;s browser. All React.js code, including the EODHD API keys, would be visible to the user. I wanted to make sure that the data requests to the API were secure and used the Python library.<br><\/li>\n\n\n\n<li>React.js connecting to a 3rd party API will almost surely be blocked if it&#8217;s setup correctly. As expected EODHD has CORS filters preventing React.js from communicating directly with it.<br><\/li>\n\n\n\n<li>Retrieving the list of symbols and the fundamental data takes over an hour. This would not be possible front-end within a user&#8217;s browser. It made sense to retrieve the data, pre-process it and then provide the finished result to the React.js web app.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I found this really interesting treemap on the Finviz website. I felt inspired to try and create something similar using the EODHD APIs fundamentals data, Python, and React.js. I did some research into what data the EODHD APIs can provide and through which API endpoints. I also investigated what libraries Python and React.js has to [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"coding-language":[53,30],"ready-to-go-solution":[56],"qualification":[31],"financial-apis-category":[36],"financial-apis-manuals":[37],"class_list":["post-4245","post","type-post","status-publish","format-standard","hentry","category-fundamental-analysis-examples","coding-language-javascript","coding-language-python","ready-to-go-solution-eodhd-python-financial-library","qualification-experienced","financial-apis-category-stock-market-prices","financial-apis-manuals-stocks-fundamentals"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.9 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Creating Treemaps in Python: A Step-by-Step Guide | EODHD APIs Academy<\/title>\n<meta name=\"description\" content=\"Discover how to create a treemap using Python and React.js. Learn about the EODHD APIs and explore the world of data visualization\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Stock Market Treemap in Python\" \/>\n<meta property=\"og:description\" content=\"Discover how to create a treemap using Python and React.js. Learn about the EODHD APIs and explore the world of data visualization\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python\" \/>\n<meta property=\"og:site_name\" content=\"Financial Academy\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-09T13:59:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T14:20:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/0AHow-to-Create-a-Stock-Market-Treemap-in-Python.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1917\" \/>\n\t<meta property=\"og:image:height\" content=\"1128\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Michael Whittle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Whittle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python\"},\"author\":{\"name\":\"Michael Whittle\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\"},\"headline\":\"How to Create a Stock Market Treemap in Python\",\"datePublished\":\"2023-12-09T13:59:27+00:00\",\"dateModified\":\"2025-02-05T14:20:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python\"},\"wordCount\":989,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png\",\"articleSection\":[\"Fundamental Analysis Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python\",\"name\":\"Creating Treemaps in Python: A Step-by-Step Guide | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png\",\"datePublished\":\"2023-12-09T13:59:27+00:00\",\"dateModified\":\"2025-02-05T14:20:38+00:00\",\"description\":\"Discover how to create a treemap using Python and React.js. Learn about the EODHD APIs and explore the world of data visualization\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png\",\"width\":2812,\"height\":1572},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Stock Market Treemap in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"name\":\"Financial APIs Academy | EODHD\",\"description\":\"Financial Stock Market Academy\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\",\"name\":\"Michael Whittle\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"caption\":\"Michael Whittle\"},\"description\":\"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Creating Treemaps in Python: A Step-by-Step Guide | EODHD APIs Academy","description":"Discover how to create a treemap using Python and React.js. Learn about the EODHD APIs and explore the world of data visualization","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:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python","og_locale":"en_US","og_type":"article","og_title":"How to Create a Stock Market Treemap in Python","og_description":"Discover how to create a treemap using Python and React.js. Learn about the EODHD APIs and explore the world of data visualization","og_url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2023-12-09T13:59:27+00:00","article_modified_time":"2025-02-05T14:20:38+00:00","og_image":[{"width":1917,"height":1128,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/0AHow-to-Create-a-Stock-Market-Treemap-in-Python.png","type":"image\/png"}],"author":"Michael Whittle","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"Michael Whittle","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python"},"author":{"name":"Michael Whittle","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad"},"headline":"How to Create a Stock Market Treemap in Python","datePublished":"2023-12-09T13:59:27+00:00","dateModified":"2025-02-05T14:20:38+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python"},"wordCount":989,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png","articleSection":["Fundamental Analysis Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python","url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python","name":"Creating Treemaps in Python: A Step-by-Step Guide | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png","datePublished":"2023-12-09T13:59:27+00:00","dateModified":"2025-02-05T14:20:38+00:00","description":"Discover how to create a treemap using Python and React.js. Learn about the EODHD APIs and explore the world of data visualization","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#primaryimage","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/Finviz-Treemap.png","width":2812,"height":1572},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-treemap-in-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"How to Create a Stock Market Treemap in Python"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-academy\/#website","url":"https:\/\/eodhd.com\/financial-academy\/","name":"Financial APIs Academy | EODHD","description":"Financial Stock Market Academy","publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-academy\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-academy\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad","name":"Michael Whittle","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","caption":"Michael Whittle"},"description":"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).","url":"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-16t","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/4245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/comments?post=4245"}],"version-history":[{"count":4,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/4245\/revisions"}],"predecessor-version":[{"id":6313,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/4245\/revisions\/6313"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=4245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=4245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=4245"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=4245"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=4245"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=4245"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=4245"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=4245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}