Author Topic: 10@10 - Discussion of KFOG's show in general  (Read 68689 times)

Big Fingers McGee

  • The Core
  • Heavy Duty
  • *****
  • Posts: 3376
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #45 on: September 12, 2013, 03:24:17 PM »
all I need to know is: How much Rush did she play?

One song:  New World Man on August 8th of this year.

Whether that's too much or not enough will be left as an exercise for the reader.

we all know the answer to that.

I'm a little surprised that "Tom Sawyer" didn't make an appearance.

I also don't believe that any post-1989 Rush has ever been played on 10@10. "Dreamline", "Roll The Bones", "Ghost Of A Chance", etc. would help diversify a 1991 or 1992 set.

Lightnin' Rod

  • Administrator
  • Heavy Duty
  • *****
  • Posts: 4504
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #46 on: September 13, 2013, 01:18:23 PM »
I'll probably try to add the 2002 data this weekend.  That's going to a bit more challenging, as the formatting of entries is a bit more chaotic.  And things like "Mystery Year! answer at bottom" is going to play hell with my import algorithm.

Send me some data points you might want to see for this year.  I can write a few queries...

How does your input process work?  Do you have a template, and anything that doesn't fit
gets flagged for review?

It might be best for me to create special versions of my text files specifically for database input
by deleting all the extraneous information, putting the year on the header line for mystery sets,
etc.  It may be easier to do that than to write the filters or whatever to weed that stuff out
later.  The 2013 file was fairly clean, in large part because whoever is posting the sets on the
KFOG site in the RR era has been putting in minimal effort.  The 2002 file has more irregularities.
Keep track of what the biggest PITA issues are, and maybe I can eliminate them in the future.

What I'd like to see is the most played artist(s) by year, and overall.

Basically, looking for patterns in the text to parse from.  I can update with details later, when I get home (lacking a more exciting idea for a Friday night - sad).  Heck, I can even post the parsing sql if you are interested.

Eventually I will turn the patterns I am hacking together now into sql functions where, hopefully, we can just feed them lines and they will spit out relatively clean data. 
and any fool knows
a dog needs a home
a shelter
from pigs on the wing

Tinka Cat

  • The Core
  • Master Poster
  • *****
  • Posts: 8080
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #47 on: September 13, 2013, 03:58:30 PM »
I'll probably try to add the 2002 data this weekend.  That's going to a bit more challenging, as the formatting of entries is a bit more chaotic.  And things like "Mystery Year! answer at bottom" is going to play hell with my import algorithm.

Send me some data points you might want to see for this year.  I can write a few queries...

How does your input process work?  Do you have a template, and anything that doesn't fit
gets flagged for review?

It might be best for me to create special versions of my text files specifically for database input
by deleting all the extraneous information, putting the year on the header line for mystery sets,
etc.  It may be easier to do that than to write the filters or whatever to weed that stuff out
later.  The 2013 file was fairly clean, in large part because whoever is posting the sets on the
KFOG site in the RR era has been putting in minimal effort.  The 2002 file has more irregularities.
Keep track of what the biggest PITA issues are, and maybe I can eliminate them in the future.

What I'd like to see is the most played artist(s) by year, and overall.

Basically, looking for patterns in the text to parse from.  I can update with details later, when I get home (lacking a more exciting idea for a Friday night - sad).  Heck, I can even post the parsing sql if you are interested.

Eventually I will turn the patterns I am hacking together now into sql functions where, hopefully, we can just feed them lines and they will spit out relatively clean data.

I bet variations on names causes problems, too.... like REM vs. R.E.M.

will we, as mere mortals, be able to use this db?    :)  :)
~CPL593H~

dischead

  • The Core
  • kiloposter
  • *****
  • Posts: 1373
  • Honorary Knight of the Command Line
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #48 on: September 13, 2013, 06:40:09 PM »
I bet variations on names causes problems, too.... like REM vs. R.E.M.

will we, as mere mortals, be able to use this db?    :)  :)

Yep, I noted this earlier.  Also Beatles vs. The Beatles, CTA/C.T.A./Chicago Transit Authority/Chicago,
etc.  Song titles are also occasionally modified or abbreviated.  And there may be speeling errars...

Whether mere mortals will able to use this db is up to Rod and depends on what kind of UI
can be put on it.
"Your favorite songs, played beautifully"

dischead

  • The Core
  • kiloposter
  • *****
  • Posts: 1373
  • Honorary Knight of the Command Line
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #49 on: September 13, 2013, 06:55:19 PM »
How does your input process work?  Do you have a template, and anything that doesn't fit
gets flagged for review?

It might be best for me to create special versions of my text files specifically for database input
by deleting all the extraneous information, putting the year on the header line for mystery sets,
etc.  It may be easier to do that than to write the filters or whatever to weed that stuff out
later.  The 2013 file was fairly clean, in large part because whoever is posting the sets on the
KFOG site in the RR era has been putting in minimal effort.  The 2002 file has more irregularities.
Keep track of what the biggest PITA issues are, and maybe I can eliminate them in the future.

Basically, looking for patterns in the text to parse from.  I can update with details later, when I get home (lacking a more exciting idea for a Friday night - sad).  Heck, I can even post the parsing sql if you are interested.

Eventually I will turn the patterns I am hacking together now into sql functions where, hopefully, we can just feed them lines and they will spit out relatively clean data.

I guess I'm still a little confused on the process.  I would have thought the regularity in the
files vis-a-vis blank lines would make it easy to distinguish the sets and their individual elements.
At the very least, it would be easy in a text editor to replace them with any delimiter you wanted.
I tried to make the format as consistent as possible with this end in mind.
"Your favorite songs, played beautifully"

ggould

  • Administrator
  • Master Poster
  • *****
  • Posts: 9159
    • View Profile
    • http://www.ggould.com
Re: 10@10 - Discussion of KFOG's show in general
« Reply #50 on: September 13, 2013, 09:20:40 PM »
love the idea of getting database together.  This is why I've always had a problem with misspellings in the post that contains the setlist.  Also why I don't like seeing "Crapton" in a list!
Don't stand in the way of LOVE!

CapnJack

  • The Core
  • 10^4 Super Patriot
  • *****
  • Posts: 34376
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #51 on: September 13, 2013, 10:35:08 PM »
love the idea of getting database together.  This is why I've always had a problem with misspellings in the post that contains the setlist.  Also why I don't like seeing "Crapton" in a list!

How about Sheryl 'Ho?
Tuned to a natural E

RGMike

  • The Core
  • Eight Miles High
  • *****
  • Posts: 79319
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #52 on: September 14, 2013, 09:31:27 AM »
love the idea of getting database together.  This is why I've always had a problem with misspellings in the post that contains the setlist.  Also why I don't like seeing "Crapton" in a list!

How about Sheryl 'Ho?

iirc, the Shraytabase was pulling from the KFOG setlist page, and not from here.
You spin me right 'round, baby, right 'round

ggould

  • Administrator
  • Master Poster
  • *****
  • Posts: 9159
    • View Profile
    • http://www.ggould.com
Re: 10@10 - Discussion of KFOG's show in general
« Reply #53 on: September 14, 2013, 09:39:18 AM »
love the idea of getting database together.  This is why I've always had a problem with misspellings in the post that contains the setlist.  Also why I don't like seeing "Crapton" in a list!
How about Sheryl 'Ho?

I don't really understand what's going on in the database, but on that one post in a thread for each date where our 'official' list is posted, I'd appreciate a little respect for the music, by accurately, and non-editorially listing the artists and songs.  Sometimes KFOG is responsible for the misspellings, but those should be fixed too.
Don't stand in the way of LOVE!

Lightnin' Rod

  • Administrator
  • Heavy Duty
  • *****
  • Posts: 4504
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #54 on: September 14, 2013, 04:40:11 PM »
How does your input process work?  Do you have a template, and anything that doesn't fit
gets flagged for review?

It might be best for me to create special versions of my text files specifically for database input
by deleting all the extraneous information, putting the year on the header line for mystery sets,
etc.  It may be easier to do that than to write the filters or whatever to weed that stuff out
later.  The 2013 file was fairly clean, in large part because whoever is posting the sets on the
KFOG site in the RR era has been putting in minimal effort.  The 2002 file has more irregularities.
Keep track of what the biggest PITA issues are, and maybe I can eliminate them in the future.

Basically, looking for patterns in the text to parse from.  I can update with details later, when I get home (lacking a more exciting idea for a Friday night - sad).  Heck, I can even post the parsing sql if you are interested.

Eventually I will turn the patterns I am hacking together now into sql functions where, hopefully, we can just feed them lines and they will spit out relatively clean data.

I guess I'm still a little confused on the process.  I would have thought the regularity in the
files vis-a-vis blank lines would make it easy to distinguish the sets and their individual elements.
At the very least, it would be easy in a text editor to replace them with any delimiter you wanted.
I tried to make the format as consistent as possible with this end in mind.

It's all a work in progress.  We don't necessarily find the optimum process the first time through, especially when I'm doing this after a round of golf and a few after golf adult beverages.  I'm basically hacking my way through the first time around.  It will get better, easier. 

But, for now, a couple of results for 2013 (not QA'd very much_ --

Top artists from 2013:

artist   Count
Rolling Stones   23
Bruce Springsteen   19
U2   19
Beatles    13
Led Zeppelin   13
R.E.M.   12
David Bowie    12
Eric Clapton   12
The Who   12
The Beatles   10
Elton John   10
Fleetwood Mac   10
Doobie Brothers   10
Bonnie Raitt   10
Grateful Dead   9
Neil Young   9
Stevie Ray Vaughan   9
The Kinks   9
Steve Winwood   8
Santana    8
Steely Dan   8
The Police    8
Paul Simon   8
Red Hot Chili Peppers   8
Little Feat   8
Joe Jackson   8
Dire Straits   8
Dave Matthews Band   7
Genesis   7
Elvis Costello   7
Bob Dylan   7
Beach Boys    7
Joe Walsh   7
Jackson Browne   7
John Lennon   7
John Mellencamp   7
Peter Gabriel   7
Pretenders   7
Stevie Wonder   7
Talking Heads   6
The Cure   6
Smashing Pumpkins    6
Sheryl Crow   6
Tom Petty   6
Pink Floyd   6
Queen   6
Otis Redding   6
Moody Blues   6
Jimi Hendrix   6
Blues Traveler   6

Top artists by year:

setYear   artist   Count
1967   Jimi Hendrix   4
1973   Led Zeppelin   4
1983   The Police   4
1987   U2   4
1988   U2   3
1986   The Smiths    3
1971   The Who   3
1997   Third Eye Blind   3
1984   Thompson Twins   3
1993   Sheryl Crow   3
1969   Rolling Stones   3
1975   Steely Dan   3
1988   Steve Winwood   3
1991   Stevie Ray Vaughan   3
1975   Led Zeppelin   3
1969   Led Zeppelin   3
1968   Moody Blues   3
1984   Prince   3
1995   Radiohead   3
1966   Rolling Stones    3
1987   INXS   3
1973   Jimmy Cliff   3
1984   Joe Jackson   3
1985   John Fogerty   3
1993   John Hiatt   3
1973   Dr. John   3
1973   Elton John   3
1977   Eric Clapton   3
1983   Eurythmics   3
1986   Fabulous thunderbirds   3
1988   Escape Club   3
1988   Fine Young Cannibals   3
1995   Garbage   3
1978   George Thorogood   3
1966   Beach Boys   3
NULL   Beatles   3
1966   Bob Dylan   3
1994   Blues Traveler   3
1975   Bruce Springsteen   3
1984   Bruce Springsteen   3
1993   Chris Isaak   3
NULL   Bruce Springsteen   3
1997   Chumbawamba   3
1993   Cracker   3
1991   Dire Straits    3
1966   Donovan   3
1984   Don Henley   2
1974   David Bowie   2
1980   Dire Straits    2
1991   Divinyls   2
and any fool knows
a dog needs a home
a shelter
from pigs on the wing

RGMike

  • The Core
  • Eight Miles High
  • *****
  • Posts: 79319
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #55 on: September 14, 2013, 04:41:51 PM »
love the idea of getting database together.  This is why I've always had a problem with misspellings in the post that contains the setlist.  Also why I don't like seeing "Crapton" in a list!
How about Sheryl 'Ho?

I don't really understand what's going on in the database, but on that one post in a thread for each date where our 'official' list is posted, I'd appreciate a little respect for the music, by accurately, and non-editorially listing the artists and songs.  Sometimes KFOG is responsible for the misspellings, but those should be fixed too.

It's actually been rare that such editorializing has taken place in the list-posting here, since we had traditionally taken the list from the KFOG website. More recently it comes from what gets posted in the g'snipes FB thread and I actually edit the snark out of that version when I cut and paste -- they tend to get sarcastic about the news/movie/commercial clips.
You spin me right 'round, baby, right 'round

Lightnin' Rod

  • Administrator
  • Heavy Duty
  • *****
  • Posts: 4504
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #56 on: September 14, 2013, 04:46:46 PM »
For those interested, I loaded all the text from the file into a rawdata table, and then started parsing into two tables, setHeader (setDate, setYear), and then into setDetails, and linked up to setHeader.  Here is the sql (made up as I went along):

-- create a rawdata table to import the raw data
if not exists (select * from sysobjects where id = OBJECT_ID('dbo.rawdata') and xtype = 'U')
create table dbo.rawdata (
   raw_id int identity(1,1),  -- used later to group up
   rawdata varchar(256)
)
-- import the rawdata -- i used excel to write inserts. (see SQL Query 2)
-- also, i replaced ticks ("'") with "#" in the text file to make my life simpler.

select * from rawdata

DELETE rawdata where rtrim(rawdata) = '' -- get rid of empty lines
select * from rawdata

-- start parsing rawdata into tables.
-- create set table
create table setHeader (
   setHeaderId int identity(1,1),
   setDate datetime,
   setYear int,
   specialty varchar(255),
   raw_id int,
   rawtrim varchar(255),
   rawdata varchar(255)
)
--drop table setHeader

-- add recs to set table.  based on if there is a date at the front of text
insert into setHeader (
   setDate,
   rawtrim,
   rawdata,
   raw_id
)   
select    
   LEFT(rawdata, charindex('-',rawdata) - 2),
   REPLACE(replace(rawdata, 'It#s', ''), '!', ''),
   rawdata,
   raw_id
from
   rawdata
where charindex('-', rawdata) > 0
and ISDATE(LEFT(rawdata, charindex('-',rawdata) - 2)) = 1
ORDER BY CONVERT(datetime, LEFT(rawdata, charindex('-',rawdata) - 2))

-- get rid of days, we can always figure that out from the date
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Monday', '')
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Tuesday', '')
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Wednesday', '')
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Thursday', '')
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Friday', '')
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Saturday', '')
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Sunday', '')
UPDATE setHeader SET rawtrim = replace(rawtrim, 'Monday', '')

select * from setHeader
-- get years if numeric (not completely reliable)
update setHeader  set setYear = RIGHT(rawtrim, 4)
where Isnumeric(RIGHT(rawtrim, 4)) = 1

-- if year is null, must be specialty.  set specialty
select * from setHeader where setYear is null
update setHeader set specialty = ltrim(right(rawtrim, charindex('-', Reverse(rawtrim))-3))
from setHeader where setYear is null
--
select * from setHeader
-- okay, sets look good, move on to set entries

create table setEntries(
   setEntriesId int identity(1,1),
   setHeaderId int,
   entryOrder int,
   entryType char(1),
   songOrder int,
   song varchar(255),
   artist varchar(255),
   raw_id int,
   rawtrim varchar(255),
   rawdata varchar(255)
)
alter table setEntries
add bos bit

select * from setEntries
insert into setEntries (
   rawdata,
   raw_id
)   
select    
   rawdata,
   raw_id
from
   rawdata
where charindex('-', rawdata) > 0
and ISDATE(LEFT(rawdata, charindex('-',rawdata) - 2)) < 1

-- attach entries to sets
update setEntries set setHeaderId = h.setHeaderId from (
select setHeaderId, raw_id, (select top 1 raw_id from setHeader s2 where s2.raw_id > sh.raw_id
   order by s2.raw_id) raw_next
from setHeader sh
) h
where setEntries.raw_id between h.raw_id and isnull(h.raw_next, 9999)

-- lets parse the rawdata
select * from setEntries
where CHARINDEX(',', rawdata) > 0
-- fix 2 rows with , instead of period in numbering
update setEntries set rawdata = replace(rawdata, ',', '.') where raw_id in (161, 392)

--select
--   rawdata,
--   LEFT(rawdata, charindex('.', rawdata) - 1),  --,
--   replace(ltrim(rtrim(SUBSTRING(rawdata, charindex('.', rawdata) + 1, charindex('-', rawdata) - 3))), '-', ''),
--   replace(right(rawdata, len(rawdata) - charindex('-', rawdata)), '#', '''')
--from setEntries
--where CHARINDEX('.', rawdata) >0

update setEntries set
   entryType = 'S',
   songOrder = LEFT(rawdata, charindex('.', rawdata) - 1),
   song = replace(right(rawdata, len(rawdata) - charindex('-', rawdata)), '#', ''''),
   artist = replace(ltrim(rtrim(SUBSTRING(rawdata, charindex('.', rawdata) + 1, charindex('-', rawdata) - 3))), '-', '')
where CHARINDEX('.', rawdata) >0   

update setEntries set artist = REPLACE(artist, '#', '''')
-- deal with BOS

select * FROM setEntries where song like '%BOS%'
update setEntries set bos = 1 where song like '%BOS%'
update setEntries set song = REPLACE(song, '(BOS)', '')
update setEntries set song = REPLACE(song, '(2-way tie for BOS)', '')
update setEntries set song = REPLACE(song, '(3-way tie for BOS)', '')
update setEntries set song = REPLACE(song, '(4-way tie for BOS)', '')
update setEntries set song = REPLACE(song, '(three-way tie for BOS)', '')
update setEntries set song = REPLACE(song, '(two-way tie for BOS)', '')
update setEntries set bos = 0 where setEntriesId = 804
select * from setEntries

select song, artist, COUNT(*), MAX(setEntriesId) from setEntries
group by song, artist
order by count(*) desc, song, artist
--order by COUNT(*) desc
 
select MAX(setDate) from setHeader
 
select song, artist, COUNT(*) cnt, max(setDate) maxdate, MIN(setDate) mindate
from setEntries se
join setHeader sh on sh.setHeaderId = se.setHeaderId
where bos = 1
group by song, artist
order by COUNT(*) desc
 
select * from setEntries where setEntriesId = 256
 
 Eminence Front (4-way tie for BOS)
 Mr. Jones (two-way tie for BOS)
 So Tired of Being Alone (three-way tie for BOS)
 Hot in Herre (2-way tie for BOS)
 Fake Plastic Trees (3-way tie for BOS)
select * from setHeader sh
join setEntries se on se.setHeaderId = sh.setHeaderId
order by sh.setDate, se.setHeaderId, se.raw_id

select setYear, COUNT(*) from setHeader
where setYear is not null
group by setYear
order by COUNT(*) desc
select * from setHeader where setYear = 977

righREVERSE

select charindex(' ',rawdata) from rawdata
where
   
8/30/13 - Friday!  It#s the End Of Summer


select setYear, artist, COUNT(*)
 from setHeader sh
 join setEntries se on se.setHeaderId = sh.setHeaderId
group by setYear, artist
order by COUNT(*) desc

select artist, COUNT(*)
 from setHeader sh
 join setEntries se on se.setHeaderId = sh.setHeaderId
group by artist
order by COUNT(*) desc
and any fool knows
a dog needs a home
a shelter
from pigs on the wing

Lightnin' Rod

  • Administrator
  • Heavy Duty
  • *****
  • Posts: 4504
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #57 on: September 14, 2013, 04:57:48 PM »
love the idea of getting database together.  This is why I've always had a problem with misspellings in the post that contains the setlist.  Also why I don't like seeing "Crapton" in a list!
How about Sheryl 'Ho?

I don't really understand what's going on in the database, but on that one post in a thread for each date where our 'official' list is posted, I'd appreciate a little respect for the music, by accurately, and non-editorially listing the artists and songs.  Sometimes KFOG is responsible for the misspellings, but those should be fixed too.

I agree, both from a database perspective, and a general sense of respect for anyone who can make it in the music business.  Snark in individual posts is fine, we all have our opinions.  But if we are recording what was in a set, I suggest that we go the Jack Webb route -- just the facts, ma'am.

As for the database, eventually I'd like to work with dischead and load everything we have.  Then, perhaps, I *could* write an interface that we could host somewhere, and everyone would have access.  But I'm not promising anything.  I do this (database and programming) at work; I play golf for fun.

Of course, if dischead and others want to get together to throw a Frisbee around, that would be fun too.  I miss Frisbee.
and any fool knows
a dog needs a home
a shelter
from pigs on the wing

Lightnin' Rod

  • Administrator
  • Heavy Duty
  • *****
  • Posts: 4504
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #58 on: September 14, 2013, 06:34:17 PM »
I've started on the 2002 list dischead provided.  Ran into some issues, and I've stopped for the day. I think tomorrow I might try from a different angle.  I can do everything with sql, but perhaps reading files sequentially with a program would be easier.  I need to download some software.

I'm interested in this project whether anyone ends up benefiting or not.  I think I'll learn a new language to get it to work.  Just for fun.
and any fool knows
a dog needs a home
a shelter
from pigs on the wing

Big Fingers McGee

  • The Core
  • Heavy Duty
  • *****
  • Posts: 3376
    • View Profile
Re: 10@10 - Discussion of KFOG's show in general
« Reply #59 on: September 14, 2013, 09:07:44 PM »
By the way, Rod, I'm in SQL-learning mode at work, and this is very helpful. Thanks!