Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elimu-ai/analytics
📊 Android application which collects, provides and uploads learning event data
https://github.com/elimu-ai/analytics
csv data data-science dataset edtech egma egra infrastructural learning-analytics
Last synced: 3 months ago
JSON representation
📊 Android application which collects, provides and uploads learning event data
- Host: GitHub
- URL: https://github.com/elimu-ai/analytics
- Owner: elimu-ai
- License: mit
- Created: 2016-08-05T19:10:59.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T05:44:16.000Z (6 months ago)
- Last Synced: 2024-08-08T07:09:14.865Z (6 months ago)
- Topics: csv, data, data-science, dataset, edtech, egma, egra, infrastructural, learning-analytics
- Language: Java
- Homepage: https://jitpack.io/#elimu-ai/analytics
- Size: 633 KB
- Stars: 0
- Watchers: 13
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# elimu.ai Analytics 📊
Android application which collects, provides and uploads learning event data.
## Software Architecture
[
![]()
](https://github.com/elimu-ai/wiki/blob/main/SOFTWARE_ARCHITECTURE.md)## Learning Events
The various types of _learning events_ are handled by the Android receivers at [`app/src/main/java/ai/elimu/analytics/receiver`](app/src/main/java/ai/elimu/analytics/receiver).
A _learning event_ is an event without any corresponding testing of the student's mastery of a concept. For example; A student presses a word in a storybook and listens to its pronunciation.
* `StoryBookLearningEvent`
* `WordLearningEvent`
* `LetterLearningEvent`## Assessment Events
The various types of _assessment events_ are handled by the Android receivers at [`app/src/main/java/ai/elimu/analytics/receiver`](app/src/main/java/ai/elimu/analytics/receiver).
An _assessment event_ is an event that involves testing of whether or not the student is able to master a concept. For example; A word is sounded out, and the student is asked select the corresponding written text amongst a list of alternatives (multiple choice).
* `WordAssessmentEvent`
* `LetterAssessmentEvent`## Development 👩🏽💻
Compile APK:
```
./gradlew clean build
```Install APK:
```
adb install app/build/outputs/apk/debug/ai.elimu.analytics--debug.apk
```### Utils Library 📦
A [`utils`](utils) library (`.aar`) makes it easier for other Android apps to report learning/assessment events.
* [`LearningEventUtil`](https://github.com/elimu-ai/analytics/blob/main/utils/src/main/java/ai/elimu/analytics/utils/LearningEventUtil.java)
* [`AssessmentEventUtil`](https://github.com/elimu-ai/analytics/blob/main/utils/src/main/java/ai/elimu/analytics/utils/AssessmentEventUtil.java)See https://jitpack.io/#elimu-ai/analytics/ for the latest version.
#### Utils Usage Sample
> [!NOTE]
> To use the `utils` library in another Android app, add the dependency in `app/build.gradle`:```java
implementation 'com.github.elimu-ai:analytics:@aar'
```For an example of an app that is reporting learning events, see https://github.com/elimu-ai/vitabu:
* https://github.com/elimu-ai/vitabu/blob/main/app/build.gradle#L51
* https://github.com/elimu-ai/vitabu/blob/main/app/src/main/java/ai/elimu/vitabu/ui/storybook/ChapterFragment.java#L150### Database Migration 🔀
> [!IMPORTANT]
> When adding a new database `@Entity` (or modifying an existing one), you need to prepare a database
migration (SQL script) in
[`app/src/main/java/ai/elimu/analytics/db/RoomDb.java`](app/src/main/java/ai/elimu/analytics/db/RoomDb.java).Follow these steps:
1. Add the new/modified `@Entity` to [`app/src/main/java/ai/elimu/analytics/entity/`](app/src/main/java/ai/elimu/analytics/entity/)
1. Include the entity in the `entities` section of the `@Database` in [`app/src/main/java/ai/elimu/analytics/db/RoomDb.java`](app/src/main/java/ai/elimu/analytics/db/RoomDb.java)
1. Bump the `@Database` version in [`app/src/main/java/ai/elimu/analytics/db/RoomDb.java`](app/src/main/java/ai/elimu/analytics/db/RoomDb.java)
1. Build the code with `./gradlew clean build`
1. Open the new database schema generated at `app/schemas/ai.elimu.analytics.db.RoomDb/.json`
- Under `entities`, find the matching `tableName` and copy its SQL script from the `createSql` property.
1. Open `RoomDb.java` and add a new method for the latest migration
- Paste the SQL script from the above JSON schema, and replace `${TABLE_NAME}` with the name of the table you created/modified.
- Include the migration in the `getDatabase` method in `RoomDb.java`.
1. To run the database migration, launch the application on your device.
1. To verify that your database migration ran successfully, look at the Logcat output and
ensure that there are no RoomDb errors:
```
2023-10-25 15:40:55.640 15303-914 RoomDb ai.elimu.analytics.debug I migrate (5 --> 6)
2023-10-25 15:40:55.641 15303-914 RoomDb ai.elimu.analytics.debug I sql: CREATE TABLE IF NOT EXISTS
`LetterSoundCorrespondenceLearningEvent` (`letterSoundCorrespondenceLearningEventId` INTEGER, `androidId` TEXT NOT NULL, `packageName` TEXT NOT NULL, `time`
INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT)
```> [!TIP]
> You can also use Android Studio's _Database Inspector_ to verify that the database
migration succeeded:![Database Inspector](https://github.com/elimu-ai/analytics/assets/1451036/64eb7aa2-40a3-4347-91b8-971b1f833241)
---
![]()
elimu.ai - Free open-source learning software for out-of-school children ✨🚀
Website 🌐
•
Wiki 📃
•
Projects 👩🏽💻
•
Milestones 🎯
•
Community 👋🏽
•
Support 💜