Skip to content

Static Tables

Tabel statis BPS — data tabular yang sudah dipublikasikan.

List Static Tables

typescript
import { useStaticTables, DataLanguage } from 'stadata-js'

const { fetchStaticTableList } = useStaticTables()

const result = await fetchStaticTableList({
  domain: '7200',
  lang: DataLanguage.ID,
  page: 1,
  perPage: 10,
  keyword: 'kemiskinan',
  year: 2023,
})

Parameter

ParameterTipeWajibKeterangan
domainstringKode domain BPS
langDataLanguageBahasa respons
pagenumberHalaman (default: 1)
perPagenumberItem per halaman
keywordstringKata kunci pencarian
monthnumberFilter bulan (1-12)
yearnumberFilter tahun
cancelTokenCancelTokenToken untuk membatalkan request

View Static Table

typescript
const { fetchStaticTableDetail } = useStaticTables()

const result = await fetchStaticTableDetail({
  id: 1234,
  domain: '7200',
  lang: DataLanguage.ID,
})

Parameter

ParameterTipeWajibKeterangan
idstring | numberID tabel
domainstringKode domain BPS
langDataLanguageBahasa respons

Tipe Data

typescript
class StaticTable {
  id: number;
  title: string;
  subjectId: number;
  size: string;
  updatedAt: Date | null;
  excel: string;   // URL file Excel
}

Released under the MIT License.