Usage¶
geoso can be used in two different ways.
Using geoso in a python script¶
To use geoso in a project:
1 | |
Using geoso CLI¶
After installing geoso, e.g., in a python environment, you can simply execute geoso in command line to get access to provided functionality.
1 | |
To see the possible commands under geoso CLI, use the following command:
1 | |
Retrieve tweets from the Streaming API¶
To retrieve tweets for a particular bounding box from Twitter Streaming API and save it in a PostgreSQL database (with PostGIS extension) or in a folder as JSON Lines files, use the following command:
1 | |
You should provide the proper input options for the command to work properly. To see the list of available options, execute the command with --help option, as follows:
1 | |
Retrieve information about the tweets that were saved in the database¶
To retrieve information about the tweets that have been already saved in the database, use the following command.
1 | |
You should provide the proper input options for the command to work properly. To see the list of available options, execute the command with --help option.
Export tweets from the database to a CSV file¶
To export tweets from the database to a CSV (comma separated values) file, use the following command:
1 | |
You should provide the proper input options for the command to work properly. To see the list of available options, execute the command with --help option.
Import tweets from JSON Lines files to the database¶
Whenever you have some tweets saved in a JSON Lines file, you can use the following command to import those tweets into your PostgreSQL database:
1 | |
If you have more than one JSON Lines file, saved in a folder on your machine, the following command can be used to import them collectively into your database:
1 | |
You should provide the proper input options for above commands to work properly. To see the list of available options, execute the command with --help option.