Closed psalmuel19 closed 2 years ago
The db_name
and test_election
variables should be paths to files on disk - the preprocess command will create a database with all the preprocessed data at that location when you first call preprocess_csv_files. The second argument test_election
needs to be a list of CSV files on disk, you have the first square bracket in the wrong place.
db_name = '/path/to/your/db.db'
coord_net_tk.preprocess.preprocess_csv_files(db_name, ['/path/to/your/csv_file.csv'])
I'm updating the readme as well to reflect these changes, let me know if that resolves your issue.
Thank you @SamHames, it didn't quite work out as I wanted. Then I decided to do a fresh collection since I have Academic Researcher access from Twitter. Would you mind sharing a Twarc script you ever used for such collection, something I can modify quickly?
Thank you @SamHames, it didn't quite work out as I wanted.
Do you mean the code worked, but you didn't find anything interesting?
Would you mind sharing a Twarc script you ever used for such collection, something I can modify quickly?
There are some example uses of twarc in the readme of this package, and there is a longer form tutorial for twarc that's nearly finished here: https://github.com/DocNow/twarc/blob/tutorial/docs/tutorial.md I usually only use the command line interface for both twarc and this package as well.
The choice of data collection is directly tied to what you're trying to accomplish, I don't think a generic script can be much help there - maybe @timothyjgraham has some examples?
This worked eventually. I switched to using terminal to run the twarc2 code and it worked perfectly. Thank you @SamHames and @timothyjgraham
Hi, I am trying to run a CSV file I had to generate the networks but got an error pointing to the db_name part. The columns have been converted to the required structure. See screenshot of error. Thanks for the help.![sLYy35LZ jpg-large](https://user-images.githubusercontent.com/53075630/166395962-14e2b46f-3a40-499e-9e1f-54734d0fc3ea.jpeg)