<jupyter_start><jupyter_text><jupyter_code>PROJECT_ID="prova-1-312320"

import os
from google.colab import auth

#sets dateset
DATASET_PROJECT_ID = 'amsterdamumcdb-data'
DATASET_ID = 'ams102'
LOCATION = 'eu'

#all libraries check this environment variable, so set it:
os.environ["GOOGLE_CLOUD_PROJECT"] = PROJECT_ID

auth.authenticate_user()
print('Authenticated')
import pandas as pd

config_gbq = {'query': 
          {'defaultDataset': {
              "datasetId": DATASET_ID, 
              "projectId": DATASET_PROJECT_ID
              },
           'Location': LOCATION}
           }
specialties = pd.read_gbq(
    '''
    SELECT specialty, COUNT(*) AS number_of_admissions
    FROM admissions
    GROUP BY specialty
    ORDER BY number_of_admissions DESC 
    '''
    , configuration=config_gbq)
specialties.plot(kind='bar', x='specialty')
admission_table=pd.read_gbq("""
SELECT * FROM admissions

""",configuration=config_gbq)

admission_table=pd.read_gbq("""
SELECT * FROM admissions

""",configuration=config_gbq)

SELECT admissionid, itemid, value, unitid, measuredat
    FROM numericitems num JOIN
    admissions adm 
    ON num.admissionid=adm.admissionid

    WHERE itemid IN (
      10053	--Lactaat (bloed)
      ,6837 --Laktaat
      ,9580 --Laktaat Astrup<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10522273425499232, 'fraction_numerical': 0.017665130568356373, 'mean_word_length': 3.6870503597122304, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '323864', 'license': 'MIT', 'n_tokens_mistral': 470, 'n_tokens_neox': 442, 'n_words': 95, 'path': 'Untitled3.ipynb', 'repo_name': 'xborrat/mimic-code', 'size': '1302'}