Comments on: Scraping, extracting and mapping geodata from Twitter https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/?utm_source=rss&utm_medium=rss&utm_campaign=scraping-extracting-mapping-geodata-twitter Geographer. Data Scientist. Researcher. Mon, 16 Dec 2019 20:49:17 +0000 hourly 1 By: Fabio https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/#comment-20966 Mon, 16 Dec 2019 20:49:17 +0000 https://mikaelbrunila.fi/?p=248#comment-20966 In reply to Naveen.

I had the same problem.

]]>
By: Ankit Gupta https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/#comment-14418 Fri, 22 Mar 2019 20:20:33 +0000 https://mikaelbrunila.fi/?p=248#comment-14418 In reply to Naveen.

@Naveen
Were you able to resolve the error?

]]>
By: Naveen https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/#comment-7133 Fri, 08 Feb 2019 14:00:40 +0000 https://mikaelbrunila.fi/?p=248#comment-7133 JSONDecodeError: Expecting value: line 2 column 1 (char 1)

]]>
By: John B Dougherty https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/#comment-3550 Mon, 03 Dec 2018 07:35:26 +0000 https://mikaelbrunila.fi/?p=248#comment-3550 hi Mikael,

Regarding the script to output geoJSON, it works but reports some values for geo_tweets that are greater than total_tweets, both with line 51 commented and not.

My in-file is one line per tweet so that checks out:

prompt:~/Brunila/process$ wc -l self-driving_2018-11-26.json
468 self-driving_2018-11-26.json

The file included 446 unique users who tweeted with or without geo data
The file included 353 unique users who tweeted with geo data, including ‘location’
The users with geo data tweeted 720 out of the total 468 of tweets.

My output count reconciles:
prompt:~/Brunila/process$ grep ‘”user_id”:’ geo_data.self-driving_2018-11-26.json | wc -l
353

comment the conditional line 51:

The file included 446 unique users who tweeted with or without geo data
The file included 438 unique users who tweeted with geo data, including ‘location’
The users with geo data tweeted 898 out of the total 468 of tweets.

prompt:~/Brunila/process$ grep ‘”user_id”:’ geo_data.self-driving_2018-11-26.json | wc -l
438

Big thanks for sharing this script. If I figure out what seems to be counted twice I’ll be sure to share.

]]>
By: Pyhon3.4 TypeError: 'dict_keys' object does not support indexing | Mobilapka.cloud https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/#comment-2050 Sat, 19 May 2018 08:03:59 +0000 https://mikaelbrunila.fi/?p=248#comment-2050 […] am following this guide https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/ to scrape some tweets using python and geomap […]

]]>
By: Margarida Madaleno https://mikaelbrunila.fi/2017/03/27/scraping-extracting-mapping-geodata-twitter/#comment-1015 Thu, 12 Oct 2017 15:17:05 +0000 https://mikaelbrunila.fi/?p=248#comment-1015 Hi,

Hope this message finds you well. Thank you for posting this, it’s fantastic.

I’m a researcher working on scraping geo-tagged Tweets. I’m only interested in the first category of geocoding that you suggest (i.e. precise coordinates). My question is, why didn’t you just do a bounding box within the stream.filter command? (See here: https://github.com/Ccantey/GeoSearch-Tweepy/blob/master/GeoTweepy.py). I’m asking because I wonder whether the bounding box only provides Tweets of type 1 (exact coordinates), or whether it also includes type 2 and 3 Tweets.

If the latter is true, I was thinking of running a script similar to the one you describe above, except using the bounding box as an initial search filter (instead of the hashtag you used), and then excluding your second and third iteration steps.

Thanks in advance!

]]>