In the early 1800's port cities in the USA bore the burden of immigration. By the time they arrived, so many immigrants were tired, hungry and poor they ended up in the City Almshouse. This meant the citizens had to take care of them. At first the citizens of the city asked the Mayors for funds to support the poor. Eventually they asked the states, and by mid-century some states (PA, NY, MA) set up State agencies to deal with the issue. Eventually, beginning in the 1880's, the Federal Government nationalized the programs.
Dating back to the colonial era, New York City assumed responsibility for its citizens who were destitute, sick, homeless, or otherwise unable to care for themselves. The city maintained an almshouse, various hospitals, and a workhouse on Blackwell's Island (now called Roosevelt Island) for the poor.
While searching for other genealogy records, I stumbled on the Alms House Admission Foreigners & Nativity Records (New York City, NY) Bond Registers 1819-1840. The original records are held in the Municipal Archives, New York, New York. There are 2 pages for each name in this ledger. Due to time restraints, I only copied part of the left hand page. The information I extracted includes
Date of Admission; Foreigner (Surname); Foreigner (First Name); Age; Place of Birth; Vessel (Ship) Name; Where From
There is more information, including Ship Captain's Name, Ship Owner's Name, Date of Bond, Sureties, Date Discharged, Death Date, Remarks, Bonded, Commuted & Total.
For example, under date 1820 March 11 - Elizabeth Kennedy age 34 is listed as having died June 14, 1820; her daughter Mary Ann died Nov. 5, 1820
For individuals recorded in the 1855-1858 Almshouse Records the information includes ship name, date of sailing, ports of departure and arrival
This is a terrific database providing names of ships and immigration years for ancestors. It is freely available online starting in 1819 at http://www.olivetreegenealogy.com/ships/ny_alms1819.shtml