Wolfram 知識ベース | 試してみよう

コードはどれも,コード内をクリックしてから,編集したり,
+
を押して実行したりできます.
現実世界のデータへの迅速なアクセス 何百もの重要な領域において注意深く精選され,今も増加し続けるデータのコレクションは,Wolfram言語全体にシームレスに統合されており,これを使って計算や可視化を行うことができます.

地理データを使った計算

地理データを使って地図を作成する(この評価には時間がかかる場合がある):
実行
In[]:=
GeoRegionValuePlot
Europe
COUNTRIES
->"GreenhouseGasEmissions",MissingStyle->Blue
Out[]=
各国のデータの集合を取得する:
実行
In[]:=
rawdata=EntityValueEntityClass["Country","Countries"],
poverty fraction
,
GDP
nominal|per capita
,
population
,
continent
;
欠損データを削除し,大陸別にグループ分けする:
実行
In[]:=
cleandata=GroupBy[DeleteMissing[rawdata,1,1],Last,MapApply[Function[{pov,gdp,pop},{pov,QuantityMagnitude[gdp],pop}]]];
きれいになったデータをプロットする:
実行
In[]:=
BubbleChartcleandata,


物理数量を使った計算

スペクトル線のクラスについての波長を取得する:
実行
In[]:=
wavelengths=EntityValue
helium I
4000
Å
to
7500
Å
SPECTRAL LINES
,
observed wavelength
;
これらの線を可視スペクトルでプロットする:
実行
In[]:=
Graphics​​Map[​​{ColorData["VisibleSpectrum"][#],Line[{{#,0},{#,1}}]}&,​​QuantityMagnitude[wavelengths,"Nanometers"]​​],
​​
物質についての熱力学データを取得する:
実行
In[]:=
substances={"Water","Methanol","Octane"};​​temps=Quantity[Range[1,130],"DegreesCelsius"];​​densitydata=Table[​​{temps,ThermodynamicData[substance,"Density",{"Temperature"->temps}]}//Transpose,​​{substance,substances}];
取得したデータを可視化する:
実行
In[]:=
ListLinePlot[densitydata,AxesLabel->Automatic,PlotLegends->substances]
プロットの中の急激な密度低下と既知の沸点を比較する:
実行
In[]:=
EntityValue[Interpreter["Chemical"][substances],"BoilingPoint","Association"]

生物・生態データを使った計算

解剖学的構造の部位を3Dでプロットする:
実行
In[]:=
AnatomyPlot3D
heart
ANATOMICAL STRUCTURE
,
lung
ANATOMICAL STRUCTURE

解剖学の実体を比較する:
実行
In[]:=
organs=
heart
ANATOMICAL STRUCTURE
,
liver
ANATOMICAL STRUCTURE
,
brain
ANATOMICAL STRUCTURE
;​​properties={"Mass","CellCount"};​​ListPlot[EntityValue[organs,properties,"Association"],AxesLabel->properties]
生体分子配列を定義してその構造的特性を調べる:
実行
In[]:=
insulin=
BioSequence[
]
;​​MoleculePlot[Molecule[insulin]]
データ取得のための実体クラスを定義する:
実行
In[]:=
endangeredMammal=EntityClass"TaxonomicSpecies",
phyletic groups
->
mammal
SPECIES PHYLETIC GROUP
,
conservation status
->
Endangered
SPECIES CONSERVATION STATUS
;​​
絶滅危惧種の哺乳類の生息数を国別に可視化する:
実行
In[]:=
GeoRegionValuePlot[EntityValue[endangeredMammal,"ObservationCountries"]//Flatten//Tally]
Out[]=

金融データの解析

金融データを取得して,標準形式で提示する:
実行
In[]:=
TradingChart["GE",{"Volume","SimpleMovingAverage","BollingerBands"}]
テキストから金融実体を解釈する:
実行
In[]:=
stocks=Interpreter["Financial"][{"GOOGL","MSFT","AAPL"}]
時間の経過に伴うこれらの実体の資産を比較する:
実行
In[]:=
property=
cumulative fractional change
;​​DateListPlot​​EntityValuestocks,Datedproperty,Interval
Wed 1 Jan 2020
,Yesterday,PlotLegendsCommonName[stocks]

社会文化データを使った計算

ある芸術家の作品のジャンルを可視化する:
実行
In[]:=
genres=EntityValueEntityClass"Artwork","Artist"->
Rembrandt
PERSON
,"ArtGenre"//Flatten;​​PieChart[Counts[genres],ChartLabels->Automatic]
非明示的に定義された城のクラスから,建築着工日を取得する:
実行
In[]:=
castleAndYear=EntityValueEntityClass"Castle",
country
->
United Kingdom
COUNTRY
,"ConstructionStartDate","NonMissingEntityAssociation";
時代による傾向を見る:
実行
In[]:=
DateHistogram[castleAndYear,{{900},{1300},"Decade"}]
特に活発な時代からのデータを整理する:
実行