From 2684b4b8c7deba112966966c6ae5ff1234c398e8 Mon Sep 17 00:00:00 2001 From: procrastimax Date: Sun, 18 Jun 2023 15:03:41 +0200 Subject: [PATCH] Adds requirements.txt --- requirements.txt | 6 ++++++ src/general_analysis.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..762eb745 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +numpy==1.25.0 +pandas==2.0.2 +python-dateutil==2.8.2 +pytz==2023.3 +six==1.16.0 +tzdata==2023.3 diff --git a/src/general_analysis.py b/src/general_analysis.py index 2e5d2807..6f4266a1 100644 --- a/src/general_analysis.py +++ b/src/general_analysis.py @@ -20,7 +20,7 @@ count_tweets = tweets_all_combined["tweet_id"].value_counts().shape[0] count_police_accounts = tweets_all_combined["user_id"].value_counts().shape[0] date_first_tweet = datetime.strptime(tweets_all_combined['created_at'].min(), date_format_str) date_last_tweet = datetime.strptime(tweets_all_combined['created_at'].max(), date_format_str) -day_diff = (date_last_tweet-date_first_tweet).days +day_diff = (date_last_tweet - date_first_tweet).days def hr_func(ts):