safegraphinc / safegraph_py Goto Github PK
View Code? Open in Web Editor NEWPython code for common, repeatable data wrangling and analysis of SafeGraph data
License: Apache License 2.0
Python code for common, repeatable data wrangling and analysis of SafeGraph data
License: Apache License 2.0
If you try to call explode_json_array on destination_cbgs column from the social distancing data set you will get an error when calling pandas explode function
day_visits_exp = df[[place_key, file_key, array_column+'_json']].explode(array_column+'_json')
Error thrown: "KeyError: 0"
This is the error you get when trying to explode a column contain a json that has data stored as {"string" : integer}
I think in our case we get this error because if you try to express 012345 to an integer you get an error because an integer cannot start with a 0.
I have tried to install the safegraph_py package as provided in the readme documentation 'pip install -q --upgrade git+https://github.com/SafeGraphInc/safegraph_py'; I created a new environment on juypter lab and installed pandas, numpy, and matplotlib. But, however, when I copy and run the script sgpy.test_me(), sgpy.help(), I get an AttributeError like:
AttributeError Traceback (most recent call last)
Cell In[5], line 3
1 # test the library
----> 3 sgpy.test_me()
AttributeError: module 'safegraph_py_functions.safegraph_py_functions' has no attribute 'test_me'
Could you help by any chance. Thanks.
hello
how to get data set mentioned in
https://towardsdatascience.com/out-of-memory-computation-using-wsl-and-turicreate-84667412e32b
Before we dive into the setup, lets see what happens when we try to load in ~25GB of uncompressed .csv foot traffic SDM data (3.8 million rows and 25 columns), courtesy of Safegraph
I can't get the package to work locally or with your colab link - https://colab.research.google.com/drive/1V7hnyYuY_dUXQEPkCMZkgMuBFQV4iA_4?usp=sharing.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-6eeabfa33c5b> in <module>()
1 # test the library
2
----> 3 sgpy.test_me()
AttributeError: module 'safegraph_py_functions.safegraph_py_functions' has no attribute 'test_me'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-33e3550b5423> in <module>()
1 ### Type sgpy.help() to get a list of active functions and a brief description of what they do / required arguments
2
----> 3 sgpy.help()
AttributeError: module 'safegraph_py_functions.safegraph_py_functions' has no attribute 'help'
Any ideas?
This package has dependencies on at least 3 other packages that are not declared as dependencies in setup.py. Please add them to the install_requires
or extras_require
section of the setup.py file. See the setuptools user guide for more information.
safegraph_py/safegraph_py_functions/cbg_functions.py
Lines 10 to 13 in 6941a2e
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.