mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 07:03:56 +02:00
Executing black over all jupyter notebook (#190)
Reverting black for the jupyter notebooks gets old. Can we just run black over all of them?
This commit is contained in:
@ -51,6 +51,7 @@
|
||||
],
|
||||
"source": [
|
||||
"from deutschland.bundesanzeiger import Bundesanzeiger\n",
|
||||
"\n",
|
||||
"ba = Bundesanzeiger()\n",
|
||||
"# search term\n",
|
||||
"data = ba.get_reports(\"Atos IT-Dienstleistung & Beratung GmbH\")\n",
|
||||
@ -73,11 +74,13 @@
|
||||
],
|
||||
"source": [
|
||||
"# Note: There can be multiple \"Aufsichtsrat\" entries per Company, the API however does only return one because the keys are overwritten\n",
|
||||
"jahresabschluss = data['Jahresabschluss zum Geschäftsjahr vom 01.01.2019 bis zum 31.12.2019']\n",
|
||||
"jahresabschluss = data[\n",
|
||||
" \"Jahresabschluss zum Geschäftsjahr vom 01.01.2019 bis zum 31.12.2019\"\n",
|
||||
"]\n",
|
||||
"\n",
|
||||
"# Note: Although the report includes the entire text it lacks the formatting that would make extracting information a lot easier as the data is wrapped inside a <table> originally\n",
|
||||
"with open(\"./jahresabschluss-example.txt\", \"w\") as file:\n",
|
||||
" file.write(jahresabschluss['report'])\n",
|
||||
" file.write(jahresabschluss[\"report\"])\n",
|
||||
"print(jahresabschluss.keys())"
|
||||
]
|
||||
},
|
||||
@ -96,6 +99,7 @@
|
||||
],
|
||||
"source": [
|
||||
"from deutschland.handelsregister import Handelsregister\n",
|
||||
"\n",
|
||||
"hr = Handelsregister()\n",
|
||||
"\n",
|
||||
"results = hr.search(keywords=\"BLUECHILLED Verwaltungs GmbH\")\n",
|
||||
@ -128,6 +132,7 @@
|
||||
"source": [
|
||||
"# SQLite export\n",
|
||||
"import sqlite3\n",
|
||||
"\n",
|
||||
"con = sqlite3.connect(\"../data/openregister.db\")"
|
||||
]
|
||||
},
|
||||
@ -176,7 +181,7 @@
|
||||
],
|
||||
"source": [
|
||||
"schema = cur.execute(\"SELECT name FROM sqlite_master WHERE type='table';\")\n",
|
||||
"schema.fetchall()\n"
|
||||
"schema.fetchall()"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -414,6 +419,7 @@
|
||||
],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"df = pd.read_sql_query(\"SELECT * FROM company LIMIT 100\", con)\n",
|
||||
"df.head()"
|
||||
]
|
||||
|
Reference in New Issue
Block a user