Dump from CongoDB


In [37]:
%matplotlib inline
from IPython.display import display
import pandas as pd
import sqlite3

con = sqlite3.connect("../../../Dissertation/data/CongoDB.sqlite")

Retriev entries from the DB that originate from public available sources:


In [38]:
sql = """SELECT
           t_14C.LABNR,
           t_14C.C14AGE,
           t_14C.C14STD,
           t_14C.C13,
           t_14C.MATERIAL,
           't_Ort'.'ort_name' AS SITE,
           t_Ort.ort_land AS COUNTRY, 
           't_ort'.'ort_kurz' || ' ' || 't_komplex'.'bef_nr' AS FEATURE,
           t_komplex.feature_type AS FEATURE_DESC,
           t_Ort.y_lat AS LAT,
           t_Ort.x_long AS LONG,
           t_14C.Lit AS SOURCE
       FROM (t_Ort INNER JOIN t_Komplex ON t_Ort.ortID = t_Komplex.ortID)
           INNER JOIN t_14c ON t_Komplex.komplexID = t_14c.komplexID
       WHERE (((t_14C.Lit) Not Like '%Ordner%')
           AND ((t_14C.Lit) != ''))""".replace('\n',' ')

df = pd.read_sql(sql, con)
len(df)


Out[38]:
1191

Review the top of the Dataset:


In [39]:
display(df.head())


LABNR C14AGE C14STD C13 MATERIAL SITE COUNTRY FEATURE FEATURE_DESC LAT LONG SOURCE
0 Bdy-306 1990 210 0.0 None Batalimo CAF None Trench 3.675942 18.455022 Zangato 2000
1 Gif-5894 1590 90 0.0 Charcoal Batalimo CAF None Trench 3.675942 18.455022 de Maret 1985, Eggert 1993
2 OxTL-154a-4 1570 220 0.0 None Batalimo CAF None Trench 3.675942 18.455022 de Bayle des Hermens 1975, 233; Eggert 1987
3 KI-2893 1960 90 -27.1 Charcoal Likwala-Esobe km 186 COG LKW 186 87/186 Pit -0.048312 17.406785 Eggert 1993
4 KI-2881 1990 45 -25.1 Elaeis guineensis Munda COG MUN 87/2-1-1 Furnace 1.162608 17.356948 Eggert 1993

Save table to CSV-Format:


In [40]:
df.to_csv("../data/aDRAC.csv", index=False, encoding='utf8')

In [ ]: