  We study how legislation that restricts speech can induce online
self-censorship and alter online discourse, using the recent Hong Kong national
security law as a case study. We collect a dataset of 7 million historical
Tweets from Hong Kong users, supplemented with historical snapshots of Tweet
streams collected by other researchers. We compare online activity before and
after enactment of the national security law, and we find that Hong Kong users
demonstrate two types of self-censorship. First, Hong Kong users are more
likely than a control group, sampled randomly from historical snapshots of
Tweet streams, to remove past online activity. Specifically, Hong Kong users
are over a third more likely than the control group to delete or restrict their
account and over twice as likely to delete past posts. Second, we find that
Hong Kong users post less often about politically sensitive topics that have
been censored on social media in mainland China. This trend continues to
increase.
