I am adding sentences to my Anki deck, and one I came across was:
昨日シカゴへ行ったんですが、途中込んでいて、家を三時に出たんですが、着いたのは七時ごろでした。
This sentence means, according to the book:
I went to Chicago yesterday. Traffic was so heavy on the way that, although I left home at three, I didn't get there until around seven.
I am wondering what the ~んですが is "doing" here? I know that ~んです can indicate giving an explanation, but I'm not sure if that's what's going on here. I am also aware that ~んですが is a shortening of ~のですが which means seeking clarification, which definitely doesn't seem to be the case. Furthermore, I know that が can act as the conjunction word "but." Finally, one last thing is I know that some verbs have て form ~んで, such as 飲んで.
Still, I am just all around confused about it's meaning here. Could someone explain this grammar construction and maybe give a couple more examples? Thank you so much!