A small detail glossed over in the article is that New York City has three separate library systems. The New York Public Library, The Brooklyn Public Library and Queens Public Library were all founded in the mid-19th century years before the creation of New York City and it's five boroughs in 1898.
The New York Public library built 30 Carnegie libraries, the Brooklyn Public Library 21 and the Queens Public Library 7.