SIOC Post profile for "AI3:::Adaptive Information"
type: Document
description: A SIOC profile describes the structure and contents of a weblog in a machine readable form. For more information please refer to http://sioc-project.org/.
primary topic: CWPK #54: Statistics and Logging
generator agent: http://rdfs.org/sioc/wp-sioc.php

CWPK #54: Statistics and Logging
type: Post
has container: weblog
has creator: Mike Bergman
maker: Mike Bergman
created: 2020-10-15T15:52:19Z
content: These are Two Recommended Utilities This installment in our Cooking with Python and KBpedia series covers two useful (essential?) utilities for any substantial project: stats and logging. stats refers to internal program or knowledge graph metrics, not a generalized statistical analysis package. logging is a longstanding Python module that provides persistence and superior control over using simple print statements for program tracing and debugging. On the stats side, we will emphasize capturing metrics not already available when using Protégé, which provides its own set of useful baseline statistics. (See Figure 1.) These metrics are mostly simple counts, with some sums and averages. The results of these metrics are some of the numerical data points that we will use in the next installment on charting. On the logging front, we will edit all of our existing routines to log to file, as well as print to screen. We can embed these routines in existing functions so that we may better track our efforts. An Internal Stats Module In our earlier extract-and-build routines we have already put in place the basic file and set processing steps necessary to capture additional metrics. We will add to these here, in the process creating an internal stats module in our cowpoke package. First, there is no need to duplicate the information that already comes to us when using Protégé. Here are the standard stats provided on the main start-up screen: Figure 1: Protégé Internal Stats We are loading up here (1) our KBpedia v 300 in-progress. We can see that Protégé gives us counts (2) of classes (58200), object properties (1316), data properties (802), annotation properties (2919), and a few other metrics. We will take these values as givens, and will enter them as part of the initialization for our own internal procedures (for checking totals and calculating percentages). Pyflakes is a simple Python code checker that you may want to consider. If you want to add in stylistic checks, you …
encoded: These are Two Recommended Utilities This installment in our Cooking with Python and KBpedia series covers two useful (essential?) utilities for any substantial project: stats and logging. stats refers to internal program or knowledge graph metrics, not a generalized statistical analysis package. logging is a longstanding Python module that provides persistence and superior control over using simple print statements for program tracing and debugging. On the stats side, we will emphasize capturing metrics not already available when using Protégé, which provides its own set of useful baseline statistics. (See Figure 1.) These metrics are mostly simple counts, with some sums and averages. The results of these metrics are some of the numerical data points that we will use in the next installment on charting. On the logging front, we will edit all of our existing routines to log to file, as well as print to screen. We can embed these routines in existing functions so that we may better track our efforts. An Internal Stats Module In our earlier extract-and-build routines we have already put in place the basic file and set processing steps necessary to capture additional metrics. We will add to these here, in the process creating an internal stats module in our cowpoke package. First, there is no need to duplicate the information that already comes to us when using Protégé. Here are the standard stats provided on the main start-up screen: Figure 1: Protégé Internal Stats We are loading up here (1) our KBpedia v 300 in-progress. We can see that Protégé gives us counts (2) of classes (58200), object properties (1316), data properties (802), annotation properties (2919), and a few other metrics. We will take these values as givens, and will enter them as part of the initialization for our own internal procedures (for checking totals and calculating percentages). Pyflakes is a simple Python code checker that you may want to consider. If you want to add in stylistic checks, you …
topic: CWPK
topic: KBpedia
topic: Semantic Web Tools
links to: Cooking with Python and KBpedia
links to: Protégé
links to: Pyflakes
links to: flake8
links to: PEP 8
links to: pycodestyle
links to: Pylint
links to: cb1-1
links to: cb1-2
links to: cb2-1
links to: cb2-2
links to: cb2-3
links to: cb2-4
links to: cb2-5
links to: cb2-6
links to: cb2-7
links to: cb2-8
links to: cb2-9
links to: cb2-10
links to: cb2-11
links to: cb2-12
links to: cb2-13
links to: cb2-14
links to: cb2-15
links to: cb2-16
links to: cb2-17
links to: cb2-18
links to: cb2-19
links to: cb2-20
links to: cb2-21
links to: cb2-22
links to: cb2-23
links to: cb2-24
links to: cb2-25
links to: cb2-26
links to: cb2-27
links to: cb2-28
links to: cb2-29
links to: cb2-30
links to: cb2-31
links to: cb2-32
links to: cb2-33
links to: cb2-34
links to: cb3-1
links to: VoID
links to: cb4-1
links to: cb4-2
links to: cb4-3
links to: cb4-4
links to: cb4-5
links to: cb4-6
links to: cb4-7
links to: cb4-8
links to: cb4-9
links to: cb4-10
links to: cb4-11
links to: cb4-12
links to: cb4-13
links to: cb4-14
links to: cb4-15
links to: cb4-16
links to: cb4-17
links to: cb4-18
links to: cb4-19
links to: cb4-20
links to: cb4-21
links to: cb4-22
links to: cb4-23
links to: cb4-24

Mike Bergman
type: User

Mike Bergman
type: Person

Cooking with Python and KBpedia
label: CWPK listing

VoID documentation

step-by-step logging guide

'How to' manual

logging facility module

intro guide to the logger

Configuraton guide

KBpedia

code listing covering the series

direct download

notify me