Stockholm during the Middle Ages

Stockholm during the Middle Ages is the period in the history of Stockholm stretching from the foundation of the city c. 1250 to the end of the Kalmar Union in 1523. During this period, Stockholm still didn't fill up the small island Stadsholmen (the "city islet") which today known as the Stockholm Old Town ("Gamla stan"), and as a consequence this article to some extent overlaps that of Gamla stan.
Foundation and initial growth.
The origin of Stockholm pre-dates its written history and how and why the city evolved in the mid-13th century is still disputed. However, even though events during the 1250s and 1260s remain diffuse, the amount of surviving documents, such as letters and diaries, seem to indicate that Stockholm grew rapidly to become the largest city in Sweden during the late 1270s, and throughout the 1280s. It is still disputed whether this development was a planned process initiated by the king and German merchants, or a rather spontaneous growth. The lack of the perpendicular city plans and uniformly-sized blocks common in contemporary cities in Germany and Poland, seem to corroborate the latter.
It's reasonable to assume, Birger jarl's primary interest when founding Stockholm, not only was to strengthen his own domestic and international position, but that he was also aiming at a general economic expansion. As Sweden just had experienced more than 50 years of continuous warfare between rivalling political parties, it was at this time hardly able to produce the economical resources required to build an entire city. Furthermore, Sweden could not yet present a single city in the continental sense of the word, and it therefore seem unreasonable to assume the king could have been able to build a city from scratch by himself. He did, however, achieve an agreement with Lübeck where he invited Germans to settle in Sweden "as Swedes" and promised them generous benefits if they did. While no surviving document can confirm Stockholm was found, planned and built by Germans, their increasing presence in Swedish historical records coincide with the development of mining in Sweden. So, whether Birger jarl truly is the founder of Stockholm or not, its initial growth undoubtedly starts with him.
The economic breakthrough, however, appear to have come during the end of the 13th century under the leadership of Magnus Ladulås (1275–90). Magnus not only strengthened the relations with Lübeck and the Hanseatic League but also increased Swedish influence over Gotland and Visby and stabilized the administration. During his reign several trade centres were granted city privileges and, notwithstanding the word "capital" probably didn't exist in his vocabulary, he made Stockholm the de facto political centre and royal residence. The castle and the protection it could offer, initiated by Birger jarl, was the prerequisite to create a medieval city of continental standard, but the organisation and financial strength to produce it came with Magnus. An example of this is the city wall. A large-scale enterprise of this magnitude could hardly have been produced by the burghers of the newly established city, and, as it is first mentioned in 1288, it must have been one of the project Magnus organized.
The plague disaster known as the Black Death is likely to have taken place in the late summer of 1350. 
The rivalry between the Swedish and German population in the 1380s eventually lead to a massacre on the Swedes, the Käpplinge murders, performed by the German "Hättebröder".
Kalmar Union.
During the turbulent closing era of the Swedish Middle Ages, controlling Stockholm and its castle became crucial to anyone aspiring to rule the kingdom, and the city was therefore repeatedly subject to lengthy blockades and occasionally besieged by various Swedish-Danish fractions disputing the Kalmar Union. In 1471, Sten Sture the Elder defeated Christian I of Denmark at the Battle of Brunkeberg only to lose the city to Hans of Denmark in 1497. Sten Sture managed to size power again in 1501 which resulted in a Danish blockade lasting 1502-1509 and eventually a short peace. Hans' son Christian II of Denmark continued the ambitions of his father and made failed attempts to conquer the city in 1517 and 1518, to finally besiege it and force Queen Christina Gyllenstierna leading the resistance to capitulate in 1520. In November the same year, archbishop Gustav Trolle crowned his allied Christian King of Sweden and together they had their common enemies, nobles and burghers of Stockholm, beheaded during the so-called Stockholm Bloodbath. When King Gustav Vasa finally besieged and conquered the city three years later, an event which ended the Kalmar Union and the Swedish Middle Ages, he noted every second building in the city was abandoned.
Population.
By the end of the 15th century, the population in Stockholm can be estimated to 5-7.000 people, which made it a relatively small town compared to several other contemporary cities, even in a medieval context. (Hamburg and Bremen ~20.000, Lübeck 25.000, Köln and London 50.000, and Paris 100.000.) On the other hand, among the approximately forty cities in the Swedish kingdom, the second largest must have been either Kalmar or Åbo, none of which can have been a home to more than 1-2.000 inhabitants. Of course, these estimations are very unreliable as there was no census in the modern sense, only tax rolls ("skotteböcker") enlisting individuals liable to taxation. For example, it is well-known trade was dominated by Germans, and these tax rolls seem to indicate one third of the city's tax-paying population were Germans, most originating from Lübeck, Danzig, and Westphalia. They were, however, most likely over-represented in these records as they formed an elite in the city centred on the southern square Järntorget, while Finns, also believed to have been numerous in the city, are hard to discern in these records, especially as they often took Swedish names (i.e. Bengt instead of Pentti), but also because they in general had simpler duties and didn't necessarily pay taxes. Furthermore, it is generally assumed no European city managed to reproduce its own population before the early 19th century and thus was dependent of people moving in. Considering medieval warfare and epidemics, the population must have fluctuated considerably.
Trade.
During the Middle Ages, export was administered mostly by German merchants who also dominated among the merchants in the city. Most of the merchants were living by or near the squares Kornhamnstorg ("Corn Harbour Square") and Järntorget ("Iron Square") on the southern corner of the city. Regional peasantry supplied the city with food and raw materials, while the craftsmen in the city produced handicrafts, most of them living by the central square Stortorget or by the oldest two streets in Stockholm, the names of which still reflects their trade: Köpmangatan ("Merchant's Street") and Skomakargatan ("Shoemaker's Street") in the central part of the city. Fishermen and carpenters dominated on the eastern waterfront, except the southern stretch which was located near the so-called "Cog Harbour" ("Koggahamnen") were the merchants' large sea-going ships were moored. In the western part of the city, along the thoroughfare Västerlånggatan, lived a heterogeneous group of craftsmen, including butcher, smiths of all sorts, carpenters, bakers, etcetera — in short, it was the industrial city district. The northern part of the island was occupied by the royal castle.
A tax roll from 1460 enlists two groups of craftsmen identified by name; on one side 43 carpenters, 40 fishermen, 25 shoemakers, and 24 tailors — approximately 35 per cent of the population liable to taxation — and on the other side 17 master masons, 8 meat costermongers, 8 bakers, 8 brewers, and 7 butchers. Of course, countless other men worked in the city but failed to reach into the tax rolls. The same tax roll mentions 13 women with a profession: 4 brewers, 1 tailor, 1 brawn-maker, 1 bagpipe-maker, 2 seamstress, 3 weavers, and 1 blood-letter. Lastly a group of 150 women not given a title appear in the records, but their intimate names was hardly meant to deny they were prostitutes: Anna svandunet "the swan-down", Birgitta rödnacka ("red-neck"). Katarina papegojan ("the parrot"). The most important crafts were organised in guilds intended both to guarantee the quality of items produced and ensure prices were favourable to the craftsmen.