Giter VIP home page Giter VIP logo

fsa-fhrs-establishment-exporter's Introduction

FSA FHRS Establishment Exporter

This script fetches contact details of "establishments" in the FHRS database and writes them to a CSV file. We fetch the basic list of authorities, loop through those and fetch all the establishments for each authority, because it's not possible to fetch all establishments in one request with no filters. We then extract just the data we're interested in (easy to pick out other data if required) and write the concatenated results to a CSV file.

Dependencies

Node.js (tested with version 18.8.0 but any recent version should work) & npm

The script depends on axios for network requests and @json2csv/plainjs to convert JSON from the API into CSV format.

Install

Clone the repo and run npm i

Run

node index.js

Output

The script will log each authority as it fetches it, so you can see if it stops or slows down massively due to memory constraints (the data set is large and may be a problem if running this on a very resource constrained machine, we are processing the whole set in one, not streaming to file). When the script completes there will be a file fsa-establishments.csv in the root folder of the project.

fsa-fhrs-establishment-exporter's People

Contributors

markwilcox avatar

Watchers

Lloyd Watkin avatar  avatar Meg Brown avatar Jacques de Villiers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.