You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now wrangler stores a roadway network-hash every time it changes its value in order to detect if other operations need to be rerun or can use stored values (i.e. selections, model network changes, etc).
The hash is a hash of the combined hashes of links and node dataframes which is a hash of the underlying numpy array. This is taking about a second each time it is created for just the ST Paul network, which adds up. This is already only done lazily when it is actually needed so we would need to speed up the actual hash creation.
@propertydefnetwork_hash(self) ->str:
"""Hash of the links and nodes dataframes."""_value=str.encode(self.links_df.df_hash() +"-"+self.nodes_df.df_hash())
_hash=hashlib.sha256(_value).hexdigest()
return_hash
@pd.api.extensions.register_dataframe_accessor("df_hash")classdfHash:
"""Creates a dataframe hash that is compatable with geopandas and various metadata.Definitely not the fastest, but she seems to work where others have failed."""def__init__(self, pandas_obj):
"""Initialization function for the dataframe hash."""self._obj=pandas_objdef__call__(self):
"""Function to hash the dataframe."""_value=str(self._obj.values).encode()
hash=hashlib.sha1(_value).hexdigest()
returnhash
The text was updated successfully, but these errors were encountered:
Right now wrangler stores a roadway network-hash every time it changes its value in order to detect if other operations need to be rerun or can use stored values (i.e. selections, model network changes, etc).
The hash is a hash of the combined hashes of links and node dataframes which is a hash of the underlying numpy array. This is taking about a second each time it is created for just the ST Paul network, which adds up. This is already only done lazily when it is actually needed so we would need to speed up the actual hash creation.
The text was updated successfully, but these errors were encountered: