Data Retrieval
Data Retrieval ttp://www.billboard.com/charts/hot-100/2016-09-17 http://www.billboard.com/fe-ajax/spotify/preview/chart-tracks/HSI/2016-09-17/US 2 ��� hot100Data.nb getRankingxml_, maxRank_:= Cases xml, XMLElement"div","class"→"chart-row__main-display", ___, XMLElement"div","class"→"chart-row__rank", ___, XMLElement"span","class"→"chart-row__current-week",rank_, ___ , ___, XMLElement"div","class"→"chart-row__container", ___, XMLElement"div","class"→"chart-row__title", ___, XMLElement_,"class"→"chart-row__song",{name_}, ___, XMLElement_,___,"class"→"chart-row__artist",___,artist_, ___ , ___ , ___ ⧴ <| "Rank"→ ToExpressionrank, "Score"→ maxRank+1- ToExpressionrank, "Name"→ name, "ArtistName"→ StringReplaceartist, StartOfString ~~WhitespaceCharacter... |>, Infinity getRankingurl_String, maxRank_:= getRankingImportURLReadurl, CharacterEncoding→" UTF8 getRankingHot100date_DateObject:= getRankingURLBuild"http://www.billboard.com", " charts getRankingBillboard200date_DateObject:= getRankingURLBuild"http://www.billboard.com " hot100StartDate= DateObject[{1958, 8, 9}]; billboard200StartDate= DateObject[{1963, 8, 24}]; hot100Data.nb ���3 Hot 100 FloorToday- hot100StartDate 7 days 3032 hot100Raw= MonitorTableWithdate= hot100StartDate+ 7 days *n, <| "Date"→ date, "Rankings"→ getRankingHot100[date]|>, n, 0, FloorToday- hot100StartDate 7 days , n; (*DumpSave["~/Dropbox/mathematica/hot100/hot100Raw.mx",hot100Raw];*) hot100= Dataset[hot100Raw]; (*DumpSave["~/Dropbox/mathematica/hot100/hot100.mx",hot100];*) Billboard 200 FloorToday- billboard200StartDate
[Show full text]