It was 1970 in Harlem, a vibrant neighborhood struggling with poverty, neglect, drugs and crime amid the turmoil of the civil rights era. Against that troubled backdrop emerged a young congressman named Charles B. Rangel.

In January, for the first time in nearly half a century, someone other than Mr. Rangel, who is retiring, will represent Harlem in Congress.

While Harlem has sent the same man to Washington all these years, Harlem itself is no longer the same. The neighborhood, and much of the rest of New York’s 13th Congressional District, which also includes Washington Heights and parts of the Bronx, has been transformed by gentrification, immigration and other demographic shifts.

The political power of Dominicans is on the rise, while the influence of Puerto Ricans has dwindled. Many whites have moved in and many blacks have moved out. The district’s boundaries were redrawn a few years ago to include areas of the Bronx, adding more Hispanics as well as African immigrants.