Retrieve a classification tables from CELLAR and FAO

retrieveClassificationTable(
  prefix,
  endpoint,
  conceptScheme,
  level = "ALL",
  language = "en",
  CSVout = FALSE
)

Arguments

prefix

The SPARQL instruction for a declaration of a namespace prefix. It can be found using the classEndpoint() function.

endpoint

The SPARQL Endpoint, the valid values are "CELLAR" or "FAO".

conceptScheme

Taxonomy of the SKOS object to be retrieved. It can be found using the classEndpoint() function.

level

The levels of the objects in the collection to be retrieved, it can be found using the structureData() function. By default is set to "ALL". This is an optional argument.

language

Language of the table. By default is set to "en". This is an optional argument.

CSVout

The valid values are FALSE or TRUE. In both cases the correspondence table as an R object. If output should be saved as a csv file, the argument should be set as TRUE. By default, no csv file is produced.

Value

retrieveClassificationTable() returns a classification tables from CELLAR and FAO. The table includes the following variables:

  • Classification name (e.g. nace2): the code of each object

  • NAME: the corresponding name of each object

  • Include: details on each object

  • Include_Also: details on each object

  • Exclude: details on each object

  • URL: the URL from which the SPARQL query was retrieved

Examples

{
    prefix = "nace2"
    endpoint = "CELLAR"
    conceptScheme = "nace2"
    dt = retrieveClassificationTable(prefix, endpoint, conceptScheme)
    # By default retrieved all levels and only English
    head(dt)
    }
#>   nace2                                                                   NAME
#> 2    01  01 Crop and animal production, hunting and related service activities
#> 3  01.1                                    01.1 Growing of non-perennial crops
#> 4 01.11 01.11 Growing of cereals (except rice), leguminous crops and oil seeds
#> 5 01.12                                                  01.12 Growing of rice
#> 6 01.13               01.13 Growing of vegetables and melons, roots and tubers
#> 7 01.14                                            01.14 Growing of sugar cane
#>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Include
#> 2                                                                                                                                                                                                                                                                                                                                        This division includes two basic activities, namely the production of crop products and production of animal products, covering also the forms of organic agriculture, the growing of genetically modified crops and the raising of genetically modified animals. This division includes growing of crops in open fields as well in greenhouses.\n \nGroup 01.5 (Mixed farming) breaks with the usual principles for identifying main activity. It accepts that many agricultural holdings have reasonably balanced crop and animal production, and that it would be arbitrary to classify them in one category or the other.
#> 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This group includes the growing of non-perennial crops, i.e. plants that do not last for more than two growing seasons. Included is the growing of these plants for the purpose of seed production.
#> 4                                                                                                                                                                                                    This class includes all forms of growing of cereals, leguminous crops and oil seeds in open fields. The growing of these crops is often combined within agricultural units.\n\nThis class includes:\n- growing of cereals such as:\n  • wheat\n  • grain maize\n  • sorghum\n  • barley\n  • rye\n  • oats\n  • millets\n  • other cereals n.e.c.\n- growing of leguminous crops such as:\n  • beans\n  • broad beans\n  • chick peas\n  • cow peas\n  • lentils\n  • lupines\n  • peas\n  • pigeon peas\n  • other leguminous crops\n- growing of oil seeds such as:\n  • soya beans\n  • groundnuts\n  • castor bean\n  • linseed\n  • mustard seed\n  • niger seed\n  • rapeseed\n  • safflower seed\n  • sesame seed\n  • sunflower seed\n  • other oil seeds
#> 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     This class includes:\n- growing of rice (including organic farming and the growing of genetically modified rice)
#> 6 This class includes:\n- growing of leafy or stem vegetables such as:\n  • artichokes\n  • asparagus\n  • cabbages\n  • cauliflower and broccoli\n  • lettuce and chicory\n  • spinach\n  • other leafy or stem vegetables\n- growing of fruit bearing vegetables such as:\n  • cucumbers and gherkins\n  • eggplants (aubergines)\n  • tomatoes\n  • watermelons\n  • cantaloupes\n  • other melons and fruit-bearing vegetables\n- growing of root, bulb or tuberous vegetables such as:\n  • carrots\n  • turnips\n  • garlic\n  • onions (incl. shallots)\n  • leeks and other alliaceous vegetables\n  • other root, bulb or tuberous vegetables\n- growing of mushrooms and truffles\n- growing of vegetable seeds, including sugar beet seeds, excluding other beet seeds\n- growing of sugar beet\n- growing of other vegetables\n- growing of roots and tubers such as:\n  • potatoes\n  • sweet potatoes\n  • cassava\n  • yams\n  • other roots and tubers
#> 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
#>                                                                                                                     Include_Also
#> 2 This division also includes service activities incidental to agriculture, as well as hunting, trapping and related activities.
#> 3                                                                                                                               
#> 4                                                                                                                               
#> 5                                                                                                                               
#> 6                                                                                                                               
#> 7                                                                                                                               
#>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Exclude
#> 2 Agricultural activities exclude any subsequent processing of the agricultural products (classified under divisions 10 and 11 (Manufacture of food products and beverages) and division 12 (Manufacture of tobacco products)), beyond that needed to prepare them for the primary markets. The preparation of products for the primary markets is included here.\n\nThe division excludes field construction (e.g. agricultural land terracing, drainage, preparing rice paddies etc.) classified in section F (Construction) and buyers and cooperative associations engaged in the marketing of farm products classified in section G. Also excluded is the landscape care and maintenance, which is classified in class 81.30.
#> 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
#> 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This class excludes:\n- growing of rice, see 01.12\n- growing of sweet corn, see 01.13\n- growing of maize for fodder, see 01.19\n- growing of oleaginous fruits, see 01.26
#> 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
#> 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This class excludes:\n- growing of chillies, peppers (capsicum sop.) and other spices and aromatic crops, see 01.28\n- growing of mushroom spawn, see 01.30
#> 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         This class excludes:\n- growing of sugar beet, see 01.13
#>                                    URL
#> 2   http://data.europa.eu/ux2/nace2/01
#> 3  http://data.europa.eu/ux2/nace2/011
#> 4 http://data.europa.eu/ux2/nace2/0111
#> 5 http://data.europa.eu/ux2/nace2/0112
#> 6 http://data.europa.eu/ux2/nace2/0113
#> 7 http://data.europa.eu/ux2/nace2/0114