Coal is a combustible black or brownish-black sedimentary rock usually occurring in rock strata in layers or veins called coal beds or coal seams. The harder forms, such as anthracite coal, can be regarded as metamorphic rock because of later exposure to elevated temperature and pressure. Coal is composed primarily of carbon, along with variable quantities of other elements, chiefly hydrogen, sulfur, oxygen, and nitrogen. Coal is a fossil fuel that forms when dead plant matter is converted into peat, which in turn is converted into lignite, then sub-bituminous coal, after that bituminous coal, and lastly anthracite. This involves biological and geological processes. The geological processes take place over millions of years. Throughout human history, coal has been used as an energy resource, primarily burned for the production of electricity and heat, and is also used for industrial purposes, such as refining metals. Coal is the largest source of energy for the generation of electricity worldwide, as well as one of the largest worldwide anthropogenic sources of carbon dioxide releases. The extraction of coal, its use in energy production and its byproducts are all associated with environmental and health effects including climate change. Coal is extracted from the ground by coal mining. Since 1983, the world's top coal producer has been China. In 2015 China produced 3.747 billion tonnes of coal – 48% of 7.861 billion tonnes world coal production. In 2015 other large producers were United States (813 million tonnes), India (678), European Union (539) and Australia (503). In 2010 the largest exporters were Australia with 328 million tonnes (27% of world coal export) and Indonesia with 316 million tonnes (26%), while the largest importers were Japan with 207 million tonnes (18% of world coal import), China with 195 million tonnes (17%) and South Korea with 126 million tonnes (11%).