I am using geopandas
to read the shapefile of municipalities of Switzerland, i.e municipalities.shp
. For 170 I have the info of the population, i.e. population.csv
The files from can be found in this repo here.
Is it possible to merge the information trough the so called BFS number
.
import pandas as pd
import geopandas
mun = geopandas.read_file('municipalities.shp')
pop = pd.read_csv('population.csv')
## merge data
mergedData = pd.merge(mun,pop,left_on='BFS_NUMMER',right_on='BFS')
Now for each of the 170 municipalities I have the geographic information and the info of the population.
I would like to know if I can use pysal
to check if the population of these 170 municipalities is spatially autocorrelated.