Skip to content

Commit 9bfd0a3

Browse files
committed
style(docs): update entities doc comments
1 parent 0d1a5c5 commit 9bfd0a3

File tree

20 files changed

+877
-324
lines changed

20 files changed

+877
-324
lines changed

packages/stadata_flutter_sdk/lib/src/features/census/domain/entities/census_area.dart

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
import 'package:stadata_flutter_sdk/src/core/base/base.dart';
22

3-
/// Represents a geographical area covered by a census event
3+
/// Entity class representing geographical areas covered by census events from BPS Web API.
44
///
5-
/// This entity contains information about geographical areas where census
6-
/// data collection takes place, including provinces, regencies, and cities.
5+
/// This class maps to the census areas endpoint:
6+
/// `https://webapi.bps.go.id/v1/api/interoperabilitas/datasource/sensus/id/39/`
77
///
8-
/// Reference: https://webapi.bps.go.id/documentation/#census
8+
/// Contains information about geographical areas where census data collection
9+
/// takes place, including provinces (provinsi), regencies (kabupaten), and
10+
/// cities (kota) across Indonesia.
911
class CensusArea extends BaseEntity {
10-
/// Creates a [CensusArea] with the specified properties
12+
/// Creates a new [CensusArea] instance.
1113
const CensusArea({
1214
required this.id,
1315
required this.name,
1416
required this.slug,
1517
required this.mfdCode,
1618
});
1719

18-
/// Unique identifier for the census area
20+
/// Unique identifier for the geographical area
1921
final int id;
2022

21-
/// Name of the geographical area
23+
/// Official name of the geographical area (e.g., "DKI Jakarta", "Kabupaten Bogor")
2224
final String name;
2325

24-
/// URL-friendly slug representation of the area name
26+
/// URL-friendly slug representation of the area name for web usage
2527
final String slug;
2628

27-
/// MFD (Master File Data) code for the area
29+
/// MFD (Master File Data) code for administrative identification
30+
/// Used for linking with other BPS administrative data systems
2831
final String mfdCode;
2932

3033
@override

packages/stadata_flutter_sdk/lib/src/features/census/domain/entities/census_category.dart

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import 'package:stadata_flutter_sdk/src/core/core.dart';
22

3-
/// Entity class representing a census data category.
3+
/// Entity class representing census data categories from BPS Web API.
44
///
5-
/// Each category contains classification information with items
6-
/// that help categorize the census data (e.g., age groups, gender, etc.).
5+
/// This class maps to the census categories endpoint and contains
6+
/// classification information with items that help categorize census data
7+
/// such as age groups (kelompok umur), gender (jenis kelamin),
8+
/// education levels (tingkat pendidikan), or economic sectors (sektor ekonomi).
9+
///
10+
/// Categories provide hierarchical organization of census data to enable
11+
/// detailed statistical analysis and cross-tabulation of demographic
12+
/// and socioeconomic indicators.
713
class CensusCategory extends BaseEntity {
814
/// Creates a new [CensusCategory] instance.
915
const CensusCategory({
@@ -14,19 +20,21 @@ class CensusCategory extends BaseEntity {
1420
required this.itemName,
1521
});
1622

17-
/// Category identifier
23+
/// Unique identifier for the census category
1824
final String id;
1925

20-
/// Category name/description
26+
/// Descriptive name of the category (e.g., "Age Group", "Gender", "Education Level")
2127
final String name;
2228

23-
/// Category item identifier
29+
/// Identifier for the specific item within this category
2430
final String itemID;
2531

26-
/// Category item code
32+
/// Standardized code for the category item used in data classification
33+
/// Follows BPS coding standards for statistical categorization
2734
final String itemCode;
2835

29-
/// Category item name/description
36+
/// Human-readable name/description of the category item
37+
/// (e.g., "15-19 years", "Male", "High School")
3038
final String itemName;
3139

3240
@override

packages/stadata_flutter_sdk/lib/src/features/census/domain/entities/census_dataset.dart

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import 'package:stadata_flutter_sdk/src/core/core.dart';
22

3-
/// Represents a dataset within a census event topic
3+
/// Entity class representing datasets within census event topics from BPS Web API.
44
///
5-
/// This entity contains information about specific datasets available
6-
/// for a census event, organized by topics such as population,
7-
/// housing, agriculture, or economic activities.
5+
/// This class maps to the census datasets endpoint:
6+
/// `https://webapi.bps.go.id/v1/api/interoperabilitas/datasource/sensus/id/40/`
87
///
9-
/// Reference: https://webapi.bps.go.id/documentation/#census
8+
/// Contains information about specific datasets available for census events,
9+
/// organized by topics such as population (penduduk), housing (perumahan),
10+
/// agriculture (pertanian), or economic activities (kegiatan ekonomi).
1011
class CensusDataset extends BaseEntity {
11-
/// Creates a [CensusDataset] with the specified properties
12+
/// Creates a new [CensusDataset] instance.
1213
const CensusDataset({
1314
required this.id,
1415
required this.topicID,
@@ -18,22 +19,25 @@ class CensusDataset extends BaseEntity {
1819
this.description,
1920
});
2021

21-
/// Unique identifier for the dataset
22+
/// Unique identifier for the census dataset
2223
final int id;
2324

2425
/// Identifier of the topic this dataset belongs to
26+
/// Links to the corresponding census topic
2527
final int topicID;
2628

27-
/// Name of the topic category (e.g., "Population", "Housing")
29+
/// Name of the topic category (e.g., "Population", "Housing", "Agriculture")
2830
final String topic;
2931

3032
/// Identifier of the census event this dataset is part of
33+
/// Links to the corresponding census event
3134
final int eventID;
3235

33-
/// Name of the dataset
36+
/// Descriptive name of the dataset indicating what data it contains
3437
final String name;
3538

36-
/// Optional description providing more details about the dataset
39+
/// Optional detailed description providing more context about the dataset
40+
/// May include methodology, scope, or data collection notes
3741
final String? description;
3842

3943
@override

packages/stadata_flutter_sdk/lib/src/features/census/domain/entities/census_event.dart

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
import 'package:stadata_flutter_sdk/src/core/core.dart';
22

3-
/// Entity class representing a census activity/event from BPS Web API.
3+
/// Entity class representing major census activities and events from BPS Web API.
44
///
55
/// This class maps to the census events endpoint:
66
/// `https://webapi.bps.go.id/v1/api/interoperabilitas/datasource/sensus/id/37/`
77
///
8+
/// Census events represent major data collection activities conducted by BPS
9+
/// on a periodic basis to gather comprehensive demographic, housing, economic,
10+
/// and agricultural statistics across Indonesia. These large-scale surveys
11+
/// provide foundational data for national planning and policy development.
12+
///
13+
/// Major census types include:
14+
/// - Population Census (Sensus Penduduk) - conducted every 10 years
15+
/// - Economic Census (Sensus Ekonomi) - business and economic activity data
16+
/// - Agricultural Census (Sensus Pertanian) - farming and agricultural statistics
17+
/// - Inter-census Population Survey (SUPAS) - mid-decade population updates
18+
///
19+
/// Each census event spans multiple years from planning through data collection
20+
/// to final publication, with standardized methodologies ensuring data quality
21+
/// and comparability across time periods.
22+
///
823
/// Example response from API:
924
/// ```json
1025
/// {
@@ -15,19 +30,27 @@ import 'package:stadata_flutter_sdk/src/core/core.dart';
1530
/// ```
1631
class CensusEvent extends BaseEntity {
1732
/// Creates a new [CensusEvent] instance.
18-
///
19-
/// [id] is the unique identifier for the census activity (e.g. "sp2020")
20-
/// [name] is the name/description of the census activity
21-
/// [year] is the year when the census was conducted
2233
const CensusEvent({required this.id, required this.name, required this.year});
2334

24-
/// Unique identifier for the census activity
35+
/// Unique standardized identifier for the census activity
36+
///
37+
/// Uses BPS coding conventions combining census type and year.
38+
/// Examples: "sp2020" (Sensus Penduduk 2020), "se2016" (Sensus Ekonomi 2016),
39+
/// "st2013" (Sensus Pertanian 2013), "supas2015" (Survei Penduduk Antar Sensus)
2540
final String id;
2641

27-
/// Name/description of the census activity
42+
/// Official name and description of the census activity
43+
///
44+
/// Full Indonesian title of the census as published by BPS.
45+
/// Examples: "Sensus Penduduk 2020", "Sensus Ekonomi 2016",
46+
/// "Sensus Pertanian 2013", "Survei Penduduk Antar Sensus 2015"
2847
final String name;
2948

30-
/// Year when the census was conducted
49+
/// Reference year when the main data collection period occurred
50+
///
51+
/// Represents the primary year of fieldwork and data gathering,
52+
/// though planning and analysis may span multiple years.
53+
/// Used for temporal organization and data series identification.
3154
final int year;
3255

3356
@override

packages/stadata_flutter_sdk/lib/src/features/census/domain/entities/census_topic.dart

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
import 'package:stadata_flutter_sdk/src/core/core.dart';
22

3-
/// Represents a census topic/subject from BPS Web API.
3+
/// Entity class representing thematic topics within census events from BPS Web API.
44
///
55
/// This class maps to the census topics endpoint:
66
/// `https://webapi.bps.go.id/v1/api/interoperabilitas/datasource/sensus/id/38`
77
///
8+
/// Census topics represent specific subject areas or themes covered within
9+
/// a larger census event. They organize census data into logical categories
10+
/// that correspond to different aspects of demographic, social, and economic
11+
/// characteristics collected during the census.
12+
///
13+
/// Common census topics include:
14+
/// - Population characteristics (jumlah dan distribusi penduduk)
15+
/// - Housing conditions (kondisi perumahan)
16+
/// - Educational attainment (tingkat pendidikan)
17+
/// - Employment and labor force (ketenagakerjaan)
18+
/// - Migration patterns (migrasi)
19+
/// - Fertility and mortality (fertilitas dan mortalitas)
20+
/// - Disability status (penyandang disabilitas)
21+
/// - Economic activities (kegiatan ekonomi)
22+
///
23+
/// Each topic provides a structured way to access related datasets and
24+
/// enables researchers to focus on specific demographic or socioeconomic
25+
/// dimensions of the census data.
26+
///
827
/// Example response from API:
928
/// ```json
1029
/// {
@@ -18,37 +37,36 @@ import 'package:stadata_flutter_sdk/src/core/core.dart';
1837
/// "alias_event": "sp2022"
1938
/// }
2039
/// ```
21-
///
22-
/// This endpoint is part of the BPS Web API Census Data service that provides
23-
/// information about specific topics or subjects covered in a census event.
24-
/// The response includes both Indonesian (topik) and English (topic) versions
25-
/// of the topic name.
2640
class CensusTopic extends BaseEntity {
2741
/// Creates a new [CensusTopic] instance.
28-
///
29-
/// Parameters:
30-
/// - [id]: Unique identifier for the census topic
31-
/// - [topic]: Name/description of the census topic
32-
/// (e.g. "Number and Distribution of Population")
33-
/// - [eventID]: ID of the census event this topic belongs to (e.g. "sp2022")
34-
/// - [eventName]: Name of the census event (e.g. "Long Form Sensus Penduduk 2020")
3542
const CensusTopic({
3643
required this.id,
3744
required this.topic,
3845
required this.eventID,
3946
required this.eventName,
4047
});
4148

42-
/// Unique identifier for the census topic
49+
/// Unique numerical identifier for the census topic within BPS system
4350
final int id;
4451

45-
/// Name/description of the census topic in English
52+
/// Descriptive name of the census topic in English
53+
///
54+
/// Standardized English terminology for the thematic area covered by this topic.
55+
/// Examples: "Number and Distribution of Population", "Housing Characteristics",
56+
/// "Educational Attainment", "Labor Force Participation", "Migration Status"
4657
final String topic;
4758

48-
/// ID of the census event this topic belongs to (e.g. "sp2022")
59+
/// Identifier of the parent census event that contains this topic
60+
///
61+
/// Links this topic to its corresponding census event using standardized
62+
/// BPS event codes. Examples: "sp2020", "se2016", "st2013"
4963
final String eventID;
5064

51-
/// Full name of the census event
65+
/// Full official name of the census event in Indonesian
66+
///
67+
/// Complete title of the census activity as published by BPS.
68+
/// Examples: "Sensus Penduduk 2020", "Long Form Sensus Penduduk 2020",
69+
/// "Sensus Ekonomi 2016"
5270
final String eventName;
5371

5472
@override

packages/stadata_flutter_sdk/lib/src/features/domains/domain/entities/domain_entity.dart

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
11
import 'package:stadata_flutter_sdk/src/core/core.dart';
22

3-
/// Dart class representation of BPS Statistics Domain
3+
/// Entity class representing statistical domains from BPS Web API.
44
///
5-
/// docs: https://webapi.bps.go.id/documentation/#domain
5+
/// This class maps to the domains endpoint:
6+
/// `https://webapi.bps.go.id/v1/api/list/domain/{domain_id}`
7+
///
8+
/// Domains represent different geographical or administrative levels where
9+
/// statistical data is collected and organized, including:
10+
/// - National level (nasional)
11+
/// - Provincial level (provinsi)
12+
/// - Regency/City level (kabupaten/kota)
13+
/// - Sub-district level (kecamatan)
14+
///
15+
/// Each domain provides access to statistical datasets specific to that
16+
/// administrative boundary, enabling users to retrieve data at the appropriate
17+
/// geographical scope for their analysis needs.
18+
///
19+
/// Documentation: https://webapi.bps.go.id/documentation/#domain
620
721
class DomainEntity extends BaseEntity {
8-
/// Constructor of DomainEntity
22+
/// Creates a new [DomainEntity] instance.
923
const DomainEntity({required this.id, required this.name, required this.url});
1024

11-
/// id of the domain
25+
/// Unique identifier for the statistical domain
1226
///
13-
/// represent 'domain_id' from api response
27+
/// Represents 'domain_id' from the API response.
28+
/// Common values include province codes (e.g., "3200" for West Java),
29+
/// regency codes, or special identifiers like "0000" for national level.
1430
final String id;
1531

16-
/// name of the domain
32+
/// Descriptive name of the statistical domain
1733
///
18-
/// represent 'domain_name' from api response
34+
/// Represents 'domain_name' from the API response.
35+
/// Examples: "DKI Jakarta", "Kabupaten Bogor", "Indonesia"
1936
final String name;
2037

21-
/// url of the domain
38+
/// Official URL endpoint for accessing this domain's statistical data
2239
///
23-
/// represent 'domain_url' from api response
40+
/// Represents 'domain_url' from the API response.
41+
/// Points to the specific BPS regional office or data portal
42+
/// responsible for this geographical area.
2443
final String url;
2544

2645
@override

0 commit comments

Comments
 (0)