0
votes

I want to create a grid of Beijing based on Geohashes using Python. I've tried to use scikit-mobility library but I need to use something like python-geohash library for more accuracy.

import skmob
from skmob.tessellation import tilers
import pandas as pd
from skmob.preprocessing import filtering
df1 = pd.read_csv('./allPechino.csv')
tdf = skmob.TrajDataFrame(df1, latitude = 'latitude',longitude  = 'longitude', user_id='taxi_id',datetime='date_time')




tessellation = tilers.tiler.get("squared", base_shape="Beijing, China", meters=15000)
# counting movements that start and end in the same tile
fdf = tdf.to_flowdataframe(tessellation=tessellation, 
self_loops=True)
print(fdf.head())

I create a OD-matrix usign scikit-mobility library and this is the result

  origin destination  flow
  101         101     3
  101         116     1
  101         117     1
  103         103  1151
  103         104     9

After that I plot the FlowDataFrame on a Folium map

  m= fdf.plot_flows(flow_color='red')
  m

Now my question is: How can I do the same thing using python-geohash library?

Whats the question? where is your code. what isnt working?Chris Doyle