By the beginning of the 18th century, life in the city of Edinburgh (today's Old Town) was overcrowded and unsanitary.
In the 18th century Edinburgh was very cleanly and under populated. 
mnli hypothesis: In the 18th century Edinburgh was very cleanly and under populated.  premise: By the beginning of the 18th century, life in the city of Edinburgh (today's Old Town) was overcrowded and unsanitary.