This post will introduce how to visualize the adoption of innovation (dummy variable) on the map with the use of scatter_mapbox, a mighty tool to realize animation.

Table of Contents

  1. Step 1. import all needed packages

Step 1. import all needed packages

1
2
3
4
5
6
7
8
9
10
11
import numpy as np
import pandas as pd

import chart_studio.plotly as py
import plotly.tools as tls
import plotly.express as px

import json

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"