Production of crops by district, broken down by crop type and species. The table shows a preview of the dataset using the first 100 rows only, as the full dataset is over 10,000 rows in size.
0 viewsΒ·0 downloads
Data on crops in Malaysia is collected via establishment-level surveys and censuses conducted by the Department of Statistics Malaysia (DOSM) in collaboration with the Department of Agriculture (DOA). This data is then used both for the production of agricultural statistics, as well as in the compilation of Malaysia's Gross Domestic Product (GDP) data.
For this dataset specifically, the following classifications are helpful to understand (note: paddy, coconut, and flowers are considered self-explanatory):
Values for breakdowns may be slightly different to totals when summed, due to rounding.
This data was also published as part of the Ministry of Agriculture and Food Security's annual Agrofood Statistics report.
Production of crops by district, broken down by crop type and species. The table shows a preview of the dataset using the first 100 rows only, as the full dataset is over 10,000 rows in size.
Name in Dataset | Variable | Definition |
---|---|---|
date (Date) | Date | The date in YYYY-MM-DD format, with MM-DD set to 01-01 as the data is at annual frequency |
state (Categorical) | State | One of 16 states, or Malaysia. Note that there is no data for W.P. Putrajaya, due to the lack of commercial agriculture in the state. |
district (Categorical) | Administrative District | One of 160 administrative districts; however, districts with zero agricultural activity are removed from the dataset |
crop_type (Categorical) | Crop Type | The type of crop in snake case, covering cash crops, industrial crops, coconut, paddy, flowers, herbs, spices, fruits and vegetables |
crop_species (Categorical) | Crop Species | The specific species for the crop type in snake case |
production (Float) | Production | The total production of the crop in metric tonnes |
31 Dec 2023, 12:00
31 Dec 2024, 12:00
This data is made open under the Creative Commons Attribution 4.0 International License (CC BY 4.0). A copy of the license is available Here.
Full Dataset (CSV)
Recommended for individuals seeking an Excel-friendly format.
0
Full Dataset (Parquet)
Recommended for data scientists seeking to work with data via code.
0
Connect directly to the data with Python.
# If not already installed, do: pip install pandas fastparquet
import pandas as pd
URL_DATA = 'https://storage.data.gov.my/agriculture/crops_district_production.parquet'
df = pd.read_parquet(URL_DATA)
if 'date' in df.columns: df['date'] = pd.to_datetime(df['date'])
print(df)
The following code is an example of how to make an API query to retrieve the data catalogue mentioned above. You can use different programming languages by switching the code accordingly. For a complete guide on possible query parameters and syntax, please refer to the official Open API Documentation.
import requests
import pprint
url = "https://api.data.gov.my/data-catalogue?id=crops_district_production&limit=3"
response_json = requests.get(url=url).json()
pprint.pprint(response_json)
Department of Statistics Malaysia
Β© 2024 Public Sector Open Data
Open Data
data.gov.my