copbird_aufarbeitung/ergebnisse_hackathon_repo/team-16/notebooks/simons-notebook.ipynb

1788 lines
88 KiB
Text
Raw Normal View History

2023-03-26 16:36:49 +00:00
{
"cells": [
{
"cell_type": "markdown",
"id": "112e14ce",
"metadata": {},
"source": [
"## Merge state data and user data"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "e75eccbf",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"\n",
"tw_tweets = pd.read_csv(r'..\\data\\copbird_table_tweet.csv')\n",
"tw_user_data = pd.read_csv(r'..\\data\\copbird_table_user.csv')\n",
"tw_pol_geo_data = pd.read_csv(r'..\\geolocations\\polizei_accounts_geo.csv', delimiter='\\t')"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "be63403d",
"metadata": {},
"outputs": [],
"source": [
"def add_state_to_user_df():\n",
" tw_user_df = tw_user_data.rename(columns={\"id\": \"user_id\"})\n",
" tw_pol_geo_df = tw_pol_geo_data.rename(columns={\"Name\": \"name\", \"Bundesland\": \"bundesland\", \"Stadt\": \"stadt\"})\n",
"\n",
" # merge tw_pol_geo_df into tw_user_df on key_col ('name') and only add col 'bundesland' to new df based on user_df\n",
" return pd.merge(tw_user_df, tw_pol_geo_df[['name', 'stadt', 'bundesland']], on='name', how='left')"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "a9093ae6",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>user_id</th>\n",
" <th>name</th>\n",
" <th>handle</th>\n",
" <th>stadt</th>\n",
" <th>bundesland</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1032561433102434304</td>\n",
" <td>Polizei Wittlich</td>\n",
" <td>PolizeiWittlich</td>\n",
" <td>Wittlich</td>\n",
" <td>Rheinland-Pfalz</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1143867545226764293</td>\n",
" <td>Bayerisches Landeskriminalamt</td>\n",
" <td>LKA_Bayern</td>\n",
" <td>München</td>\n",
" <td>Bayern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1169206134189830145</td>\n",
" <td>Polizei Stendal</td>\n",
" <td>Polizei_SDL</td>\n",
" <td>Stendal</td>\n",
" <td>Sachsen-Anhalt</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1184024283342950401</td>\n",
" <td>Polizei Ravensburg</td>\n",
" <td>PolizeiRV</td>\n",
" <td>Ravensburg</td>\n",
" <td>Baden-Württemberg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1232548941889228808</td>\n",
" <td>Polizei Bad Nenndorf</td>\n",
" <td>Polizei_BadN</td>\n",
" <td>Bad Nenndorf</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>1295978598034284546</td>\n",
" <td>Polizei ZPD NI</td>\n",
" <td>Polizei_ZPD_NI</td>\n",
" <td>Hannover</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>1487390240</td>\n",
" <td>Polizei Koblenz</td>\n",
" <td>Polizei_KO</td>\n",
" <td>Koblenz</td>\n",
" <td>Rheinland-Pfalz</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>1968267000</td>\n",
" <td>Polizei Mainz</td>\n",
" <td>PolizeiMainz</td>\n",
" <td>Mainz</td>\n",
" <td>Rheinland-Pfalz</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>1979596724</td>\n",
" <td>Polizei NRW OB</td>\n",
" <td>polizei_nrw_ob</td>\n",
" <td>Oberhausen</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>2176104583</td>\n",
" <td>Polizei Rheinpfalz</td>\n",
" <td>PP_Rheinpfalz</td>\n",
" <td>Ludwigshafen am Rhein</td>\n",
" <td>Rheinland-Pfalz</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" user_id name handle \\\n",
"0 1032561433102434304 Polizei Wittlich PolizeiWittlich \n",
"1 1143867545226764293 Bayerisches Landeskriminalamt LKA_Bayern \n",
"2 1169206134189830145 Polizei Stendal Polizei_SDL \n",
"3 1184024283342950401 Polizei Ravensburg PolizeiRV \n",
"4 1232548941889228808 Polizei Bad Nenndorf Polizei_BadN \n",
"5 1295978598034284546 Polizei ZPD NI Polizei_ZPD_NI \n",
"6 1487390240 Polizei Koblenz Polizei_KO \n",
"7 1968267000 Polizei Mainz PolizeiMainz \n",
"8 1979596724 Polizei NRW OB polizei_nrw_ob \n",
"9 2176104583 Polizei Rheinpfalz PP_Rheinpfalz \n",
"\n",
" stadt bundesland \n",
"0 Wittlich Rheinland-Pfalz \n",
"1 München Bayern \n",
"2 Stendal Sachsen-Anhalt \n",
"3 Ravensburg Baden-Württemberg \n",
"4 Bad Nenndorf Niedersachsen \n",
"5 Hannover Niedersachsen \n",
"6 Koblenz Rheinland-Pfalz \n",
"7 Mainz Rheinland-Pfalz \n",
"8 Oberhausen Nordrhein-Westfalen \n",
"9 Ludwigshafen am Rhein Rheinland-Pfalz "
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"add_state_to_user_df()[:10]"
]
},
{
"cell_type": "markdown",
"id": "f7f32d78",
"metadata": {},
"source": [
"## insert state data into tweet data"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "20d4a15a",
"metadata": {},
"outputs": [],
"source": [
"def add_state_to_tweets_df():\n",
" tw_tweets_ext = pd.merge(tw_tweets, add_state_to_user_df()[['user_id', 'stadt', 'bundesland', 'name', 'handle'\n",
" ]], on='user_id', how='left')\n",
" return tw_tweets_ext[['id', 'tweet_text', 'created_at', 'user_id', 'name', 'handle', 'stadt', 'bundesland'\n",
" ]].rename(columns={'id': 'tweet_id', 'name': 'user_name'})"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "7c9f4add",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>tweet_id</th>\n",
" <th>tweet_text</th>\n",
" <th>created_at</th>\n",
" <th>user_id</th>\n",
" <th>user_name</th>\n",
" <th>handle</th>\n",
" <th>stadt</th>\n",
" <th>bundesland</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1321021123463663616</td>\n",
" <td>@mahanna196 Da die Stadt keine Ausnahme für Ra...</td>\n",
" <td>2020-10-27 09:29:13</td>\n",
" <td>778895426007203840</td>\n",
" <td>Polizei Oldenburg-Stadt/Ammerl</td>\n",
" <td>Polizei_OL</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1321023114071969792</td>\n",
" <td>#Zeugengesucht\\nDie Hintergründe zu dem Tötung...</td>\n",
" <td>2020-10-27 09:37:08</td>\n",
" <td>2397974054</td>\n",
" <td>Polizei Berlin</td>\n",
" <td>polizeiberlin</td>\n",
" <td>Berlin</td>\n",
" <td>Berlin</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1321025127388188673</td>\n",
" <td>RT @bka: EUROPE´S MOST WANTED Sexualstraftät...</td>\n",
" <td>2020-10-27 09:45:08</td>\n",
" <td>2397974054</td>\n",
" <td>Polizei Berlin</td>\n",
" <td>polizeiberlin</td>\n",
" <td>Berlin</td>\n",
" <td>Berlin</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1321028108665950208</td>\n",
" <td>@StrupeitVolker Wir verstehen nicht so recht w...</td>\n",
" <td>2020-10-27 09:56:59</td>\n",
" <td>2810902381</td>\n",
" <td>Polizei München</td>\n",
" <td>PolizeiMuenchen</td>\n",
" <td>München</td>\n",
" <td>Bayern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1321029199998656513</td>\n",
" <td>Wir unterstützen das @bka bei der #Öffentlichk...</td>\n",
" <td>2020-10-27 10:01:19</td>\n",
" <td>223758384</td>\n",
" <td>Polizei Sachsen</td>\n",
" <td>PolizeiSachsen</td>\n",
" <td>Dresden</td>\n",
" <td>Sachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>1321029204964745218</td>\n",
" <td>Heute früh brannte es auf unserem Sicherstellu...</td>\n",
" <td>2020-10-27 10:01:20</td>\n",
" <td>2397974054</td>\n",
" <td>Polizei Berlin</td>\n",
" <td>polizeiberlin</td>\n",
" <td>Berlin</td>\n",
" <td>Berlin</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>1321031650483019776</td>\n",
" <td>Als ein Supermarktmitarbeiter in #Fürstenwalde...</td>\n",
" <td>2020-10-27 10:11:03</td>\n",
" <td>720244303566483456</td>\n",
" <td>Polizei Brandenburg</td>\n",
" <td>PolizeiBB</td>\n",
" <td>Potsdam</td>\n",
" <td>Brandenburg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>1321031765209829379</td>\n",
" <td>Auf der Waldecker Straße haben bislang unbekan...</td>\n",
" <td>2020-10-27 10:11:31</td>\n",
" <td>2389222849</td>\n",
" <td>Polizei NRW DU</td>\n",
" <td>polizei_nrw_du</td>\n",
" <td>Duisburg</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>1321032307277443072</td>\n",
" <td>@Sitewinder Es handelte sich um einen 22-jähri...</td>\n",
" <td>2020-10-27 10:13:40</td>\n",
" <td>720244303566483456</td>\n",
" <td>Polizei Brandenburg</td>\n",
" <td>PolizeiBB</td>\n",
" <td>Potsdam</td>\n",
" <td>Brandenburg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>1321033945467834368</td>\n",
" <td>@GunstickULM Es bestand der Verdacht, dass Pla...</td>\n",
" <td>2020-10-27 10:20:10</td>\n",
" <td>720244303566483456</td>\n",
" <td>Polizei Brandenburg</td>\n",
" <td>PolizeiBB</td>\n",
" <td>Potsdam</td>\n",
" <td>Brandenburg</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" tweet_id tweet_text \\\n",
"0 1321021123463663616 @mahanna196 Da die Stadt keine Ausnahme für Ra... \n",
"1 1321023114071969792 #Zeugengesucht\\nDie Hintergründe zu dem Tötung... \n",
"2 1321025127388188673 RT @bka: EUROPE´S MOST WANTED Sexualstraftät... \n",
"3 1321028108665950208 @StrupeitVolker Wir verstehen nicht so recht w... \n",
"4 1321029199998656513 Wir unterstützen das @bka bei der #Öffentlichk... \n",
"5 1321029204964745218 Heute früh brannte es auf unserem Sicherstellu... \n",
"6 1321031650483019776 Als ein Supermarktmitarbeiter in #Fürstenwalde... \n",
"7 1321031765209829379 Auf der Waldecker Straße haben bislang unbekan... \n",
"8 1321032307277443072 @Sitewinder Es handelte sich um einen 22-jähri... \n",
"9 1321033945467834368 @GunstickULM Es bestand der Verdacht, dass Pla... \n",
"\n",
" created_at user_id user_name \\\n",
"0 2020-10-27 09:29:13 778895426007203840 Polizei Oldenburg-Stadt/Ammerl \n",
"1 2020-10-27 09:37:08 2397974054 Polizei Berlin \n",
"2 2020-10-27 09:45:08 2397974054 Polizei Berlin \n",
"3 2020-10-27 09:56:59 2810902381 Polizei München \n",
"4 2020-10-27 10:01:19 223758384 Polizei Sachsen \n",
"5 2020-10-27 10:01:20 2397974054 Polizei Berlin \n",
"6 2020-10-27 10:11:03 720244303566483456 Polizei Brandenburg \n",
"7 2020-10-27 10:11:31 2389222849 Polizei NRW DU \n",
"8 2020-10-27 10:13:40 720244303566483456 Polizei Brandenburg \n",
"9 2020-10-27 10:20:10 720244303566483456 Polizei Brandenburg \n",
"\n",
" handle stadt bundesland \n",
"0 Polizei_OL NaN NaN \n",
"1 polizeiberlin Berlin Berlin \n",
"2 polizeiberlin Berlin Berlin \n",
"3 PolizeiMuenchen München Bayern \n",
"4 PolizeiSachsen Dresden Sachsen \n",
"5 polizeiberlin Berlin Berlin \n",
"6 PolizeiBB Potsdam Brandenburg \n",
"7 polizei_nrw_du Duisburg Nordrhein-Westfalen \n",
"8 PolizeiBB Potsdam Brandenburg \n",
"9 PolizeiBB Potsdam Brandenburg "
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"add_state_to_tweets_df()[:10]"
]
},
{
"cell_type": "markdown",
"id": "327f77a1",
"metadata": {},
"source": [
"## Mapping citys/police stations from Pressemitteilungen and twitter-data"
]
},
{
"cell_type": "markdown",
"id": "de1410ce",
"metadata": {},
"source": [
"### Extract cities, user_id from Pressemitteilungen and Tweets"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "387de0f4",
"metadata": {},
"outputs": [],
"source": [
"def map_bl_tw_citys():\n",
" import re\n",
" df_blaulicht = pd.read_csv(r'..\\mod_data\\2020-12_2021-05_presseportal.csv')\n",
" df_blaulicht.sort_index(inplace=True)\n",
" tw_locations = list(df_tw_user[['stadt', 'user_id']].itertuples(index=False, name=None))\n",
" tw_locations = [(loc, id) for loc, id in tw_locations if len(str(loc)) > 1]\n",
" bl_locations = list(set([str(city) for city in df_blaulicht['location'].values]))\n",
" bl_tw_locations = {}\n",
" for bl_loc in bl_locations:\n",
" for tw_loc, tw_id in tw_locations:\n",
" if re.search(r'\\b' + re.escape(str(tw_loc).lower()) + r'\\b', str(bl_loc).lower()):\n",
" bl_tw_locations[bl_loc] = [tw_loc, tw_id]\n",
" return bl_tw_locations"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "cd8b388a",
"metadata": {},
"outputs": [],
"source": [
"def find_location(txt, mp):\n",
" mapped_blaulicht = mp.get(txt, \"\")\n",
" return mapped_blaulicht[1] if mapped_blaulicht != \"\" else \"\""
]
},
{
"cell_type": "markdown",
"id": "5c29d275",
"metadata": {},
"source": [
"### Add col tw_user_id to Blaulichtmeldungen"
]
},
{
"cell_type": "code",
"execution_count": 51,
"id": "5ee5a263",
"metadata": {},
"outputs": [],
"source": [
"def extend_blaulicht_data():\n",
" df_blaulicht = concat_blaulicht_dfs()\n",
" mapping = map_bl_tw_citys()\n",
" df_blaulicht['tw_user_id'] = df_blaulicht['location'].apply(lambda x: find_location(x, mapping))\n",
" return df_blaulicht"
]
},
{
"cell_type": "code",
"execution_count": 52,
"id": "f869435d",
"metadata": {},
"outputs": [
{
"ename": "FileNotFoundError",
"evalue": "[Errno 2] No such file or directory: '..\\\\mod_data\\x820-12_2021-05_presseportal.csv'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-52-99cb996bfb79>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mextend_blaulicht_data\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;32m<ipython-input-51-e2ff330579db>\u001b[0m in \u001b[0;36mextend_blaulicht_data\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mextend_blaulicht_data\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[0mdf_blaulicht\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconcat_blaulicht_dfs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mmapping\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mmap_bl_tw_citys\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mdf_blaulicht\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'tw_user_id'\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdf_blaulicht\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'location'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mapply\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;32mlambda\u001b[0m \u001b[0mx\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mfind_location\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmapping\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mdf_blaulicht\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m<ipython-input-49-ad9dc4eef61d>\u001b[0m in \u001b[0;36mmap_bl_tw_citys\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mmap_bl_tw_citys\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mre\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mdf_blaulicht\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mread_csv\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'..\\mod_data\\2020-12_2021-05_presseportal.csv'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mdf_blaulicht\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msort_index\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0minplace\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[0mtw_locations\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdf_tw_user\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'stadt'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'user_id'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mitertuples\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\users\\simon\\programming\\hackathons\\copbird-group-16\\copbird-venv\\lib\\site-packages\\pandas\\io\\parsers.py\u001b[0m in \u001b[0;36mread_csv\u001b[1;34m(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision, storage_options)\u001b[0m\n\u001b[0;32m 608\u001b[0m \u001b[0mkwds\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mupdate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkwds_defaults\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 609\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 610\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0m_read\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfilepath_or_buffer\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 611\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 612\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\users\\simon\\programming\\hackathons\\copbird-group-16\\copbird-venv\\lib\\site-packages\\pandas\\io\\parsers.py\u001b[0m in \u001b[0;36m_read\u001b[1;34m(filepath_or_buffer, kwds)\u001b[0m\n\u001b[0;32m 460\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 461\u001b[0m \u001b[1;31m# Create the parser.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 462\u001b[1;33m \u001b[0mparser\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mTextFileReader\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfilepath_or_buffer\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwds\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 463\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 464\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mchunksize\u001b[0m \u001b[1;32mor\u001b[0m \u001b[0miterator\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\users\\simon\\programming\\hackathons\\copbird-group-16\\copbird-venv\\lib\\site-packages\\pandas\\io\\parsers.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, f, engine, **kwds)\u001b[0m\n\u001b[0;32m 817\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0moptions\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"has_index_names\"\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mkwds\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"has_index_names\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 818\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 819\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_make_engine\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mengine\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 820\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 821\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mclose\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\users\\simon\\programming\\hackathons\\copbird-group-16\\copbird-venv\\lib\\site-packages\\pandas\\io\\parsers.py\u001b[0m in \u001b[0;36m_make_engine\u001b[1;34m(self, engine)\u001b[0m\n\u001b[0;32m 1048\u001b[0m )\n\u001b[0;32m 1049\u001b[0m \u001b[1;31m# error: Too many arguments for \"ParserBase\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1050\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mmapping\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mengine\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mf\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0moptions\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;31m# type: ignore[call-arg]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1051\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1052\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0m_failover_to_python\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\users\\simon\\programming\\hackathons\\copbird-group-16\\copbird-venv\\lib\\site-packages\\pandas\\io\\parsers.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, src, **kwds)\u001b[0m\n\u001b[0;32m 1865\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1866\u001b[0m \u001b[1;31m# open handles\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1867\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_open_handles\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msrc\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mkwds\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1868\u001b[0m \u001b[1;32massert\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mhandles\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1869\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mkey\u001b[0m \u001b[1;32min\u001b[0m \u001b[1;33m(\u001b[0m\u001b[1;34m\"storage_options\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"encoding\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"memory_map\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m\"compression\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\users\\simon\\programming\\hackathons\\copbird-group-16\\copbird-venv\\lib\\site-packages\\pandas\\io\\parsers.py\u001b[0m in \u001b[0;36m_open_handles\u001b[1;34m(self, src, kwds)\u001b[0m\n\u001b[0;32m 1360\u001b[0m \u001b[0mLet\u001b[0m \u001b[0mthe\u001b[0m \u001b[0mreaders\u001b[0m \u001b[0mopen\u001b[0m \u001b[0mIOHanldes\u001b[0m \u001b[0mafter\u001b[0m \u001b[0mthey\u001b[0m \u001b[0mare\u001b[0m \u001b[0mdone\u001b[0m \u001b[1;32mwith\u001b[0m \u001b[0mtheir\u001b[0m \u001b[0mpotential\u001b[0m \u001b[0mraises\u001b[0m\u001b[1;33m.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1361\u001b[0m \"\"\"\n\u001b[1;32m-> 1362\u001b[1;33m self.handles = get_handle(\n\u001b[0m\u001b[0;32m 1363\u001b[0m \u001b[0msrc\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1364\u001b[0m \u001b[1;34m\"r\"\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\users\\simon\\programming\\hackathons\\copbird-group-16\\copbird-venv\\lib\\site-packages\\pandas\\io\\common.py\u001b[0m in \u001b[0;36mget_handle\u001b[1;34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[0m\n\u001b[0;32m 640\u001b[0m \u001b[0merrors\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m\"replace\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 641\u001b[0m \u001b[1;31m# Encoding\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 642\u001b[1;33m handle = open(\n\u001b[0m\u001b[0;32m 643\u001b[0m \u001b[0mhandle\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 644\u001b[0m \u001b[0mioargs\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmode\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '..\\\\mod_data\\x820-12_2021-05_presseportal.csv'"
]
}
],
"source": [
"extend_blaulicht_data()[:10]"
]
},
{
"cell_type": "markdown",
"id": "2b756af2",
"metadata": {},
"source": [
"## Extract tweets from specific topic by keywords"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "89fb5ba0",
"metadata": {},
"outputs": [],
"source": [
"def get_topics_by_str_lst(topic, df, col_name):\n",
" df_topiced = df[df[col_name].str.contains('|'.join(topic))]\n",
" return df_topiced"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "7b545748",
"metadata": {},
"outputs": [],
"source": [
"topic_1 = ['demonstr', 'kundgeb']\n",
"topic_2 = ['drogen', 'weed', 'graas', 'lsd', 'cannabis', 'ecstasy', 'kokain', 'meth', 'crystal']\n",
"topic_3 = ['rassis', 'diskriminier', 'ausländerfeindlich', 'fremdenfeindlich', 'fremdenhass']\n",
"topic_4 = ['antisem', 'juden', 'synagoge', 'judenhass', 'judenfeindlich', 'holocaust']"
]
},
{
"cell_type": "code",
"execution_count": 55,
"id": "9bb43006",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>tweet_id</th>\n",
" <th>tweet_text</th>\n",
" <th>created_at</th>\n",
" <th>user_id</th>\n",
" <th>user_name</th>\n",
" <th>handle</th>\n",
" <th>stadt</th>\n",
" <th>bundesland</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1031</th>\n",
" <td>1322543875169333250</td>\n",
" <td>Freitagabend beleidigten zwei Männer eine 20-j...</td>\n",
" <td>2020-10-31 14:20:06</td>\n",
" <td>808666671468658688</td>\n",
" <td>Polizei Bremen</td>\n",
" <td>BremenPolizei</td>\n",
" <td>Bremen</td>\n",
" <td>Bremen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1239</th>\n",
" <td>1323187306698858499</td>\n",
" <td>@hin_fort Die verwendeten Begriffe spielen für...</td>\n",
" <td>2020-11-02 08:56:52</td>\n",
" <td>808666671468658688</td>\n",
" <td>Polizei Bremen</td>\n",
" <td>BremenPolizei</td>\n",
" <td>Bremen</td>\n",
" <td>Bremen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1429</th>\n",
" <td>1323269343183015938</td>\n",
" <td>#Zeugensuche\\r\\n\\r\\n#Frankfurt-#Kalbach: Am 30...</td>\n",
" <td>2020-11-02 14:22:51</td>\n",
" <td>2272909014</td>\n",
" <td>Polizei Frankfurt</td>\n",
" <td>Polizei_Ffm</td>\n",
" <td>Frankfurt am Main</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5300</th>\n",
" <td>1328341355626721282</td>\n",
" <td>@MeineMe53821610 rassistischen Motiven? 🤔</td>\n",
" <td>2020-11-16 14:17:13</td>\n",
" <td>4201961439</td>\n",
" <td>Polizei Mannheim</td>\n",
" <td>PolizeiMannheim</td>\n",
" <td>Mannheim</td>\n",
" <td>Baden-Württemberg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8149</th>\n",
" <td>1331972789801267201</td>\n",
" <td>@werner42726904 Wenn Sie konkrete Hinweise auf...</td>\n",
" <td>2020-11-26 14:47:14</td>\n",
" <td>2904886151</td>\n",
" <td>Polizei Hamburg</td>\n",
" <td>PolizeiHamburg</td>\n",
" <td>Hamburg</td>\n",
" <td>Hamburg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9176</th>\n",
" <td>1333452133623078914</td>\n",
" <td>@Fuchsbau_22 @ARD_Recht Wie bereits zuvor nich...</td>\n",
" <td>2020-11-30 16:45:37</td>\n",
" <td>3029998264</td>\n",
" <td>Polizei Karlsruhe</td>\n",
" <td>Polizei_KA</td>\n",
" <td>Karlsruhe</td>\n",
" <td>Baden-Württemberg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9763</th>\n",
" <td>1334075361416581120</td>\n",
" <td>@Initiative_PKD @Fuchsbau_22 @ARD_Recht Wie wi...</td>\n",
" <td>2020-12-02 10:02:06</td>\n",
" <td>3029998264</td>\n",
" <td>Polizei Karlsruhe</td>\n",
" <td>Polizei_KA</td>\n",
" <td>Karlsruhe</td>\n",
" <td>Baden-Württemberg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11702</th>\n",
" <td>1335957493365813250</td>\n",
" <td>👉Auto eines behinderten Menschen in #Willich #...</td>\n",
" <td>2020-12-07 14:41:01</td>\n",
" <td>2389266775</td>\n",
" <td>Polizei NRW VIE</td>\n",
" <td>polizei_nrw_vie</td>\n",
" <td>Viersen</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11752</th>\n",
" <td>1335978008457392129</td>\n",
" <td>Gestern Abend erschien auf der #Davidwache in ...</td>\n",
" <td>2020-12-07 16:02:33</td>\n",
" <td>2397974054</td>\n",
" <td>Polizei Berlin</td>\n",
" <td>polizeiberlin</td>\n",
" <td>Berlin</td>\n",
" <td>Berlin</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15082</th>\n",
" <td>1339960301815537665</td>\n",
" <td>Eine Kollegin unserer #Dir3 bemerkte, dass ein...</td>\n",
" <td>2020-12-18 15:46:45</td>\n",
" <td>2397974054</td>\n",
" <td>Polizei Berlin</td>\n",
" <td>polizeiberlin</td>\n",
" <td>Berlin</td>\n",
" <td>Berlin</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16675</th>\n",
" <td>1343918555495084032</td>\n",
" <td>#Frankfurt - #Gallus #Griesheim #Nied \\r\\n\\r\\...</td>\n",
" <td>2020-12-29 13:55:27</td>\n",
" <td>2272909014</td>\n",
" <td>Polizei Frankfurt</td>\n",
" <td>Polizei_Ffm</td>\n",
" <td>Frankfurt am Main</td>\n",
" <td>Hessen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17388</th>\n",
" <td>1349742682885775365</td>\n",
" <td>Zwei Ladendetektive erwischten einen 37-Jährig...</td>\n",
" <td>2021-01-14 15:38:27</td>\n",
" <td>808666671468658688</td>\n",
" <td>Polizei Bremen</td>\n",
" <td>BremenPolizei</td>\n",
" <td>Bremen</td>\n",
" <td>Bremen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17406</th>\n",
" <td>1349757570114846721</td>\n",
" <td>@ArizonaStranger Ob die Beleidigung als \"auslä...</td>\n",
" <td>2021-01-14 16:37:36</td>\n",
" <td>808666671468658688</td>\n",
" <td>Polizei Bremen</td>\n",
" <td>BremenPolizei</td>\n",
" <td>Bremen</td>\n",
" <td>Bremen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21801</th>\n",
" <td>1356540977343836166</td>\n",
" <td>#Zeugengesucht \\r\\n\\r\\nMontagnachmittag hat ei...</td>\n",
" <td>2021-02-02 09:52:26</td>\n",
" <td>808666671468658688</td>\n",
" <td>Polizei Bremen</td>\n",
" <td>BremenPolizei</td>\n",
" <td>Bremen</td>\n",
" <td>Bremen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26772</th>\n",
" <td>1364958369426133012</td>\n",
" <td>#Tagesticker 📝 No. 1\\r\\n\\r\\n➡ Magdeburg \\r\\n⤵...</td>\n",
" <td>2021-02-25 15:20:09</td>\n",
" <td>2849730251</td>\n",
" <td>Polizei Magdeburg</td>\n",
" <td>Polizei_MD</td>\n",
" <td>Magdeburg</td>\n",
" <td>Sachsen-Anhalt</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27421</th>\n",
" <td>1367063451483340801</td>\n",
" <td>Eine 41-jähr. Deutsche aus #Fürstenfeldbruck g...</td>\n",
" <td>2021-03-03 10:45:00</td>\n",
" <td>3169867654</td>\n",
" <td>Bundespolizei Bayern</td>\n",
" <td>bpol_by</td>\n",
" <td>München</td>\n",
" <td>Bayern</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29212</th>\n",
" <td>1370091362536853508</td>\n",
" <td>@amzdo @Polizei_NRW @RN_DORTMUND @Nordstadtblo...</td>\n",
" <td>2021-03-11 19:16:50</td>\n",
" <td>769128278</td>\n",
" <td>Polizei NRW DO</td>\n",
" <td>polizei_nrw_do</td>\n",
" <td>Dortmund</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30475</th>\n",
" <td>1372110500742434816</td>\n",
" <td>Wir beteiligen uns an den Internationalen Woch...</td>\n",
" <td>2021-03-17 09:00:10</td>\n",
" <td>2389375698</td>\n",
" <td>Polizei NRW HX</td>\n",
" <td>polizei_nrw_hx</td>\n",
" <td>Höxter</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30622</th>\n",
" <td>1372171253809876996</td>\n",
" <td>Ein klares Statement der #PolizeiSaarland gege...</td>\n",
" <td>2021-03-17 13:01:35</td>\n",
" <td>821727790374469632</td>\n",
" <td>Polizei Saarland</td>\n",
" <td>PolizeiSaarland</td>\n",
" <td>Saarbrücken</td>\n",
" <td>Saarland</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30801</th>\n",
" <td>1372471378650234882</td>\n",
" <td>Wir schließen uns dem Beitrag der #PolizeiBrau...</td>\n",
" <td>2021-03-18 08:54:10</td>\n",
" <td>773438463068766208</td>\n",
" <td>Polizei Nienburg</td>\n",
" <td>Polizei_NBG</td>\n",
" <td>Nienburg (Weser)</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30804</th>\n",
" <td>1372476310208061442</td>\n",
" <td>+++Solidarität-Grenzenlos+++\\r\\n\\r\\nDie diesjä...</td>\n",
" <td>2021-03-18 09:13:46</td>\n",
" <td>773132811238768640</td>\n",
" <td>Polizei Hildesheim</td>\n",
" <td>Polizei_HI</td>\n",
" <td>Hildesheim</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30806</th>\n",
" <td>1372477266383532034</td>\n",
" <td>Zum heutigen #Aktionstag \"Vorsicht, Vorurteile...</td>\n",
" <td>2021-03-18 09:17:34</td>\n",
" <td>1169206134189830145</td>\n",
" <td>Polizei Stendal</td>\n",
" <td>Polizei_SDL</td>\n",
" <td>Stendal</td>\n",
" <td>Sachsen-Anhalt</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30821</th>\n",
" <td>1372483689221853187</td>\n",
" <td>Weiter ging es in die Innenstadt von #Stendal,...</td>\n",
" <td>2021-03-18 09:43:05</td>\n",
" <td>1169206134189830145</td>\n",
" <td>Polizei Stendal</td>\n",
" <td>Polizei_SDL</td>\n",
" <td>Stendal</td>\n",
" <td>Sachsen-Anhalt</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30845</th>\n",
" <td>1372491481294987264</td>\n",
" <td>Letzte Station für uns war vor dem Landratsamt...</td>\n",
" <td>2021-03-18 10:14:03</td>\n",
" <td>1169206134189830145</td>\n",
" <td>Polizei Stendal</td>\n",
" <td>Polizei_SDL</td>\n",
" <td>Stendal</td>\n",
" <td>Sachsen-Anhalt</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30866</th>\n",
" <td>1372497013946847236</td>\n",
" <td>#DemokratieLeben! Die PI #Cuxhaven unterstüt...</td>\n",
" <td>2021-03-18 10:36:02</td>\n",
" <td>948208635448094720</td>\n",
" <td>Polizei Cuxhaven</td>\n",
" <td>Polizei_CUX</td>\n",
" <td>Cuxhaven</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31609</th>\n",
" <td>1373545951684665344</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:08</td>\n",
" <td>1232548941889228808</td>\n",
" <td>Polizei Bad Nenndorf</td>\n",
" <td>Polizei_BadN</td>\n",
" <td>Bad Nenndorf</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31610</th>\n",
" <td>1373545975726415876</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:14</td>\n",
" <td>772751356230823936</td>\n",
" <td>Polizei Göttingen</td>\n",
" <td>Polizei_GOE</td>\n",
" <td>Göttingen</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31611</th>\n",
" <td>1373545977727045635</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:14</td>\n",
" <td>773132811238768640</td>\n",
" <td>Polizei Hildesheim</td>\n",
" <td>Polizei_HI</td>\n",
" <td>Hildesheim</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31612</th>\n",
" <td>1373545985532645384</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:16</td>\n",
" <td>773785655340048384</td>\n",
" <td>Polizei Holzminden</td>\n",
" <td>Polizei_HOL</td>\n",
" <td>Holzminden</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31613</th>\n",
" <td>1373545986056916993</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:16</td>\n",
" <td>773438463068766208</td>\n",
" <td>Polizei Nienburg</td>\n",
" <td>Polizei_NBG</td>\n",
" <td>Nienburg (Weser)</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31614</th>\n",
" <td>1373545990226067458</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:17</td>\n",
" <td>773805850687340544</td>\n",
" <td>Polizei Osterode</td>\n",
" <td>Polizei_OHA</td>\n",
" <td>Osterode am Harz</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31615</th>\n",
" <td>1373545990339366912</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:18</td>\n",
" <td>773811779013083136</td>\n",
" <td>Polizei Stadthagen</td>\n",
" <td>Polizei_STH</td>\n",
" <td>Stadthagen</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31616</th>\n",
" <td>1373545994428817410</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:18</td>\n",
" <td>775277344705609732</td>\n",
" <td>Polizei Bückeburg</td>\n",
" <td>Polizei_BBG</td>\n",
" <td>Bückeburg</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31617</th>\n",
" <td>1373546003354300417</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:21</td>\n",
" <td>773413449267281920</td>\n",
" <td>Polizei Hameln</td>\n",
" <td>Polizei_HM</td>\n",
" <td>Hameln-Pyrmont</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31618</th>\n",
" <td>1373546006219010049</td>\n",
" <td>👉Internationaler Tag gegen Rassismus #Solidari...</td>\n",
" <td>2021-03-21 08:04:21</td>\n",
" <td>773778874979287040</td>\n",
" <td>Polizei Northeim</td>\n",
" <td>Polizei_NOM</td>\n",
" <td>Northeim</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31621</th>\n",
" <td>1373552485424635904</td>\n",
" <td>In unserer Gesellschaft ist weder Platz für Ha...</td>\n",
" <td>2021-03-21 08:30:06</td>\n",
" <td>2389342951</td>\n",
" <td>Polizei NRW PB</td>\n",
" <td>polizei_nrw_pb</td>\n",
" <td>Paderborn</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31664</th>\n",
" <td>1373627984574345217</td>\n",
" <td>Wir nahmen am Do einen 53-jähirgen Paderborner...</td>\n",
" <td>2021-03-21 13:30:06</td>\n",
" <td>2389146030</td>\n",
" <td>Polizei NRW BI</td>\n",
" <td>polizei_nrw_bi</td>\n",
" <td>Bielefeld</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31826</th>\n",
" <td>1373939038982397953</td>\n",
" <td>Am Freitagabend ist ein Mann an der Endhaltest...</td>\n",
" <td>2021-03-22 10:06:08</td>\n",
" <td>223758384</td>\n",
" <td>Polizei Sachsen</td>\n",
" <td>PolizeiSachsen</td>\n",
" <td>Dresden</td>\n",
" <td>Sachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32081</th>\n",
" <td>1374039903827333120</td>\n",
" <td>Zwei unbekannte Männer haben heute Morgen auf ...</td>\n",
" <td>2021-03-22 16:46:56</td>\n",
" <td>223758384</td>\n",
" <td>Polizei Sachsen</td>\n",
" <td>PolizeiSachsen</td>\n",
" <td>Dresden</td>\n",
" <td>Sachsen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32098</th>\n",
" <td>1374060177591271425</td>\n",
" <td>Zeugen nach gefährlicher Körperverletzung gesu...</td>\n",
" <td>2021-03-22 18:07:29</td>\n",
" <td>769128278</td>\n",
" <td>Polizei NRW DO</td>\n",
" <td>polizei_nrw_do</td>\n",
" <td>Dortmund</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32365</th>\n",
" <td>1374382966768472075</td>\n",
" <td>Fremdenfeindliches Graffiti - #Polizei #Aachen...</td>\n",
" <td>2021-03-23 15:30:08</td>\n",
" <td>2389142300</td>\n",
" <td>Polizei NRW AC</td>\n",
" <td>Polizei_NRW_AC</td>\n",
" <td>Aachen</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32471</th>\n",
" <td>1374628552499466240</td>\n",
" <td>Fremdenfeindliches Graffiti - #Polizei #Aachen...</td>\n",
" <td>2021-03-24 07:46:00</td>\n",
" <td>2389142300</td>\n",
" <td>Polizei NRW AC</td>\n",
" <td>Polizei_NRW_AC</td>\n",
" <td>Aachen</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33210</th>\n",
" <td>1375372215303208961</td>\n",
" <td>Hass im Netz - Handeln gegen Hater\\r\\nHass, Be...</td>\n",
" <td>2021-03-26 09:01:03</td>\n",
" <td>783322939580092418</td>\n",
" <td>Polizei Ulm</td>\n",
" <td>PolizeiUL</td>\n",
" <td>Ulm</td>\n",
" <td>Baden-Württemberg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33666</th>\n",
" <td>1376021420564693000</td>\n",
" <td>Gemeinsam stark gegen Rassismus\\r\\n\\r\\nUnser S...</td>\n",
" <td>2021-03-28 04:00:46</td>\n",
" <td>821727790374469632</td>\n",
" <td>Polizei Saarland</td>\n",
" <td>PolizeiSaarland</td>\n",
" <td>Saarbrücken</td>\n",
" <td>Saarland</td>\n",
" </tr>\n",
" <tr>\n",
" <th>36612</th>\n",
" <td>1379754045099945984</td>\n",
" <td>#FriedrichsGymnasium #StadttheaterHerford #Rav...</td>\n",
" <td>2021-04-07 11:12:53</td>\n",
" <td>2389146030</td>\n",
" <td>Polizei NRW BI</td>\n",
" <td>polizei_nrw_bi</td>\n",
" <td>Bielefeld</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>36744</th>\n",
" <td>1379876164932616197</td>\n",
" <td>@Hase_Zwo @Einzelfallinfos Wie Sie der Pressem...</td>\n",
" <td>2021-04-07 19:18:09</td>\n",
" <td>808666671468658688</td>\n",
" <td>Polizei Bremen</td>\n",
" <td>BremenPolizei</td>\n",
" <td>Bremen</td>\n",
" <td>Bremen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>37736</th>\n",
" <td>1381566100052312066</td>\n",
" <td>Am Samstagabend skandierte eine Gruppe von etw...</td>\n",
" <td>2021-04-12 11:13:21</td>\n",
" <td>808666671468658688</td>\n",
" <td>Polizei Bremen</td>\n",
" <td>BremenPolizei</td>\n",
" <td>Bremen</td>\n",
" <td>Bremen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>39878</th>\n",
" <td>1384459042496593920</td>\n",
" <td>Unbekannte Täter beschmierten im Zeitraum zwis...</td>\n",
" <td>2021-04-20 10:48:52</td>\n",
" <td>2389142300</td>\n",
" <td>Polizei NRW AC</td>\n",
" <td>Polizei_NRW_AC</td>\n",
" <td>Aachen</td>\n",
" <td>Nordrhein-Westfalen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>40525</th>\n",
" <td>1387051636627894285</td>\n",
" <td>Unser #LKA sucht 2 Männer, die letztes Jahr im...</td>\n",
" <td>2021-04-27 14:30:55</td>\n",
" <td>2397974054</td>\n",
" <td>Polizei Berlin</td>\n",
" <td>polizeiberlin</td>\n",
" <td>Berlin</td>\n",
" <td>Berlin</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42085</th>\n",
" <td>1389136356211892226</td>\n",
" <td>Zwei Festnahmen nach Beleidigung mit fremdenfe...</td>\n",
" <td>2021-05-03 08:34:50</td>\n",
" <td>2904886151</td>\n",
" <td>Polizei Hamburg</td>\n",
" <td>PolizeiHamburg</td>\n",
" <td>Hamburg</td>\n",
" <td>Hamburg</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42217</th>\n",
" <td>1389182069499105280</td>\n",
" <td>BürgerInnen in Sömmerda machten am vergangenen...</td>\n",
" <td>2021-05-03 11:36:29</td>\n",
" <td>3064348636</td>\n",
" <td>Polizei Thüringen</td>\n",
" <td>Polizei_Thuer</td>\n",
" <td>Erfurt</td>\n",
" <td>Thüringen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42220</th>\n",
" <td>1389182634836832257</td>\n",
" <td>BürgerInnen in Sömmerda machten am vergangenen...</td>\n",
" <td>2021-05-03 11:38:44</td>\n",
" <td>3064348636</td>\n",
" <td>Polizei Thüringen</td>\n",
" <td>Polizei_Thuer</td>\n",
" <td>Erfurt</td>\n",
" <td>Thüringen</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42237</th>\n",
" <td>1389190825406513158</td>\n",
" <td>🔵 44-Jähriger bedroht Minderjährige mit Schrec...</td>\n",
" <td>2021-05-03 12:11:17</td>\n",
" <td>770652658566852608</td>\n",
" <td>Polizei Hannover</td>\n",
" <td>Polizei_H</td>\n",
" <td>Hannover</td>\n",
" <td>Niedersachsen</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" tweet_id tweet_text \\\n",
"1031 1322543875169333250 Freitagabend beleidigten zwei Männer eine 20-j... \n",
"1239 1323187306698858499 @hin_fort Die verwendeten Begriffe spielen für... \n",
"1429 1323269343183015938 #Zeugensuche\\r\\n\\r\\n#Frankfurt-#Kalbach: Am 30... \n",
"5300 1328341355626721282 @MeineMe53821610 rassistischen Motiven? 🤔 \n",
"8149 1331972789801267201 @werner42726904 Wenn Sie konkrete Hinweise auf... \n",
"9176 1333452133623078914 @Fuchsbau_22 @ARD_Recht Wie bereits zuvor nich... \n",
"9763 1334075361416581120 @Initiative_PKD @Fuchsbau_22 @ARD_Recht Wie wi... \n",
"11702 1335957493365813250 👉Auto eines behinderten Menschen in #Willich #... \n",
"11752 1335978008457392129 Gestern Abend erschien auf der #Davidwache in ... \n",
"15082 1339960301815537665 Eine Kollegin unserer #Dir3 bemerkte, dass ein... \n",
"16675 1343918555495084032 #Frankfurt - #Gallus #Griesheim #Nied \\r\\n\\r\\... \n",
"17388 1349742682885775365 Zwei Ladendetektive erwischten einen 37-Jährig... \n",
"17406 1349757570114846721 @ArizonaStranger Ob die Beleidigung als \"auslä... \n",
"21801 1356540977343836166 #Zeugengesucht \\r\\n\\r\\nMontagnachmittag hat ei... \n",
"26772 1364958369426133012 #Tagesticker 📝 No. 1\\r\\n\\r\\n➡ Magdeburg \\r\\n⤵... \n",
"27421 1367063451483340801 Eine 41-jähr. Deutsche aus #Fürstenfeldbruck g... \n",
"29212 1370091362536853508 @amzdo @Polizei_NRW @RN_DORTMUND @Nordstadtblo... \n",
"30475 1372110500742434816 Wir beteiligen uns an den Internationalen Woch... \n",
"30622 1372171253809876996 Ein klares Statement der #PolizeiSaarland gege... \n",
"30801 1372471378650234882 Wir schließen uns dem Beitrag der #PolizeiBrau... \n",
"30804 1372476310208061442 +++Solidarität-Grenzenlos+++\\r\\n\\r\\nDie diesjä... \n",
"30806 1372477266383532034 Zum heutigen #Aktionstag \"Vorsicht, Vorurteile... \n",
"30821 1372483689221853187 Weiter ging es in die Innenstadt von #Stendal,... \n",
"30845 1372491481294987264 Letzte Station für uns war vor dem Landratsamt... \n",
"30866 1372497013946847236 #DemokratieLeben! Die PI #Cuxhaven unterstüt... \n",
"31609 1373545951684665344 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31610 1373545975726415876 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31611 1373545977727045635 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31612 1373545985532645384 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31613 1373545986056916993 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31614 1373545990226067458 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31615 1373545990339366912 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31616 1373545994428817410 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31617 1373546003354300417 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31618 1373546006219010049 👉Internationaler Tag gegen Rassismus #Solidari... \n",
"31621 1373552485424635904 In unserer Gesellschaft ist weder Platz für Ha... \n",
"31664 1373627984574345217 Wir nahmen am Do einen 53-jähirgen Paderborner... \n",
"31826 1373939038982397953 Am Freitagabend ist ein Mann an der Endhaltest... \n",
"32081 1374039903827333120 Zwei unbekannte Männer haben heute Morgen auf ... \n",
"32098 1374060177591271425 Zeugen nach gefährlicher Körperverletzung gesu... \n",
"32365 1374382966768472075 Fremdenfeindliches Graffiti - #Polizei #Aachen... \n",
"32471 1374628552499466240 Fremdenfeindliches Graffiti - #Polizei #Aachen... \n",
"33210 1375372215303208961 Hass im Netz - Handeln gegen Hater\\r\\nHass, Be... \n",
"33666 1376021420564693000 Gemeinsam stark gegen Rassismus\\r\\n\\r\\nUnser S... \n",
"36612 1379754045099945984 #FriedrichsGymnasium #StadttheaterHerford #Rav... \n",
"36744 1379876164932616197 @Hase_Zwo @Einzelfallinfos Wie Sie der Pressem... \n",
"37736 1381566100052312066 Am Samstagabend skandierte eine Gruppe von etw... \n",
"39878 1384459042496593920 Unbekannte Täter beschmierten im Zeitraum zwis... \n",
"40525 1387051636627894285 Unser #LKA sucht 2 Männer, die letztes Jahr im... \n",
"42085 1389136356211892226 Zwei Festnahmen nach Beleidigung mit fremdenfe... \n",
"42217 1389182069499105280 BürgerInnen in Sömmerda machten am vergangenen... \n",
"42220 1389182634836832257 BürgerInnen in Sömmerda machten am vergangenen... \n",
"42237 1389190825406513158 🔵 44-Jähriger bedroht Minderjährige mit Schrec... \n",
"\n",
" created_at user_id user_name \\\n",
"1031 2020-10-31 14:20:06 808666671468658688 Polizei Bremen \n",
"1239 2020-11-02 08:56:52 808666671468658688 Polizei Bremen \n",
"1429 2020-11-02 14:22:51 2272909014 Polizei Frankfurt \n",
"5300 2020-11-16 14:17:13 4201961439 Polizei Mannheim \n",
"8149 2020-11-26 14:47:14 2904886151 Polizei Hamburg \n",
"9176 2020-11-30 16:45:37 3029998264 Polizei Karlsruhe \n",
"9763 2020-12-02 10:02:06 3029998264 Polizei Karlsruhe \n",
"11702 2020-12-07 14:41:01 2389266775 Polizei NRW VIE \n",
"11752 2020-12-07 16:02:33 2397974054 Polizei Berlin \n",
"15082 2020-12-18 15:46:45 2397974054 Polizei Berlin \n",
"16675 2020-12-29 13:55:27 2272909014 Polizei Frankfurt \n",
"17388 2021-01-14 15:38:27 808666671468658688 Polizei Bremen \n",
"17406 2021-01-14 16:37:36 808666671468658688 Polizei Bremen \n",
"21801 2021-02-02 09:52:26 808666671468658688 Polizei Bremen \n",
"26772 2021-02-25 15:20:09 2849730251 Polizei Magdeburg \n",
"27421 2021-03-03 10:45:00 3169867654 Bundespolizei Bayern \n",
"29212 2021-03-11 19:16:50 769128278 Polizei NRW DO \n",
"30475 2021-03-17 09:00:10 2389375698 Polizei NRW HX \n",
"30622 2021-03-17 13:01:35 821727790374469632 Polizei Saarland \n",
"30801 2021-03-18 08:54:10 773438463068766208 Polizei Nienburg \n",
"30804 2021-03-18 09:13:46 773132811238768640 Polizei Hildesheim \n",
"30806 2021-03-18 09:17:34 1169206134189830145 Polizei Stendal \n",
"30821 2021-03-18 09:43:05 1169206134189830145 Polizei Stendal \n",
"30845 2021-03-18 10:14:03 1169206134189830145 Polizei Stendal \n",
"30866 2021-03-18 10:36:02 948208635448094720 Polizei Cuxhaven \n",
"31609 2021-03-21 08:04:08 1232548941889228808 Polizei Bad Nenndorf \n",
"31610 2021-03-21 08:04:14 772751356230823936 Polizei Göttingen \n",
"31611 2021-03-21 08:04:14 773132811238768640 Polizei Hildesheim \n",
"31612 2021-03-21 08:04:16 773785655340048384 Polizei Holzminden \n",
"31613 2021-03-21 08:04:16 773438463068766208 Polizei Nienburg \n",
"31614 2021-03-21 08:04:17 773805850687340544 Polizei Osterode \n",
"31615 2021-03-21 08:04:18 773811779013083136 Polizei Stadthagen \n",
"31616 2021-03-21 08:04:18 775277344705609732 Polizei Bückeburg \n",
"31617 2021-03-21 08:04:21 773413449267281920 Polizei Hameln \n",
"31618 2021-03-21 08:04:21 773778874979287040 Polizei Northeim \n",
"31621 2021-03-21 08:30:06 2389342951 Polizei NRW PB \n",
"31664 2021-03-21 13:30:06 2389146030 Polizei NRW BI \n",
"31826 2021-03-22 10:06:08 223758384 Polizei Sachsen \n",
"32081 2021-03-22 16:46:56 223758384 Polizei Sachsen \n",
"32098 2021-03-22 18:07:29 769128278 Polizei NRW DO \n",
"32365 2021-03-23 15:30:08 2389142300 Polizei NRW AC \n",
"32471 2021-03-24 07:46:00 2389142300 Polizei NRW AC \n",
"33210 2021-03-26 09:01:03 783322939580092418 Polizei Ulm \n",
"33666 2021-03-28 04:00:46 821727790374469632 Polizei Saarland \n",
"36612 2021-04-07 11:12:53 2389146030 Polizei NRW BI \n",
"36744 2021-04-07 19:18:09 808666671468658688 Polizei Bremen \n",
"37736 2021-04-12 11:13:21 808666671468658688 Polizei Bremen \n",
"39878 2021-04-20 10:48:52 2389142300 Polizei NRW AC \n",
"40525 2021-04-27 14:30:55 2397974054 Polizei Berlin \n",
"42085 2021-05-03 08:34:50 2904886151 Polizei Hamburg \n",
"42217 2021-05-03 11:36:29 3064348636 Polizei Thüringen \n",
"42220 2021-05-03 11:38:44 3064348636 Polizei Thüringen \n",
"42237 2021-05-03 12:11:17 770652658566852608 Polizei Hannover \n",
"\n",
" handle stadt bundesland \n",
"1031 BremenPolizei Bremen Bremen \n",
"1239 BremenPolizei Bremen Bremen \n",
"1429 Polizei_Ffm Frankfurt am Main Hessen \n",
"5300 PolizeiMannheim Mannheim Baden-Württemberg \n",
"8149 PolizeiHamburg Hamburg Hamburg \n",
"9176 Polizei_KA Karlsruhe Baden-Württemberg \n",
"9763 Polizei_KA Karlsruhe Baden-Württemberg \n",
"11702 polizei_nrw_vie Viersen Nordrhein-Westfalen \n",
"11752 polizeiberlin Berlin Berlin \n",
"15082 polizeiberlin Berlin Berlin \n",
"16675 Polizei_Ffm Frankfurt am Main Hessen \n",
"17388 BremenPolizei Bremen Bremen \n",
"17406 BremenPolizei Bremen Bremen \n",
"21801 BremenPolizei Bremen Bremen \n",
"26772 Polizei_MD Magdeburg Sachsen-Anhalt \n",
"27421 bpol_by München Bayern \n",
"29212 polizei_nrw_do Dortmund Nordrhein-Westfalen \n",
"30475 polizei_nrw_hx Höxter Nordrhein-Westfalen \n",
"30622 PolizeiSaarland Saarbrücken Saarland \n",
"30801 Polizei_NBG Nienburg (Weser) Niedersachsen \n",
"30804 Polizei_HI Hildesheim Niedersachsen \n",
"30806 Polizei_SDL Stendal Sachsen-Anhalt \n",
"30821 Polizei_SDL Stendal Sachsen-Anhalt \n",
"30845 Polizei_SDL Stendal Sachsen-Anhalt \n",
"30866 Polizei_CUX Cuxhaven Niedersachsen \n",
"31609 Polizei_BadN Bad Nenndorf Niedersachsen \n",
"31610 Polizei_GOE Göttingen Niedersachsen \n",
"31611 Polizei_HI Hildesheim Niedersachsen \n",
"31612 Polizei_HOL Holzminden Niedersachsen \n",
"31613 Polizei_NBG Nienburg (Weser) Niedersachsen \n",
"31614 Polizei_OHA Osterode am Harz Niedersachsen \n",
"31615 Polizei_STH Stadthagen Niedersachsen \n",
"31616 Polizei_BBG Bückeburg Niedersachsen \n",
"31617 Polizei_HM Hameln-Pyrmont Niedersachsen \n",
"31618 Polizei_NOM Northeim Niedersachsen \n",
"31621 polizei_nrw_pb Paderborn Nordrhein-Westfalen \n",
"31664 polizei_nrw_bi Bielefeld Nordrhein-Westfalen \n",
"31826 PolizeiSachsen Dresden Sachsen \n",
"32081 PolizeiSachsen Dresden Sachsen \n",
"32098 polizei_nrw_do Dortmund Nordrhein-Westfalen \n",
"32365 Polizei_NRW_AC Aachen Nordrhein-Westfalen \n",
"32471 Polizei_NRW_AC Aachen Nordrhein-Westfalen \n",
"33210 PolizeiUL Ulm Baden-Württemberg \n",
"33666 PolizeiSaarland Saarbrücken Saarland \n",
"36612 polizei_nrw_bi Bielefeld Nordrhein-Westfalen \n",
"36744 BremenPolizei Bremen Bremen \n",
"37736 BremenPolizei Bremen Bremen \n",
"39878 Polizei_NRW_AC Aachen Nordrhein-Westfalen \n",
"40525 polizeiberlin Berlin Berlin \n",
"42085 PolizeiHamburg Hamburg Hamburg \n",
"42217 Polizei_Thuer Erfurt Thüringen \n",
"42220 Polizei_Thuer Erfurt Thüringen \n",
"42237 Polizei_H Hannover Niedersachsen "
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tw = pd.read_csv('..\\mod_data\\copbird_table_tweet_ext_state.csv', na_filter=False)\n",
"df_tw_col = 'tweet_text'\n",
"get_topics_by_str_lst(topic=topic_3, df=df_tw, col_name=df_tw_col)"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "8d0a53cc",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>article_id</th>\n",
" <th>timestamp</th>\n",
" <th>location</th>\n",
" <th>bundesland</th>\n",
" <th>content</th>\n",
" <th>tw_user_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>7693</th>\n",
" <td>4970-4801222</td>\n",
" <td>2020-12-29 14:42:00</td>\n",
" <td>Frankfurt</td>\n",
" <td>hessen</td>\n",
" <td>Frankfurt (ots) - (em) Freitagnachmittag (25. ...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>13962</th>\n",
" <td>35235-4812557</td>\n",
" <td>2021-01-14 16:24:00</td>\n",
" <td>Bremen</td>\n",
" <td>bremen</td>\n",
" <td>Bremen (ots) - - Ort: Bremen-Mitte, Bahnhofsvo...</td>\n",
" <td>808666671468658688</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19445</th>\n",
" <td>104234-4823502</td>\n",
" <td>2021-01-27 17:12:00</td>\n",
" <td>Lingen</td>\n",
" <td>niedersachsen</td>\n",
" <td>Lingen (ots) - Lingen/Brögbern - Am Sonntagnac...</td>\n",
" <td>773160525324808193</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20919</th>\n",
" <td>117687-4825987</td>\n",
" <td>2021-01-30 13:38:00</td>\n",
" <td>Bad Dürkheim</td>\n",
" <td>rheinland-pfalz</td>\n",
" <td>Bad Dürkheim (ots) - Am 30.01.2021 um 13 Uhr b...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>22245</th>\n",
" <td>126723-4804801</td>\n",
" <td>2021-01-05 11:25:00</td>\n",
" <td>Mühlhausen</td>\n",
" <td>thueringen</td>\n",
" <td>Mühlhausen (ots) - Mit ausländerfeindlichen Pa...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>23117</th>\n",
" <td>6013-4807245</td>\n",
" <td>2021-01-08 12:08:00</td>\n",
" <td>Nürnberg</td>\n",
" <td>bayern</td>\n",
" <td>Nürnberg (ots) - In den vergangenen Tagen wurd...</td>\n",
" <td>800718568572612608</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24239</th>\n",
" <td>43526-4836365</td>\n",
" <td>2021-02-11 15:10:00</td>\n",
" <td>Nordwalde</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Nordwalde (ots) - Gemeinsame Pressemitteilung ...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>26018</th>\n",
" <td>24843-4839806</td>\n",
" <td>2021-02-16 12:17:00</td>\n",
" <td>Isselburg</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Isselburg (ots) - Einige Konsequenzen eingehan...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>29826</th>\n",
" <td>11187-4845946</td>\n",
" <td>2021-02-23 11:43:00</td>\n",
" <td>Münster</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Münster (ots) - Nach rassistischen Beleidigung...</td>\n",
" <td>2284811875</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31241</th>\n",
" <td>35235-4849262</td>\n",
" <td>2021-02-26 11:53:00</td>\n",
" <td>Bremen</td>\n",
" <td>bremen</td>\n",
" <td>Bremen (ots) - - Ort: Bremen-Hemelingen, OT He...</td>\n",
" <td>808666671468658688</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31719</th>\n",
" <td>108747-4849805</td>\n",
" <td>2021-02-27 02:30:00</td>\n",
" <td>Pasewalk</td>\n",
" <td>mecklenburg-vorpommern</td>\n",
" <td>Pasewalk (ots) - Am 26.02.2021 wurden die Beam...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>32137</th>\n",
" <td>35235-4828445</td>\n",
" <td>2021-02-02 14:34:00</td>\n",
" <td>Bremen</td>\n",
" <td>bremen</td>\n",
" <td>Bremen (ots) - - Ort: Bremen-Findorff, OT Weid...</td>\n",
" <td>808666671468658688</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32140</th>\n",
" <td>35235-4827977</td>\n",
" <td>2021-02-02 10:45:00</td>\n",
" <td>Bremen</td>\n",
" <td>bremen</td>\n",
" <td>Bremen (ots) - - Ort: Bremen-Findorff, OT Weid...</td>\n",
" <td>808666671468658688</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32641</th>\n",
" <td>35235-4828777</td>\n",
" <td>2021-02-03 09:34:00</td>\n",
" <td>Bremen</td>\n",
" <td>bremen</td>\n",
" <td>Bremen (ots) - - Ort: Bremen-Findorff Zeit: 02...</td>\n",
" <td>808666671468658688</td>\n",
" </tr>\n",
" <tr>\n",
" <th>37060</th>\n",
" <td>119277-4863418</td>\n",
" <td>2021-03-14 14:35:00</td>\n",
" <td>Oldenburg</td>\n",
" <td>niedersachsen</td>\n",
" <td>Oldenburg (ots) - Am 13.02.21, um 16:20 Uhr, w...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>39547</th>\n",
" <td>55625-4868626</td>\n",
" <td>2021-03-19 13:35:00</td>\n",
" <td>Paderborn</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Paderborn (ots) - HC - Ein Paderborner beleidi...</td>\n",
" <td>2389342951</td>\n",
" </tr>\n",
" <tr>\n",
" <th>39575</th>\n",
" <td>12522-4868514</td>\n",
" <td>2021-03-19 12:39:00</td>\n",
" <td>Bielefeld</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Bielefeld (ots) - HC/ Bielefeld- Paderborn - E...</td>\n",
" <td>2389146030</td>\n",
" </tr>\n",
" <tr>\n",
" <th>41162</th>\n",
" <td>4971-4870662</td>\n",
" <td>2021-03-22 17:13:00</td>\n",
" <td>Dortmund</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Dortmund (ots) - Lfd. Nr.: 0314 In der Nacht v...</td>\n",
" <td>769128278</td>\n",
" </tr>\n",
" <tr>\n",
" <th>41777</th>\n",
" <td>11559-4871407</td>\n",
" <td>2021-03-23 12:53:00</td>\n",
" <td>Aachen</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Aachen (ots) - Unbekannte Täter haben - vermut...</td>\n",
" <td>2389142300</td>\n",
" </tr>\n",
" <tr>\n",
" <th>44966</th>\n",
" <td>117683-4852665</td>\n",
" <td>2021-03-02 14:13:00</td>\n",
" <td>Kaiserslautern</td>\n",
" <td>rheinland-pfalz</td>\n",
" <td>Kaiserslautern (ots) - Unbekannte Schmierfinke...</td>\n",
" <td>886595382</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48417</th>\n",
" <td>104236-4858302</td>\n",
" <td>2021-03-08 14:58:00</td>\n",
" <td>Osnabrück</td>\n",
" <td>niedersachsen</td>\n",
" <td>Osnabrück (ots) - Unbekannte machten sich zwis...</td>\n",
" <td>760752388454113280</td>\n",
" </tr>\n",
" <tr>\n",
" <th>49864</th>\n",
" <td>35235-4886661</td>\n",
" <td>2021-04-12 12:46:00</td>\n",
" <td>Bremen</td>\n",
" <td>bremen</td>\n",
" <td>Bremen (ots) - - Ort: Bremen-Blumenthal, OT Lü...</td>\n",
" <td>808666671468658688</td>\n",
" </tr>\n",
" <tr>\n",
" <th>53479</th>\n",
" <td>65846-4880317</td>\n",
" <td>2021-04-01 20:30:00</td>\n",
" <td>Herford</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Herford (ots) - (mmb) Am Donnerstag (01.04.202...</td>\n",
" <td>2389393237</td>\n",
" </tr>\n",
" <tr>\n",
" <th>54109</th>\n",
" <td>11559-4893710</td>\n",
" <td>2021-04-20 11:41:00</td>\n",
" <td>Aachen</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>Aachen (ots) - Unbekannte Täter beschmierten i...</td>\n",
" <td>2389142300</td>\n",
" </tr>\n",
" <tr>\n",
" <th>56428</th>\n",
" <td>43648-4899539</td>\n",
" <td>2021-04-26 14:43:00</td>\n",
" <td>Marburg-Biedenkopf</td>\n",
" <td>hessen</td>\n",
" <td>Marburg-Biedenkopf (ots) - Mahnmal beschädigt-...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>67410</th>\n",
" <td>66841-4905162</td>\n",
" <td>2021-05-03 12:26:00</td>\n",
" <td>Hannover</td>\n",
" <td>niedersachsen</td>\n",
" <td>Hannover (ots) - Am Freitagabend, 30.04.2021, ...</td>\n",
" <td>770652658566852608</td>\n",
" </tr>\n",
" <tr>\n",
" <th>67743</th>\n",
" <td>126719-4905163</td>\n",
" <td>2021-05-03 12:27:00</td>\n",
" <td>Sömmerda</td>\n",
" <td>thueringen</td>\n",
" <td>Sömmerda (ots) - Am Freitagnachmittag pöbelte ...</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>69663</th>\n",
" <td>126723-4909419</td>\n",
" <td>2021-05-07 11:34:00</td>\n",
" <td>Nordhausen</td>\n",
" <td>thueringen</td>\n",
" <td>Nordhausen (ots) - Bisherigen Ermittlungen zuf...</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" article_id timestamp location \\\n",
"7693 4970-4801222 2020-12-29 14:42:00 Frankfurt \n",
"13962 35235-4812557 2021-01-14 16:24:00 Bremen \n",
"19445 104234-4823502 2021-01-27 17:12:00 Lingen \n",
"20919 117687-4825987 2021-01-30 13:38:00 Bad Dürkheim \n",
"22245 126723-4804801 2021-01-05 11:25:00 Mühlhausen \n",
"23117 6013-4807245 2021-01-08 12:08:00 Nürnberg \n",
"24239 43526-4836365 2021-02-11 15:10:00 Nordwalde \n",
"26018 24843-4839806 2021-02-16 12:17:00 Isselburg \n",
"29826 11187-4845946 2021-02-23 11:43:00 Münster \n",
"31241 35235-4849262 2021-02-26 11:53:00 Bremen \n",
"31719 108747-4849805 2021-02-27 02:30:00 Pasewalk \n",
"32137 35235-4828445 2021-02-02 14:34:00 Bremen \n",
"32140 35235-4827977 2021-02-02 10:45:00 Bremen \n",
"32641 35235-4828777 2021-02-03 09:34:00 Bremen \n",
"37060 119277-4863418 2021-03-14 14:35:00 Oldenburg \n",
"39547 55625-4868626 2021-03-19 13:35:00 Paderborn \n",
"39575 12522-4868514 2021-03-19 12:39:00 Bielefeld \n",
"41162 4971-4870662 2021-03-22 17:13:00 Dortmund \n",
"41777 11559-4871407 2021-03-23 12:53:00 Aachen \n",
"44966 117683-4852665 2021-03-02 14:13:00 Kaiserslautern \n",
"48417 104236-4858302 2021-03-08 14:58:00 Osnabrück \n",
"49864 35235-4886661 2021-04-12 12:46:00 Bremen \n",
"53479 65846-4880317 2021-04-01 20:30:00 Herford \n",
"54109 11559-4893710 2021-04-20 11:41:00 Aachen \n",
"56428 43648-4899539 2021-04-26 14:43:00 Marburg-Biedenkopf \n",
"67410 66841-4905162 2021-05-03 12:26:00 Hannover \n",
"67743 126719-4905163 2021-05-03 12:27:00 Sömmerda \n",
"69663 126723-4909419 2021-05-07 11:34:00 Nordhausen \n",
"\n",
" bundesland \\\n",
"7693 hessen \n",
"13962 bremen \n",
"19445 niedersachsen \n",
"20919 rheinland-pfalz \n",
"22245 thueringen \n",
"23117 bayern \n",
"24239 nordrhein-westfalen \n",
"26018 nordrhein-westfalen \n",
"29826 nordrhein-westfalen \n",
"31241 bremen \n",
"31719 mecklenburg-vorpommern \n",
"32137 bremen \n",
"32140 bremen \n",
"32641 bremen \n",
"37060 niedersachsen \n",
"39547 nordrhein-westfalen \n",
"39575 nordrhein-westfalen \n",
"41162 nordrhein-westfalen \n",
"41777 nordrhein-westfalen \n",
"44966 rheinland-pfalz \n",
"48417 niedersachsen \n",
"49864 bremen \n",
"53479 nordrhein-westfalen \n",
"54109 nordrhein-westfalen \n",
"56428 hessen \n",
"67410 niedersachsen \n",
"67743 thueringen \n",
"69663 thueringen \n",
"\n",
" content tw_user_id \n",
"7693 Frankfurt (ots) - (em) Freitagnachmittag (25. ... \n",
"13962 Bremen (ots) - - Ort: Bremen-Mitte, Bahnhofsvo... 808666671468658688 \n",
"19445 Lingen (ots) - Lingen/Brögbern - Am Sonntagnac... 773160525324808193 \n",
"20919 Bad Dürkheim (ots) - Am 30.01.2021 um 13 Uhr b... \n",
"22245 Mühlhausen (ots) - Mit ausländerfeindlichen Pa... \n",
"23117 Nürnberg (ots) - In den vergangenen Tagen wurd... 800718568572612608 \n",
"24239 Nordwalde (ots) - Gemeinsame Pressemitteilung ... \n",
"26018 Isselburg (ots) - Einige Konsequenzen eingehan... \n",
"29826 Münster (ots) - Nach rassistischen Beleidigung... 2284811875 \n",
"31241 Bremen (ots) - - Ort: Bremen-Hemelingen, OT He... 808666671468658688 \n",
"31719 Pasewalk (ots) - Am 26.02.2021 wurden die Beam... \n",
"32137 Bremen (ots) - - Ort: Bremen-Findorff, OT Weid... 808666671468658688 \n",
"32140 Bremen (ots) - - Ort: Bremen-Findorff, OT Weid... 808666671468658688 \n",
"32641 Bremen (ots) - - Ort: Bremen-Findorff Zeit: 02... 808666671468658688 \n",
"37060 Oldenburg (ots) - Am 13.02.21, um 16:20 Uhr, w... \n",
"39547 Paderborn (ots) - HC - Ein Paderborner beleidi... 2389342951 \n",
"39575 Bielefeld (ots) - HC/ Bielefeld- Paderborn - E... 2389146030 \n",
"41162 Dortmund (ots) - Lfd. Nr.: 0314 In der Nacht v... 769128278 \n",
"41777 Aachen (ots) - Unbekannte Täter haben - vermut... 2389142300 \n",
"44966 Kaiserslautern (ots) - Unbekannte Schmierfinke... 886595382 \n",
"48417 Osnabrück (ots) - Unbekannte machten sich zwis... 760752388454113280 \n",
"49864 Bremen (ots) - - Ort: Bremen-Blumenthal, OT Lü... 808666671468658688 \n",
"53479 Herford (ots) - (mmb) Am Donnerstag (01.04.202... 2389393237 \n",
"54109 Aachen (ots) - Unbekannte Täter beschmierten i... 2389142300 \n",
"56428 Marburg-Biedenkopf (ots) - Mahnmal beschädigt-... \n",
"67410 Hannover (ots) - Am Freitagabend, 30.04.2021, ... 770652658566852608 \n",
"67743 Sömmerda (ots) - Am Freitagnachmittag pöbelte ... \n",
"69663 Nordhausen (ots) - Bisherigen Ermittlungen zuf... "
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_pm = pd.read_csv(r'..\\mod_data\\2020-12_2021-05_presseportal.csv', na_filter=False)\n",
"df_pm_col = 'content'\n",
"get_topics_by_str_lst(topic=topic_3, df=df_pm, col_name=df_pm_col)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a205693e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "6fb4345e",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "python-scientific kernel",
"language": "python",
"name": "python-scientific"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}