USA Patriot Act and Data mining

I think its the USA PATRIOT Act that gives the right to do this kind of data mining. This actually amended a handful of other Acts such as –
This is as per USA PATRIOT Act as reflected upon in the article – The USA PATRIOT Act