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"}]
整理特別活躍時期的資料:
執行