As a retired NYC realtor and life long area resident, let me save you time and you can skip the graphs. You need to know the following:
New York City - Manhattan is the most expensive especially south of 96th St. Prices start decreasing north of 96th St. At the north end, safety becomes an issue and I would recommend you visit the neighborhood at different times of the day or night and on different days of the week. Your safety comfort may be different than mine. Also visit the local police precinct and ask them about the neighborhood.
Brooklyn and Queens - Because Manhattan is so expensive, buyers jumped to Brooklyn and bought everything in sight. Now sections of Brooklyn is just as expensive as Manhattan. There are neighborhoods where safety is an issue. Again, visit the local police precincts and ask about safety / crime. Neighborhoods: Bensonhurst, Bedford Stuyvesant, Flatbush, East New York - all need a visit to the local police department. If walking around the neighborhood, check for things like housing projects, welfare places, immigration services, halfway houses, etc. They seem to be clustered in these neighborhoods.
Queens - Since Brooklyn is now expensive, buyers are flocking to Queens while the prices are still good. It's now getting pricey like Brooklyn & Manhattan. Like Brooklyn, a visit to the local police precinct for the following neighborhoods: Jamaica, Flushing, etc.
Staten Island - not real familiar with this but Staten Island has more houses and few co-op or condo buildings. Very residential.
Bronx - Much cheaper to buy than Manhattan, Brooklyn and Queens. South of Fordham Rd. is a safety issue. A visit to the local police precinct is necessary. If you can afford it, the nice areas to buy are Riverdale, Pelham Parkway, Allerton Ave., Throgs Neck, City Island and Bedford Park.
The suburbs (Nassau County / Long Island; Westchester County; Rockland County and New Jersey) - All of the suburbs is much cheaper than anything in New York City. You will get more living space / more square footage and pay 1/2 the price. However, the property taxes will be very expensive. The reason is the school districts are much better than New York City public schools and property taxes pay for it. Housing prices vary widely depending on how good the public school district is. The suburbs also have easy public transit to Manhattan. Most commutes take 30 min. to Penn Station or Grand Central. There are plenty of buses so you don't need a car immediately.