[ckan-dev] Hierarchical folder structure for a dataset

Prashant Gupta p.gupta at auckland.ac.nz
Mon Aug 14 23:19:59 UTC 2017


Hi Damian

Thanks for sharing this info. 

I would be interested to know if the code for this customization, especially code for displaying the folder structure as tree, is publicly available. 

Thanks,
Prashant
    ----------------------------------------------------------------------
    
    Date: Thu, 10 Aug 2017 18:24:45 +0000
    From: Damian Steer <D.Steer at bristol.ac.uk>
    To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
    Subject: Re: [ckan-dev] Hierarchical folder structure for a dataset
    Message-ID: <3ED472DF-D2B7-4A02-9883-5BB1DD2BDB6B at bristol.ac.uk>
    Content-Type: text/plain; charset="utf-8"

    Hi Prashant,
    
    Very familiar story :-)
    
    At the University of Bristol we had the same issue. We ended up using package relationships (parent / child)  to represent folder structures. You can see a fairly extreme example at [1].
    
    (We only use CKAN as a catalogue - the data is held externally - and we have a tool that generates the packages using the ckan web ap)
    
    Making it work required a fair amount of customisation:
    
    * Tag top level packages as ?level=top? [2] so browsing works over the top levels rather than showing all subfolders.
    * Generate and cache the tree you see in [1]. It can be expensive to generate.
    
    Archiving is an option (and we do zip as well - see the ?Complete download? link), however it does obsfucate the dataset. For example you can search for ?bedes? [3] and find images of postcards. It also lets the user grab just the bits they need.
    
    On the other hand we do recommend zipping (or probably 7zip in future) in cases where the individual files and directories don?t really make sense except as a whole. For example [4] contains a large number of images that represent slices through a sample. Individually they are very dull.
    
    Hope this helps,
    
    Damian Steer
    
    [1] <https://data.bris.ac.uk/data/dataset/upjtf9os1dzr154phmgvrupib>
    [2] <https://data.bris.ac.uk/data/dataset?level=top>
    [3] <https://data.bris.ac.uk/data/dataset?q=bedes>
    [4] <https://data.bris.ac.uk/data/dataset/37q0cntawxcq1rkktq3e9mr1p>
    
    ...
    
    -- 
    Damian Steer
    Senior Technical Researcher
    Research IT
    +44 (0) 117 39 41724
    
    
 



More information about the ckan-dev mailing list