Package: llama-cli
Llama CLIA utility program that fetches and preprocesses learning data from supported learning
tools. Educators and researches have important usecases for accessing the raw data
that is generated while learners are using digital learning tools and environments.
These stakeholders can aim to e.g. analyse and improve teaching materials, methods,
and activities.The aim of Llama CLI is to support and ease the steps ofconnecting to the supported learning data sourcesexcluding persons and unwanted data tables or columnsfetching partial and complete data setsanonymizing data before research activitiesstandardizing/transforming/sharing datasampling and selecting data for analysis/MLCurrently supported data sources areA-plushttps://apluslms.github.io/JSON log files fromhttps://github.com/acos-server/acos-serverDatabase export fromhttps://docs.mongodb.com/database-tools/mongodump/Transforming program submissions and events toProgSnap 2is supported viallama shell.EtymologyThe name for the project comes from ~ la lumière à Montagne analytique. Pardon my French for ~ light on the mountain of analytics. Also LA is an acronym, that the
package author may have used in his thesis more than a decent number of times,
and that stands for Learning Analytics which is a research field in education
technologies. Llamas are also known from a controversial programming exercise for
computer science majors at Aalto University.InstallationLlama CLI is available at PyPI. It has a number of automatically installed
dependencies, most notablypandas,numpy,scipy, andrequests.% python3 -m pip install llama-cli
  % llamaOR contained in a virtual environment (directory)% python3 -m venv .venv && .venv/bin/pip install llama-cli
  % .venv/bin/llamaInstructionsLlama CLI operates on the current working directory. The configurations and data
will be stored in that directory – little bit like when working with git repositories.
One work directory can connect with multiple data sources and one should select
the sources that the current research or analysis project requires.% llama
  Llama CLI fetches and preprocesses learning data

  usage: llama <cmd> [<args>]

     status      Show the working tree status
     source      Manage sources for learning data
     list        List available data tables and columns
     privacy     Configure privacy (default: pseudoanonymous)
     exclude     Exclude selected tables, columns, or persons at fetch
     fetch       Fetch data from sources
     anonymize   Export anonymized data
     shell       Open python REPL with 'llama' instance for exported dataUsellama source addto interactively connect with data sources.
The required addresses and keys will be prompted when required.Usellama listto fetch the available data tables.Time to consider excluding some uninteresting data or persons who have
not consent to the research at hand. Seellama excludefor examples.Usellama fetch rowsto download data tables. Depending on the project
it may be necessary to alsollama fetch filesand/orllama fetch meta.
This step has a delay between internet requests and it may take a long time
to complete. The rows can be fetched again to append new data if supported
by the data source.The data infetcheddirectory is pseudoanonymized by default.
The pseudo identifiers are required to complete fetching of depended data.
With access to the source database the pseudo identifiers can be traced to persons.
Usellama anonymizeto produceexportdirectory that can be e.g. stored in
research repository, when the security measures and research consent allow it.Output & ResearchThe raw CSV and other files are available in theexportdirectory. However,
the package also offers a Python interface for programmatic accessors and samplers
of the exported data. Exports can be opened both in an interactive test viallama shellor using following constructor in a program or e.g. Jupyter notebook.from llama import LlamaApi, LlamaStats
  llama = LlamaApi('export')API documentation:This README documents theLlamaApithat in addition to selecting data,
offers quick output from statistical methods inLlamaStats. When the return
values are needed for further processing, theLlamaStatsmust be used directly.llama = LlamaApi(*directories)Constructs a standard interface to work with one or multiple Llama export directories.
If no directory parameters are given the constructor seeks./exportdirectory.
Calculated distributions are cached in memory for multiple queries.*directories: str(optional 0-N paramaters) Llama export directory pathsReturnsan instance ofLlamaApillama.list(select)Lists sources and tables from the data. Subset of data can be selected with
the optional select dictionary.select: dict OR dict[](optional) comprised of the following keyssource: int(optional) index of a learning data sourcetable: str(optional) text to match table name (or id)table_by_id: bool(optional) True to matchtablewith table idpersons: str[](optional) list of person identifiersreverse: bool(optional) True to exclude above matches and include restllama.get(select)Reads and iterates over data form tables. This method can be combined with
many methods fromLlamaStats.select: dict(optional) seellama.listReturnsiteratorovertuplesof(source: dict, table: dict, rows: pandas.DataFrame)llama.progsnap2(select, export_dir)Creates aProgSnap 2compatible
export that merges the selected tables to one main event table.select: dictseellama.listexport_dir: stra directory where the new export is createdllama.overall_description(select)Calculates statistical grade and attempt distributions,
as well as weekly and daily patterns.select: dict(optional) seellama.listllama.overall_pdf(select, pdf_name)Renders a page about overall statistics.select: dict(optional) seellama.listpdf_name: str(optional) a file name for pdf output, else try to plot to windowllama.learner_description(select)Calculates statistical grade and attempt distributions,
as well as weekly and daily patterns for the learners.select: dict(optional) seellama.listllama.learner_pdf(select, pdf_name)Renders a statistic page for each learner.select: dict(optional) seellama.listpdf_name: str(optional) a file name for pdf output, else try to plot to windowllama.learner_variables(select, csv_name)Compresses learner distributions into 21 variables per learner.select: dict(optional) seellama.listcsv_name: str(optional) a file name for csv output, else printllama.execise_description(select)Calculates statistical distributions for each selected exercise table.select: dict(optional) seellama.listllama.exercise_pdf(select, pdf_name)Renders a statistic page for each exercise.select: dict(optional) seellama.listpdf_name: str(optional) a file name for pdf output, else try to plot to windowllama.exercise_variables(select, csv_name)Compresses exercise distributions into 23 variables per exercise.select: dict(optional) seellama.listcsv_name: str(optional) a file name for csv output, else print