CountRows - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DataSets[Builtin][Reference]

  

GetName

  

obtain a short name of a reference

  

GetIdentifier

  

obtain the identifier for a reference

  

GetDescription

  

obtain a description of a reference

  

GetElementNames

  

obtain the row names of a reference

  

CountRows

  

obtain the number of rows of a reference

  

GetHeaders

  

obtain the column names of a reference

  

GetData

  

obtain the data of a reference

 

Calling Sequence

Parameters

GetName

GetDescription

GetIdentifier

GetElementNames

CountRows

GetHeaders

GetData

Examples

Compatibility

Calling Sequence

GetName(ref)

GetDescription(ref)

GetElementNames(ref)

CountRows(ref)

GetHeaders(ref)

GetData(ref)

Parameters

ref

-

reference to built-in data

GetName

• 

Returns the name of the reference as a string. This is a short string description of the data set. If you create a subset of a data set by using indexing, the name may change if the result has only a single (non-name) column or a single row.

GetDescription

• 

Returns a string description of the data set. If you create a subset of a data set by using indexing, the description may change if the result has only a single (non-name) column or a single row.

GetIdentifier

• 

Returns the identifier of a reference as a string. This is a unique identifier that can be used to find this reference among the built-in data sets.

GetElementNames

• 

Returns a list of strings which are the names of the rows in the reference. Each row name is unique in the containing data set. This command may be slow if used on the full GeoNames data set.

CountRows

• 

Returns the total number of rows in the reference in a efficient manner.

GetHeaders

• 

Returns a list of strings which are the names of the columns in the reference. Each column name is unique in the containing data set.

GetData

• 

Returns the reference as a Matrix, without the column headers and without the row names. This command will retrieve all metadata, which may be slow if used on a large data set.

Examples

withDataSets:

refReferenceBuiltin,Country

refCountry (Name)CO2 EmissionsCPI ChangeTypesetting:-_Hold(124 more)AfghanistanTimeSeries 9809.225TimeSeries 4.9759515055383Typesetting:-_HoldAlbaniaTimeSeries 5716.853TimeSeries 1.41109078954244Typesetting:-_HoldAlgeriaTimeSeries 145400.217TimeSeries 1.95176821052894Typesetting:-_HoldTypesetting:-_HoldTypesetting:-_HoldTypesetting:-_HoldTypesetting:-_Hold(182 more)

(1)

GetIdentifierref

Country

(2)

GetNameref

Country properties

(3)

GetDescriptionref

A table of country properties, containing immediate values for some properties and references to time series data (from Quandl) for others.

(4)

GetElementNamesref

Afghanistan,Albania,Algeria,Angola,Antigua and Barbuda,Argentina,Armenia,Australia,Austria,Azerbaijan,Bahrain,Bangladesh,Barbados,Belarus,Belgium,Belize,Benin,Bhutan,Bolivia,Bosnia and Herzegovina,Botswana,Brazil,Brunei,Bulgaria,Burkina Faso,Burundi,Cabo Verde,Cambodia,Cameroon,Canada,Central African Republic,Chad,Chile,China,Colombia,Comoros,Congo,Congo-Brazzaville,Costa Rica,Croatia,Cuba,Cyprus,Czech Republic,Denmark,Djibouti,Dominica,Dominican Republic,Ecuador,Egypt,El Salvador,Equatorial Guinea,Eritrea,Estonia,Ethiopia,Fiji,Finland,France,Gabon,Gambia,Georgia,Germany,Ghana,Greece,Grenada,Guatemala,Guinea,Guinea-Bissau,Guyana,Haiti,Honduras,Hong Kong,Hungary,Iceland,India,Indonesia,Iran,Iraq,Ireland,Israel,Italy,Ivory Coast,Jamaica,Japan,Jordan,Kazakhstan,Kenya,Kiribati,Kosovo,Kuwait,Kyrgyzstan,Laos,Latvia,Lebanon,Lesotho,Liberia,Libya,Lithuania,Luxembourg,Macedonia,Madagascar,Malawi,Malaysia,Maldives,Mali,Malta,Mauritania,Mauritius,Mexico,Moldova,Mongolia,Montenegro,Morocco,Mozambique,Myanmar,Namibia,Nepal,Netherlands,New Zealand,Nicaragua,Niger,Nigeria,Norway,Oman,Pakistan,Panama,Papua New Guinea,Paraguay,Peru,Philippines,Poland,Portugal,Qatar,Romania,Russia,Rwanda,Saint Lucia,Samoa,Sao Tome and Principe,Saudi Arabia,Senegal,Serbia,Seychelles,Sierra Leone,Singapore,Slovakia,Slovenia,Solomon Islands,Somalia,South Africa,South Korea,South Sudan,Spain,Sri Lanka,Sudan,Suriname,Swaziland,Sweden,Switzerland,Syria,Taiwan,Tajikistan,Tanzania,Thailand,The Bahamas,Timor-Leste,Togo,Tonga,Trinidad and Tobago,Tunisia,Turkey,Turkmenistan,Tuvalu,UAE,UK,USA,Uganda,Ukraine,Uruguay,Uzbekistan,Vanuatu,Venezuela,Vietnam,Yemen,Zambia,Zimbabwe

(5)

CountRowsref

185

(6)

GetHeadersref

CO2 Emissions,CPI Change,Child Mortality,Currency Code,Fertility Rate,GDP - LCU,GDP - USD,GDP Deflator,Gini Index,Internet Users,Net Debt,Population,Real GDP - LCU,Real GDP Change,Adult Literacy Rate,Adults Living with HIV,Armed Forces Personnel,Cell Phone Subscribers,Commercial Tax Rate,Exports Share of GDP,Female Population,Government Revenues,Government Spending,Gross Production,Human Development Index,Imports Share of GDP,Industry Share of GDP,Low Birth-Weight Babies,Methane Emissions,Military Expenditures,Nurses per 1000 People,Passenger Vehicles,Population Above Age 64,Population Below Age 15,Population Density,Population Growth Rate,Primary Enrolment Rate,Rural Population,Services Share of GDP,Stock Market Index,Surplus or Deficit,Tertiary Enrolment Rate,Under-Nourished People,Unemployment Rate,Urban Population,Youth Literacy Rate,Agriculture Share of Employment,Agriculture Share of GDP,Deaths From Injury and Accident,Female-Male Literacy Ratio,Gross Inland Availability,Health Expenditure Per Capita,Household Electrification Rate,Industry Share of Employment,International Tourism Arrivals,Life Expectancy at Birth,Nominal USD Exchange Rate,Population Aged 15 to 64,Secondary Enrolment Rate,Services Share of Employment,Stock Market Capitalization,Urban Population in Slums,Access to Improved Water Sources,Deaths From Disease and Nutrition,Deaths From Non-Communicable Diseases,Access to Improved Sanitation Facilities,Population Affected by Droughts or Floods,Population Living with Less than Five Dollars a Day,2 Letter Country Code,Country Code for Internet Top-Level Domain,3 Letter Country Code,Heliports,Children under the age of 5 years underweight (%),Military expenditures (% GDP),Contraceptive prevalence rate (%),Gross national saving (% GDP),Public debt (% GDP),Total renewable water resources,Health expenditures (% GDP),Obesity - adult prevalence rate (%),Hospital bed density / 1000 pop,Physicians density / 1000 pop,Education expenditures (% GDP),Electricity - from other renewable sources (%),Electricity - from fossil fuels (%),Electricity - from nuclear fuels (%),Electricity - from hydroelectric plants (%),Crude oil - exports,Crude oil - imports,Crude oil - production,Refined petroleum products - exports,Carbon dioxide emissions from consumption of energy,Electricity - installed generating capacity,Refined petroleum products - production,Refined petroleum products - consumption,Refined petroleum products - imports,Natural gas - exports,Natural gas - imports,Natural gas - production,Natural gas - consumption,Natural gas - proved reserves,Crude oil - proved reserves,Electricity - exports,Taxes and other revenues (% GDP),Electricity - imports,Telephones - mobile cellular,Budget surplus (+) or deficit (-) (% GDP),Electricity - production,Electricity - consumption,Telephones - main lines in use,Net migration rate / 1000 pop / year,Industrial production growth rate (%),Death rate / 1000 pop / year,Birth rate / 1000 pop / year,Unemployment rate (%),Inflation rate (consumer prices) (% / year),Total fertility rate (children / woman),HIV/AIDS - adult prevalence rate,HIV/AIDS - deaths / year,Internet hosts,Population growth rate (% / year),Labor force,Airports,Irrigated land,Land boundaries,Coastline

(7)

GetDataref1..2,1..2

Data setCO2 emissions (kt) - AfghanistanQuandl WWDI/AFG_EN_ATM_CO2E_KTup to 65 rows (annual), 1 column1950-12-31 - 2014-12-31Data setInflation, consumer prices (annual %) - AfghanistanQuandl WWDI/AFG_FP_CPI_TOTL_ZGup to 13 rows (annual), 1 column2005-12-31 - 2017-12-31Data setCO2 emissions (kt) - AlbaniaQuandl WWDI/ALB_EN_ATM_CO2E_KTup to 65 rows (annual), 1 column1950-12-31 - 2014-12-31Data setInflation, consumer prices (annual %) - AlbaniaQuandl WWDI/ALB_FP_CPI_TOTL_ZGup to 28 rows (annual), 1 column1992-12-31 - 2019-12-31

(8)

Create a reference to the GeoNames data set.

refgBuiltin:-ReferenceGeonames

refgGeonames (GeoNamesid)NameTypeTypesetting:-_Hold(7 more)Typesetting:-_Hold68Boneh-ye Mehdisection of populated placeTypesetting:-_HoldTypesetting:-_Hold121Lab SefidlocalityTypesetting:-_HoldTypesetting:-_Hold166GorizilocalityTypesetting:-_HoldTypesetting:-_HoldTypesetting:-_HoldTypesetting:-_HoldTypesetting:-_Hold(1155858 more)

(9)

Count the number of rows in the GeoNames data set:

CountRowsrefg

1155861

(10)

Available data variables in the GeoNames data set include:

GetHeadersrefg

Name,Type,Latitude,Longitude,Country,Province/State/Region,City/County,Population,Time Zone

(11)

Search for Waterloo in Canada:

Waterloo_DatarefgCountry&equals;Canada&comma;Type&equals;populated place&comma;1000<Population&comma;Name&equals;Waterloo

Waterloo_DataGeonames (GeoNamesid)NameTypeTypesetting:-_Hold(7 more)Typesetting:-_Hold6176821Waterloopopulated placeTypesetting:-_HoldTypesetting:-_Hold6176823Waterloopopulated placeTypesetting:-_Hold

(12)

Return the all of the data from the search above:

GetDataWaterloo_Data

Waterloopopulated place45.3500799999999984−72.5158200000000051CanadaQuebecMonteregie4064America/TorontoWaterloopopulated place43.4667999999999992−80.5163900000000012CanadaOntarioundefined97475America/Toronto

(13)

To return specific data, such as the Population:

GetDataWaterloo_Data..&comma;Population

406497475

(14)

Compatibility

• 

The DataSets[Builtin][Reference][GetName], DataSets[Builtin][Reference][GetIdentifier], DataSets[Builtin][Reference][GetDescription], DataSets[Builtin][Reference][GetElementNames], DataSets[Builtin][Reference][CountRows], DataSets[Builtin][Reference][GetHeaders] and DataSets[Builtin][Reference][GetData] commands were introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

DataSets