dataculturegroup / DataBasic

A suite of focused and simple tools and activities for journalists, data journalism classrooms and community advocacy groups
http://www.databasic.io/
MIT License
62 stars 16 forks source link

set up support for diff sample file based on domain people come in on #371

Closed rahulbot closed 5 years ago

rahulbot commented 5 years ago

Related to #370

rahulbot commented 5 years ago

@kanarinka I've added a shortcut that lets us limit samples by domain. If you simple add a domains property to the sample it will be respected. For instance, this would let us limit this speeches entry to just the (fictional) "political.databasic.io" domain:

  {
    "title": "Hillary Clinton's Speeches",
    "source": "sample-data/en/hillary-clinton-speech.txt",
    "modules": ["samediff", "wordcounter"],
    "lang": "en",
    "biography": "A collection of speeches made by Hillary Clinton during the 2016 US presidential election campaign.  This isn't a comprehensive set, but does contain many of her speeches.  It was created manually from their website, closed captions from YouTube videos, and other sources by Catherine D'Ignazio in early 2016.",
    "domains": ["political.databasic.io"]
  },

Notes: