Data scraper for Department of Education Open Data Portal
5.2K
NOTE: More specific documentation is available "on the spot", in the package and subpackages directories (e.g.
edscrapers/scrapersoredscrapers/transformers).
Clone this repo using git clone.
Change directory into the directory created/cloned for this repo.
From within the repo directory run pip install -r requirements.txt to install all package dependencies required to run the toolkit
You need the ED_OUTPUT_PATH environment variable to be set before running. Not
having the variable set in your environment will result in a fatal error.
The ED_OUT_PATH environment variable is used to set the path to the directory where all output generated by this kit will be stored. The path specified must exist.
If GNU Make is available in your environment, you can run the command
make install. Alternatively, run python setup.py install.
After installing, run the eds command in a command line prompt.
If you would like to run this toolkit in a container environment, we have packaged this toolkit into a Docker image.
Simply run :
docker build in the root directory of this cloned repo. This will build an image of the scraping tookit from the Dockerfile
To get more info on the usage on the ED Scrapers Command Line Interface - eds, read the eds cli docs.
To get more info on the architectural design/approach for the scraping toolkit, read the architectural design doc
Scrapers are Scrapy powered scripts that crawl through links and parse HTML pages. The proposed structure is:
CrawlerProcess in the main scraper.py scriptTransformers are independent scripts that take a input and return it filtered and/or restructured. They are meant to complement the work done by scrapers by taking their output and making it usable for various applications (e.g. the CKAN harvester).
We currently have 7 transformers in place:
deduplicate: removes duplicates from scraping
sanitize: cleans up the scraping output data/metadata based on specified rules.
datajson: creates data.json files from the scraping output; these data.json files can then by ingested/harvested by
ckanext-harvest (used to populate a CKAN data portal).
rag: produces RAG analyses output files using an agreed weighted-value system for calculating the quality of metadata generated by the datajson transformer and (by extension) the 'raw' scraping output.
TODO: Add info about the others
Content type
Image
Digest
Size
488.1 MB
Last updated
almost 6 years ago
docker pull civicactions/edscrapers