In the four decades since it reopened its doors to the world, China has transformed from a nation of agriculture with a 21% urban population to a nation of megacities with a 63% urban population1. As the global urban population overtook the rural for the first time at the start of the twenty-first century, the UN famously declared the advent of the ‘urban age’2. While this thesis was later criticized as inaccurate due to its problematic statistical approach and the binary categorization of the rural and the urban, succeeding works continued to reinforce the dominance of urbanization over rural territories. Most prominently in the body of scholarship inspired by Brenner and Schmid’s planetary urbanization3,4, the rural was often reduced to “an obsolescent category (a historical starting point) or residual space (an unconsumed world)”5 under an extended planetary network of urbanization. Indeed, while planetary urbanization had illuminated the presence of urban dynamics far beyond the traditional confines of the city, this dismantling of the rural–urban dualism has produced very little evidence of rural dynamics within the newly expanded city. In 2013, Monica Krause questioned, “As we see people move into cities, why do we assume only the people to change? […] If the whole world is urbanizing, it must also be ruralizing”6. Subsequently, inspired by the growing scholarship on hybridized rural–urban phenomena in Southeast Asia7,8,9, Gillen et al. argued that ‘more-than-residual’ processes of ruralization do exist both within what would ordinarily be considered ‘urban’ spaces and in relation to the processes of urbanization through the everyday practices of ordinary people who pursue ways of living that defy rural/urban binaries in the aftermath of urbanization10.

Yet, existing scholarships on ruralization have largely focused on the fringe territories of urban development, such as the periurban or the suburban. In this Article, we present a case study that demonstrates not only the emergence of ruralization within the central districts of a rapidly growing city in China but also its potential for considerable macroscale impact upon the urban environment. Through it, this paper hopes to support and expand upon the contemporary scholarship on geographies of ruralization as proposed by Krause and Gillen et al. as well as bring attention to how ordinary people create environments beyond the institutional categorizations of rural versus urban in ways more complex than the binary of top-down versus bottom-up as they attune to the monumental transformations taking place around them.

In stagnant construction sites, neglected landscaping and forgotten spaces under viaducts and highways, China’s expanding cities are secretly ‘sprouting’ with vegetables owing to a practice called chengshi kaihuang (CK, 城市开荒)—an informal practice where citizens infiltrate the neglected spaces of China’s rapid urbanization for the cultivation of vegetables. The name CK is a combination of two terms—chengshi (城市), meaning ‘urban’, and kaihuang (开荒), an evocative term meaning ‘the opening of wasteland.’ In the long span of China’s history as an agrarian nation, kaihuang has been both a pragmatic and a symbolic practice of resilience. From an ancient poet’s opening of rural wasteland to escape the corruptions of the city11 to the Communist call for self-sufficiency through wasteland cultivation during the Sino-Japanese War12,13,14, kaihuang is a deceptively simple act of vegetable growing that carries within itself an almost utopic desire to survive and create alternative futures from precarity. To this day, a sculpture of the ‘Kaihuang Bull’ stands before the Shenzhen Municipal Party Committee Building as a symbol of the pioneering kaihuang spirit of laborers that turned a small fishing village into a megacity through hard work, perseverance and creativity15. In the case of CK, isolated individual citizens have turned this pioneering spirit on the wastelands of China’s rapidly expanding cities and informally created thousands of acres of urban agriculture.

While Gillen et al. conceptualized ruralization as a bottom-up practice, the influence of powerful top-down actors, such as the state and global systems of labor and capital, in the spatial and discursive productions of ruralization has been a point of debate16. China, in particular, has been cited as an example where the geographies of ruralization are dominated by the state strategy of rural revitalization17. Indeed, in both rapid urbanization and ruralization, understandings of China’s contemporary society have mostly been concerned with top-down actions and narratives. While some recent scholarships have begun to unpack the complex and ambiguous agency of ordinary people under China’s strong state18,19, there is a lack of empirical evidence on the spatial potential of such agency at large scales.

Existing studies of CK are few and disconnected, with individual studies focused on specific localized incidents and published under different descriptors. In two studies published subsequently in 2018 and 2020 (refs. 20,21), Zhu, He and collaborators studied the stigmatization around ‘self-proclaimed vegetable lots’ that have emerged in the public green spaces of residential neighborhoods in Hangzhou and suggested the potential of such bottom-up approaches as a ‘new dawn of the public realm’ in China, if given appropriate guidance. In 2022 (ref. 22), Asa Roast studied how the kongdi (vacant lots) of periurban Chongqing, where ‘informal commoning’ emerged as a ‘nominally rural practice’, performed as a liminal space that is simultaneously inside and outside of the city, where the act of ‘becoming urban’ could be negotiated.

While these studies provide valuable and detailed insights into the motivations and developmental contexts behind specific incidents of informal cultivation, they are intensive ethnographic projects focused on a limited number of physical sites. This paper leverages remote sensing and social media data to investigate the city-wide occurrence of these CK practices, as they are called by Chinese netizens, and understand their broader distribution and interaction with the urban environment of a Chinese megacity. It hopes, following the example set by scholarship such as McGee’s desakota7 and Kusno’s kampungkota23, to bring terms, ideas and creative urban practices from non-Western cultures and languages to bear on the contemporary and future understandings of rural–urban dynamics.

Over the recent decades, improvements in the quality of remote sensing data, as well as the power, efficiency and accuracy of analysis methods, have made it one of the most important tools in the study of land-use dynamics. In China, remote sensing has, among other applications, facilitated the understanding of rapid urbanization’s impact across a wide range of fields, from environmental protection24,25 to urban planning26,27. As far as it is possible to discover at the time of writing, this paper is the first to leverage remote sensing and social media data to study the practice of CK.

The findings of the paper, as set out below, provide a description of the spatiotemporal characteristics of CK, its presence in cities across China and, taking Wuhan as the study area, the extent to which CK has infiltrated the urban landscape of a rapidly expanding megacity.


Spatiotemporal characteristics of CK

Unlike community gardens and allotments, CKs are illegal encroachments carried out by individuals rather than organized groups. He and Zhu observed in their first study20 that informally claimed vegetable lots occurred in public green spaces that had ‘damaged and bare surfaces’ due to maintenance neglect. The ‘informal commoning’ in Roast’s study emerged from a less ambiguous wasteland of the kongdi, tracts of demolished agricultural land that had not yet undergone development. In both instances, the sites were in neighborhoods that had undergone recent rapid urbanization.

The associations with rapid urbanization and vacant/neglected spaces are consistent with the findings from the gray literature on CK. Local news reported the occurrence of CK by railways28, street-side landscaping29 and, most frequently, in residential green spaces30,31 and vacant sites nearby residential neighborhoods32,33. Self-narratives by practitioners on social media have mostly shown CK occurring in kongdi or huangdi (荒地, wasteland), such as neglected construction sites, storage areas and parking lots. Visually, photos and video footage of CK from both social media and news reports show the vegetable lots as patchy, irregular and small in scale (Fig. 1a). This distinct pattern makes CK easily distinguishable from other forms of urban greenery, such as parks, commercial urban agriculture and allotments, which are organized by regular grids or other geometric designs (Fig. 1, right).

Fig. 1: Identifying characteristics of CK in remote sensing data.
figure 1

ac, Left: examples showing typical physical characteristics of CK, that is, small, patchy, irregular agricultural plots in urban contexts (a); an example of the typical land-use sequence that precedes the emergence of CK (b); and an example of the land-use pattern after CK emergence (c). Right, examples of how similar but non-CK urban land use types can be visually distinguished from CK. Map data retrieved from Google, 2023 Maxar Technologies.

News reports, social media data and interviews with participants yielded locations of CK sites in Wuhan. Evaluation of these sites through very high-resolution (VHR) satellite imagery on Google Earth Pro confirmed the physical characteristics of CK plots and revealed that CK emerged on land that has experienced the characteristic temporal sequence of rapid urbanization, whereby rural land is quickly and thoroughly demolished to bare soil (Fig. 1b and Extended Data Fig. 1).

Local news reports and government notices confirmed the description by Zhu et al.21 that CK practices are often rejected as ‘uncivil’ by officials and showed that these sites are frequently demolished. VHR imagery confirms that most of the CK sites identified are demolished within 2 years of their emergence, but also shows a tendency for vegetable plots to return persistently if the demolished site remains vacant afterwards (Fig. 1c). Thus, CK can further be distinguished by its temporal instability from the continuity and formal stability of other urban green spaces.

National occurrences and study area selection

The survey of online gray literature facilitated a preliminary assessment of the occurrence of CK at the national scale beyond isolated incidents in individual cities. Tallying city-level location information from the study’s gray literature dataset, the results demonstrated that occurrences of CK are not limited to any particular region but that it is possible to find instances across the majority of provinces in China (Fig. 2). The study found fewer instances of CK in the northern provinces than central and southern provinces, where the climate is more tropical. However, it is difficult to draw any definitive conclusions without a more comprehensive survey. The gray literature search had also yielded similar practices outside of China in Vietnam, where local news have reported on informal urban gardeners who cultivate all kinds of urban edge conditions from the gaps of concrete embankments to cemeteries and public parks34.

Fig. 2: Assessment of CK occurrences from gray literature.
figure 2

Top, distribution of CK sites found in China and the study area. Bottom, the metropolitan regions of Wuhan with locations of initial CK sites.

Source data

Within the data gathered, Wuhan was chosen as the study site for this paper as it is a major city of a reasonable size that has undergone rapid urbanization in the recent decades and has recorded a high number of CK occurrences on social media. This study is conducted over the combined area of Wuhan’s central urban districts, that is, Jiang’an, Jiangshan, Qiaokou, Hanyang, Wuchang, Qingshan and Hongshan. The capital city of Hubei Province, Wuhan (29° 58′ to 31° 22′ N, 113° 41′ to 115° 05′ E), is located at the intersection of the Yangtze River and the Han River. The two rivers meeting at the center of the city and the presence of hundreds of lakes around them have earned Wuhan the name of ‘the city of a hundred lakes.’ As the most populous city in central China, Wuhan saw, from 2000 to 2019, a massive increase in built-up area of 982.66 km2 (228% of its original size), along with a reduction of 717.14 km2 of cropland26. Wuhan’s economic boom occurred in the twenty-first century as the site of multiple urban innovation initiatives. It was declared the first pilot area of the ‘two-oriented society’35, which targets economic development along with resource conservation and environmental protection. It has also been the site of multiple state-designated technology development zones such as the Donghu New Technology Development Zone (also called the Optics Valley, to the east and the Wuhan Economic and Technological Development Zone ( to the south.

CK in Wuhan, 2017–2022

Owing to the lack of existing information on CK sites, the study employed a ‘snowballing’ method to conduct a city-wide survey by multispectral remote sensing data. Analysis of the gray literature yielded seven suitable CK sites for the initial supervised machine-learning land cover classification (LCC). For each year between 2017 and 2022, an initial LCC was trained to obtain a preliminary mapping of potential CK sites. Sampling the initial LCC mapping then yielded 150–300 additional verified CK sites per year, with which it was possible to conduct a much more accurate final LCC of the study area.

In general, the initial LCCs detected less CK sites (averaging 4.09% of the study area) than the final LCCs. Though the initial LCC had limited access to training points, it yielded relatively high values in its accuracy measures, which may have been skewed owing to the equally limited number of validation points available to produce the error matrix (Extended Data Table 5). The final LCCs (Fig. 3), which were trained with 400–800 CK points and 11,000–17,000 non-CK points depending on the year, yielded higher numbers for the overall area of CK sites in the study area as well as slightly higher accuracy measures.

Fig. 3: Final supervised LCC results, 2017–2022.
figure 3

Each mapping, denoted by year, shows, in red, the areas detected as CK within the metropolitan districts of Wuhan.

The final LCC showed that the average percentage of Wuhan’s central urban districts with active CK between 2017 and 2022 is 6.34%, constituting 12,941 acres of land. The study area contained the lowest amount of CK activity in 2018 and the highest amount in 2021 (Table 1).

Table 1 Results and accuracy measures of the initial and final LCCs, 2017–2022

Similar to, and potentially even more so than other forms of urban agriculture, CK sites possesses characteristics such as high variation in phenology, small and irregular sites and fragmentation due to the dense heterogeneity of urban environments36,37, that make it difficult for the classifier to distinguish them from other urban land uses. Furthermore, the study result is limited by the 10 m resolution of Sentinel-2 multispectral data, which may at times be too coarse for the detection of small or narrow CK sites.

For most years, the final LCC achieved an overall accuracy above 98% and a kappa index above 0.80. Both the initial and final LCCs detected non-CK sites with more accuracy than CK sites. The error matrix showed higher consumer accuracies than producer accuracies for CK sites, which indicates that the classifier was more successful at identifying CK sites accurately than comprehensively. For the final LCCs, the lowest producer accuracy for CK sites (62.2%) was recorded in 2018, which detected the smallest total of CK area between 2017 and 2022. Conversely, the lowest consumer accuracy for CK sites was recorded in 2020, which detected the largest total of CK area between 2017 and 2022 (Extended Data Table 5).

Emergence types and interactions with the city

Four 3 km by 3 km sample areas of the LCC mapping were randomly selected for detailed visual assessment using VHR satellite imagery. The sampling yielded 544 CK sites whose land-use histories both before and after emergence were evaluated. The analysis of land-use history before emergence revealed five types of urban conditions where CK has occurred.

A total of 97.4% of the sites had undergone typical processes of rapid urbanization post-2000 (Extended Data Fig. 1), and 66.7% were land that had been vacant since its demolition from rural land, 19.7% were undeveloped land that were used as construction staging areas at some point and 11.0% were the irregular parcels left by the construction of transportation infrastructure. The remaining 2.6% of the sites consisted of 1.8% in existing urban edge conditions (for example, riverbanks) and 0.7% in existing urban green spaces (for example, parks; Figs. 4a and 5a).

Fig. 4: Distributions of land-use characteristics within sampled sites.
figure 4

a, Land-use histories before CK emergence. b, Land-use histories after CK emergence. c, Tendency for CK to return after forced removal.

Source data

Fig. 5: Examples illustrating land-use characteristics of sampled CK sites before and after the emergence of CK.
figure 5

a, Examples of the five pre-emergence land-use sequences: left to right, rural to demolition, rural to construction staging, rural to infrastructure, urban green spaces, edge conditions. b, Examples of post-emergence land-use sequences: left, demolition and development to building, right, demolition and development to trees/park. c, Example of post-emergence land-use sequence where CK is demolished but returns repeatedly. Map data retrieved from Google©, 2023 Maxar Technologies.

Studies have shown that rapid urbanization is one of the leading causes of urban vacant lands in developing cities owing to factors such as capital shortage, land speculation and urban planning adjustments38,39. The satellite data of CK sites showed demolition of agricultural farmland, fishponds and residential clusters on a massive scale for urban development. The expansion of the city also saw the encroachment of roads, highways, tunnels and elevated railways directly into rural lands with little regard for existing contexts, which disrupted agricultural production and left behind isolated and irregular edge lands that are difficult to develop but perfect for the infiltration of CK practitioners. Only 8% of CK emerged on sites left vacant for less than 2 years, while 66% of the sites had been left vacant for between 2 and 5 years before practitioners moved in and 26% had been left vacant for 6 years or longer.

The examination of land use after the emergence of CK showed that 24.4% have been redeveloped as buildings and 5.9% as parks or other urban green spaces, while 69.7% of the sites remain undeveloped (Figs. 4b and 5b). The study also found that 82.2% of CK sites experience forced removal and demolition, which includes 19% where the site was immediately developed, 23% where the site remained vacant but CK never returned and 40% where CK continued to return until the land was developed (Figs. 4c and 5c).

Social media representations and discourses

Beyond the physical conditions, the contextual analysis of gray literature indicates that the rapidity of China’s urbanization may also be connected to psychological motivations for practitioners of CK. Analysis of the social media posts collected in this study showed that the city is most often described as ‘loud/continuous noise’ (‘喧嚣’), ‘every inch is expensive’ (‘寸土寸金’), ‘foreign’ (‘陌生’) and a place of ‘struggle’ (‘拼搏’). CK is presented as a rare escape of ‘country lifestyle’ (‘田园生活’) that offers peace and relaxation from such urban harshness. Posters described CK as a practice that offered a wide array of rare benefits for an urban dweller—the simple pleasure of working with one’s own hands, proximity to nature, access to healthy organic vegetables, outdoor exercise, a sense of freedom and autonomy and engagement with rural childhoods and pasts, as well as the ability to save money by becoming self-sufficient in vegetables.

The posts frequently incorporated popular political and cultural slogans to allude to moral values such as industriousness—‘The Laborer is the Most Beautiful/Honorable’ (‘劳动人民最光荣’/ ‘劳动者是最美的人’) and ‘A Bit of Cultivation Is a Bit of Harvest’ (‘一份耕耘一份收获’); self-sufficiency—‘Do It Yourself, Want for Nothing’ (‘自己动手丰衣足食’) and ‘Work Hard with Your Own Hands for Prosperity’ (‘勤劳致富靠双手’); ecological civilization—‘My Home Is Green Waters and Lush Mountains’ (‘绿水青山我的家’); and rural revitalization–‘2022 New Farmer Strategy’ (‘2022新农人计划’) and ‘Three Rural Problems’ (‘三农’), covering ideologies that speak to a wide range of topics from both the past and present of Chinese society and the Chinese Communist Party.


The LCC results estimated that an average of 12,941 acres of CK were present in Wuhan’s metropolitan regions (204,260 acres, 826.6 km2) between 2017 and 2022. This figure far exceeds the known scope of urban agriculture in most comparably sized cities—approximately 120 acres of community gardens within the five boroughs of New York City (193,681 acres, 783.8 km2)40,41, 65 acres (264,181m2) of both private and public urban agriculture in the city of Chicago (149,746 acres, 606 km2)42 and 1,606 acres of backyard and community gardens in Toronto (155,726 acres, 630 km2)43—but falls below the estimated 87,000 acres in Havana (179,942 acres, 728.2 km2)44. While the informal nature and lack of organization had distinguished CK from common types of urban agriculture such as community gardens, allotments, urban farms and home gardens, this study has shown that CK possesses an astonishing potential to create large-scale spatial transformations that greatly exceeds current understandings of informal urban agriculture such as guerrilla gardening45,46.

The land-use histories of detected CK sites seen through time-series VHR imagery demonstrate how almost all have emerged from sites of large-scale demolition for urban expansion. They also show that after forced removal, CK is twice as likely to return than not if the site remains undeveloped. Thus, this paper argues that CK is responding to the specific spatial conditions created by the inefficiencies of rapid urbanization. Zhu et al. recognized self-claimed vegetable lots as a way for Hangzhou citizens to claim their ‘right to the city’ without waiting for an invitation to engage in governance21. The wider occurrence of CK detected through gray literature suggests that similar rights are potentially being claimed at the national scale by individuals who are acting independently but concurrently.

Discursively, the contextual analysis showed that, while state officials and most local news outlets stigmatize CK as ‘unmannered and uncivilized’21, the practitioners’ social media posts have leveraged a wide range of both past and present, popular and state-sponsored narratives to represent their encroachment as culturally, if not legally, valid. While rural support played a crucial role in the victory of the Communist party during the civil war and was widely valorized in Maoist ideology for national movements such as the Cultural Revolution, modern China’s developmental strategy relied upon a dualist rural/urban governance that privileged urban growth at the cost of rural resources47. Since then, the rural became commonly represented as ‘poor’, ‘backward’ and ‘uncivil’48. Since 2017, China’s rural revitalization strategy has sought to reframe the country’s urban–rural relationship, issuing calls such as ‘understand agriculture, love the peasantry and love the countryside’ in hopes of attracting urban investments and migration back to the villages17.

References to the imaginaries revived in the national strategy for rural revitalization frame the practice of CK as part of the ‘beautiful countryside’ and the rural root of Chinese identity. While hashtags such as ‘My Home Is Green Waters and Lush Mountains’ and ‘The Laborer Is the Most Beautiful/Honorable’ draw directly from other contemporary policies such as ecological civilization49 and national self-sufficiency50, CK practitioners also draw extensively from political movements that had valorized the rural in the past. Like the practitioners’ chosen nomenclature of ‘kaihuang’, references to the Maoist slogans of agrarian socialism such as ‘Do It Yourself, Want for Nothing’ evokes a nostalgic sense of national identity and civic duty that has remained important in contemporary Chinese society.

Thus, the sites of the ruralization of CK serve not only as spaces where the inside and outside of the urban are negotiated22 but also where the past and present visions of China’s future can be arbitrated to benefit individual aspirations for better living. This paper has demonstrated the ruralizing impact of CK, an informal practice of isolated individuals, upon the urban center of the megacity of Wuhan. Given its scalar potential, further studies on the ecological, social and economic impact, as well as the spatial distribution of the practice beyond this paper’s study area of Wuhan, are likely to yield interesting findings on a range of important contemporary issues from urban metabolism and sustainability to food insecurity and spatial inequality.

Though CK is correlated to specific characteristics of China’s urban growth, the issues of rapid urbanization it speaks to are widespread across the developing world, as are informal urban practices of self-help and agriculture that have often been dismissed as signs of incomplete development45. Beyond the emergent ruralization within China’s rapid urbanization, the findings of this study argue also for the importance of examining urban practices beyond the binaries of top-down versus bottom-up, urban versus rural and subject versus resistance, as they often obscure the subtle nuances of agency and their potential to contribute to inclusive, resilient and sustainable designs of the built environments at the regional, and potentially global, scale.


Social media data collection and contextual analysis

For contextual understanding of CK, this paper drew from existing studies and a compiled dataset of public news reports, local government notices, social media posts and online interviews of practitioners gathered as part of a postgraduate research dissertation at the School of Geography and the Environment of the University of Oxford entitled ‘Ruralizing Urbanization: Homesteads, Subjectivities and Subversions in China’s Growing Cities’ (ethics approval reference SOGE1A2021-110). News reports and government notices were collected by searching for the phrase ‘城市开荒种菜’ (CK for vegetables) on Baidu News, a popular Chinese news search engine. Social media posts were collected by searching the same phrase on Douyin, the Chinese equivalent of TikTok and one of the most popular social media platforms in the country. The data collected were analyzed by manually extracting any descriptions or content related to the three areas of interest below.

The first is any information relating to spatial, temporal or physical characteristics of CK that can be used to identify it through remote sensing data. This may be verbal or text-based descriptions of land-use patterns of CK sites before cultivation as well as images or videos that show what CK sites and their surroundings look like physically. The descriptions, images and videos extracted could be sorted into common patterns, which were summarized to provide an understanding of the spatial and temporal characteristics of CK (see ‘Results’) that informed the procedure for the visual verification of potential sites via satellite imagery as well as the design of the remote sensing dataset for classification.

The second area of interest is the geographic locations of CK sites. While news reports and government notices always provide the city, and often the neighborhood or street address, of the site, Douyin users can choose whether to tag the city that they are in on their posts. Some users disclose more detailed information verbally within their posts or in replies to comments. City- and province-level locations were tallied in the national distribution map in Fig. 1. Sites found in Wuhan were assessed via VHR satellite imagery to verify their existence and suitability as training data for the land cover classifier (see description of this assessment in ‘Visual verification of CK sites through VHR imagery’ section).

Finally, the third area of interest covers any social, political or cultural references associated with CK and the city in gray literature. The researcher cross-checked any hashtags, slogans and repeated phrases within post captions and descriptions with academic databases, as well as Chinese gray literature, to identify whcih references are used by the content creators, how their use aligns with/differs from conventional uses and how this use frames the practice of CK.

Visual verification of CK sites through VHR imagery

Manual visual interpretation of remote sensing imagery has been a fundamental part of the field42,51. Multiple studies have used this method on VHR imagery to obtain training data for LCC52,53. The Google Earth Pro platform contains a repository of historical VHR imagery from both satellite data and aerial photogrammetry that facilitated the visual verification of the temporal and spatial characteristics of CK. For the study area, VHR images going back as far as 2000 (Extended Data Table 1) were used for analysis. Each potential site was assessed first by its physical appearance in the year where the CK is active, then by its land-use history (Fig. 2). An active CK resembles urban agriculture in its vegetation, but where the spatial pattern of allotments and commercial farms are usually regular and geometrical, CK is random, composed of small plots of varying shapes and orientation. Temporally, the land use preceding CK should show a period of vacancy (usually after demolition) before the establishment of small plots of agriculture that emerge gradually in a rhizomic manner. A more detailed description of the distinguishing characteristics of CK can be found in Results.

Supervised machine-learning LCC

Remote sensing data have been recognized as one of the most powerful tools available in the monitoring of global land cover changes54,55. In the case of China’s rapid urbanization, remote sensing methods have made it possible to understand its diverse and multiscalar impacts, such as the assessment of environmental changes56,57,58, urban land-use dynamics26,53,59, agricultural productivity60, etc.

Additionally, the bird’s-eye view facilitated by remote sensing methods and the frequency of its data collection have proved useful in the understanding of informal phenomena, such as informal settlements, which are usually difficult to study owing to the lack of official documentation and the intensive labor associated with in-person surveys61,62,63. In recent years, the increasing availability of high-resolution satellite data has also made it possible to apply remote sensing to the detection and monitoring of small land-use phenomena such as urban agriculture36,42,64,65. In the context of this study, the remote sensing method of supervised machine-learning LCC facilitates a macrolevel understanding of CK that would not have been possible through conventional ethnographic methods (see Extended Data Fig. 2 for the LCC design).

As CK is an informal practice with little existing research or documentation, this study had access to only a small pool of training data for the LCC. A study by Ramezan et al. of the effect of training set size on supervised machine-learning LCC showed that larger training sizes generally yielded more accurate results but also demonstrated that the random forest and gradient-boosted trees algorithms could yield reasonably high accuracies even with a very small training size66. As such, this study used the random forest algorithm, which has generally proven to be one of the most efficient and accurate algorithms for LCC66,67.

As this study is only concerned with the detection of CK sites, just two land cover classes are included: CK and non-CK sites (Extended Data Table 2). Seven CK sites (yielded from the gray literature, social media data and practitioner interviews) and a collection of non-CK sites (a selection of existing land uses such as trees, commercial farms, buildings, water bodies, etc. obtained from OpenStreetMap) provided between 770 and 1,100 data points, which are randomly allocated 70% for training and 30% for validation (Extended Data Table 5).

Selective manual visual interpretation of the LCC results mapped onto Google Earth Pro’s VHR satellite imagery yielded 544 additional verified CK sites within four 3 m by 3 m sample areas, each located in the north, east, south and west sections of the city. To further overcome the initial lack of sample sites, these additional sites were added to create an enhanced training dataset that was used to train a second LCC with between 11,500 and 17,880 data points. This process allowed the city-wide survey of CK with good accuracy despite a small initial sample size (Table 1 and Extended Data Table 5).

Remote sensing data acquisition and preprocessing

This study leveraged high-resolution multispectral satellite images acquired by the European Space Agency’s Sentinel-2 mission68 between April 2017 and October 2022. The Sentinel-2 data were accessed through the Google Earth Engine, a popular cloud-based computing platform where users can efficiently analyze large quantities of remote sensing data through a web-based code editor55,69. For each year from 2017 to 2022, all Sentinel-2 data covering the study area with less than 5% cloud cover are collected to form a cloud-masked median composite image. Seven 10 m and 20 m spectral bands are extracted from the composite images to form the basis of the training data for the LCC.

Seven spectral indices that provide information related to CK are added to each composite image, including vegetation indices (Normalized Difference Vegetation Index70, Enhanced Vegetation Index71), the Bare Soil Index72, the Normalized Difference Water Index73 and the Normalized Difference Latent Heat Index74, as well as a multitemporal band measuring the Bare Soil Index standard deviation from 2001 to the year of the composite image generated using Landsat 5 and 8 data (Extended Data Tables 3 and 4).

This study uses an object-oriented approach, which has been demonstrated to improve the accuracy of the trained classifiers for urban land uses and smallholder agriculture36,75. Two object-oriented methods are applied to the remote sensing data. The first is the segmentation of composite images using object-based image analysis76,77. Object-based image analysis uses a segmentation algorithm to group similar pixels into object-based clusters, which makes it possible to assess object properties such as shapes and is helpful in preventing noise during classification. The second is the calculation of textural measures, which help the classifier recognize differences in spatial patterns78. For this study, nine textural features were calculated using the gray-level co-occurrence matrix79,80 and incorporated into one band using principal component analysis81.

The resulting dataset is a segmented composite multispectral image for each year between 2017 and 2022, each containing 16 bands of spectral and textural information, ready for LCC.

Classifier accuracy assessment

For both the initial and the second LCC conducted each year between 2017 and 2022, 70% of the sample data points (for both CK and non-CK sites) are randomly chosen for the training dataset, and the remaining 30% are used for validation. Each LCC result was assessed against the validation dataset and reported in a confusion matrix. Four accuracy measures were calculated from the confusion matrix—the producer accuracy and consumer accuracy for each land cover (Extended Data Table 5), the overall accuracy and Cohen’s kappa coefficient for the overall classifier (Table 1).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.