Skip to content
Snippets Groups Projects
Commit 5fab975c authored by leufen1's avatar leufen1
Browse files

added meta data. dataset name and download date are still missing

parent 487b51e9
Branches
Tags
2 merge requests!8New App wheat production,!6Resolve "New App: Wheat Production"
......@@ -9,12 +9,17 @@ from rest_framework.serializers import BaseSerializer
# helper functions
def get_provenance(obj):
"""construct provenance information on population density dataset"""
"""construct provenance information on wheat production dataset"""
prov = OrderedDict([
('dataset_name', '?'),
('dataset_description', """Wheat production ?"""),
('data_source', """?"""),
('datacenter_url', '?'),
('dataset_description', """Wheat production values for the globe at 5 arc minute resolution. The data are in
units of production (irrigated + non-irrigated) in thousand tonnes. \nThe data were downloaded from the GAEZ
data portal ( http://gaez.fao.org/Main.html# ) and then output to ascii text format by:\nDr Katrina Sharps\n
Centre for Ecology & Hydrology, Environment Centre Wales, UK\nTel. + 44 (0)1248 374518 (direct)\n
Tel. + 44 (0)1248 374500 (reception)\nE-mail: katshar@ceh.ac.uk"""),
('data_source', """Dr Katrina Sharps\nCentre for Ecology & Hydrology, Environment Centre Wales, UK\n
Tel. + 44 (0)1248 374518 (direct)\nTel. + 44 (0)1248 374500 (reception)\nE-mail: katshar@ceh.ac.uk"""),
('datacenter_url', 'http://gaez.fao.org/Main.html'),
('download_date', '?'),
('timestamp', dt.datetime.now().isoformat())
])
......@@ -45,7 +50,7 @@ class AggSerializer(BaseSerializer):
(agg_function, OrderedDict([
(d, v) for d, v in zip(obj['direction'], val)
])),
('units', 'km-2'),
('units', 'kt'),
('radius', obj['radius']),
])
if obj['direction'] is None:
......@@ -55,7 +60,7 @@ class AggSerializer(BaseSerializer):
('agg_function', agg_function),
('many', False),
(agg_function, val),
('units', 'km-2'),
('units', 'kt'),
('radius', obj['radius']),
('direction', obj['direction']),
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment