import warnings
"ignore")
warnings.filterwarnings(#warnings.filterwarnings("default")
import logging
'numba.core.byteflow').setLevel(logging.WARNING)
logging.getLogger("fsspec").setLevel(logging.WARNING) logging.getLogger(
Part 1 - Global Cell Tower Insights: Mapping, Networks, and Country Metrics
# Data analysis
import geopandas as gpd
import numpy as np
import pandas as pd
import intake
import dask
from shapely.geometry import Point
# Plotting
import seaborn as sns
from matplotlib import pyplot as plt
import altair as alt
import holoviews as hv
import hvplot.pandas
import geoviews as gv
import geoviews.tile_sources as gvts
import datashader as ds
import datashader.transfer_functions as tf
from datashader.colors import Greys9, viridis, inferno
from colorcet import fire, kgy, CET_CBL3
# Sci-Kit Learn
from sklearn.preprocessing import StandardScaler, MinMaxScaler, RobustScaler
from sklearn.cluster import KMeans
= 999 pd.options.display.max_columns
Global Tower Topography: Visualizing The Networks Of Cell Connectivity
First and foremost, we start with visualizing cell tower coverage across the world. The OpenCellID database has a dataframe with over 200 million observations of cell towers, which we aggregate and plot using Intake, Dask, and Datashader - parallel computing and data loading plugins for Python. We observe regions with high concentrations of cell towers located primarily in the United States, most of Europe, Japan, and South Korea. We notice dark spots in Central Africa, South America, West Asia, and rural China. The high concentration of cell towers in certain regions reflects not only technological advancement but also economic and urban development. Conversely, the observable gaps in Central Africa, South America, West Asia, and rural China hint at the challenges and disparities in extending telecommunication infrastructure to more remote and less economically developed regions. This understanding of cell tower distribution highlights the interconnectedness of technology, geography, and socio-economic factors on a global scale.
= intake.open_csv('./Data/cell_towers.csv')
ctw = ctw.to_dask() ddf
= ddf['lon'].max().compute()
max_lon = ddf['lon'].min().compute()
min_lon = ddf['lat'].max().compute()
max_lat = ddf['lat'].min().compute()
min_lat
print(f"Max Longitude: {max_lon}, Min Longitude: {min_lon}")
print(f"Max Latitude: {max_lat}, Min Latitude: {min_lat}")
Max Longitude: 179.9732208252, Min Longitude: -179.9732208252
Max Latitude: 78.334579467773, Min Latitude: -54.936431
= (-179.9732208252, 179.9732208252)
global_x_range = (-54.936431, 78.334579467773)
global_y_range
# Default width and height
= 900
global_plot_width = int(global_plot_width*0.5) global_plot_height
= ds.Canvas(
canvas =global_plot_width,
plot_width=global_plot_height,
plot_height=global_x_range,
x_range=global_y_range,
y_range )
= canvas.points(ddf, "lon", "lat", agg=ds.count())
agg = agg.where(agg > 15)
selected =CET_CBL3),"black") tf.set_background(tf.shade(selected, cmap
Next, we can take a closer look at the differences across global cell networks based on the radio system type. This can help us understand the difference in advancement of ICT across different countries. These radio systems are commonly recognized for their roles in supporting mobile networks categorized as “2G,” “3G,” or “4G.” According to the article titled “Difference Between Cellular Technologies: GSM, CDMA, UMTS, and LTE” by Wilson Amplifiers:
- GSM is the standard radio system supporting 2G network
- CDMA is a competitor to GSM also supporting 2G network
- UMTS of the GSM network supports 3G network
- LTE migrates CDMA/CDMA2000 and GSM/UMTS into the 4G network
- NR is a “New Radio” technology supporting 5G network
In this visualization, one can observe that a significant number of global cell towers employ the UMTS radio system, providing support for 3G mobile data. Additionally, specific concentrations of LTE are evident in regions such as the United States, India, East Asia, and Europe.
'radio'] = ddf['radio'].astype('category')
ddf[= {"GSM": "#707390",
color_key "CDMA": "#93b7be",
"UMTS": "#e0ca3c",
"LTE": "#b59ab8",
"NR": "#048a81"}
= canvas.points(ddf, "lon", "lat", agg=ds.count_cat("radio"))
agg = agg.where(agg > 15)
selected =color_key),"black") tf.set_background(tf.shade(selected, color_key
= pd.DataFrame(list(color_key.items()), columns=["radio", "color"])
legend_df
= (alt.Chart(legend_df)
legend ="black", strokeWidth=1)
.mark_rect(stroke
.encode(=alt.Y("radio:N", axis=alt.Axis(title=""), sort=alt.SortField("index")),
y=alt.Color("color:N", legend=None, scale=None),
color# tooltip=["radio", "color"]
)=100, height=120, title="Radio Systems Guide"))
.properties(width
legend
Dominant Types of Global Cell Tower Technologies
Considering the variations in cell tower types, let’s explore the differences in alignment with the country metrics - population and per capita GDP. This analysis aims to examine the correlation between cell tower coverage, type, and the developmental status of countries. In addition to using data from OpenCellID, we incorporate information from the World Bank. The determination of a ‘dominant cell type’ for each country is based on the most prevalent type of cell tower within that nation. Unfortunately, there is no available data on NR (new radio, 5G). The following map depicts the most prevalent cell tower type in each country, providing insight into the technological advancement of their cell tower infrastructure. Noteworthy findings include China, the United States, Norway, Australia, and Japan leading with 4G LTE technology. It’s also important to note that not all countries have sufficient data and thus, excluded from our analysis.
= pd.read_csv("./Data/gdp_per_capita.csv") #data from world bank
gdp_per_capita = gdp_per_capita[['Country Name', '2021 [YR2021]']]
gdp_per_capita = gdp_per_capita.rename(columns={
gdp_per_capita 'Country Name': 'country',
'2021 [YR2021]': 'gdp_per_capita'
})= gdp_per_capita.dropna(subset=['country'])
gdp_per_capita = pd.read_csv("./data/population.csv") #data from world bank
population = population[['Country Name', '2021 [YR2021]']]
population = population.rename(columns={
population 'Country Name': 'country',
'2021 [YR2021]': 'population'
})= population.dropna(subset=['country'])
population = population.merge(gdp_per_capita, how='left', on='country') gpc_pop
= gpd.read_file("https://datahub.io/core/geo-countries/r/countries.geojson")
countries = countries[['ADMIN', 'geometry']]
countries = countries.rename(columns={'ADMIN': 'country'}) countries
= countries.merge(gpc_pop, how='left', on='country') gpc_pop_countries
= pd.read_csv("./Data/international_cell_towers.csv") countries_towers
= countries_towers.merge(gpc_pop_countries, how='left', on='country')
merge ={'UMES': 'UMTS'}, inplace=True) merge.rename(columns
= ['UMTS', 'GSM', 'LTE', 'CDMA']
tower_types 'dominant_tower_type'] = merge[tower_types].idxmax(axis=1) merge[
'cell_towers'] = pd.to_numeric(merge['cell_towers'], errors='coerce')
merge['population'] = pd.to_numeric(merge['population'], errors='coerce')
merge['gdp_per_capita'] = pd.to_numeric(merge['gdp_per_capita'], errors='coerce')
merge['ctw_per_capita'] = merge['cell_towers'] / merge['population']
merge[= gpd.GeoDataFrame(merge, geometry='geometry')
merge = merge.dropna(subset=['geometry'])
merge = merge.to_crs('EPSG:3857') merge
%%opts WMTS [width=global_plot_width, height=global_plot_height, xaxis=None, yaxis=None]
= merge.hvplot(
choro ="dominant_tower_type",
c=600,
frame_width=600,
frame_height=0.5,
alpha=True,
geo='EPSG:3857',
crs="kgy",
cmap=["country"],
hover_cols='geometry',
geometry
)
* choro gvts.EsriImagery
WARNING:param.main: geometry option not found for polygons plot; similar options include: []