GithubHelp home page GithubHelp logo

bopen / c3s_430a_ecde_page_text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cedadev/c3s_434_ecde_page_text

0.0 2.0 0.0 28.93 MB

To manage page text for the European Climate Data Explorer being developed by the C3S 430a project.

License: MIT License

Python 100.00%

c3s_430a_ecde_page_text's Introduction

C3S 434 ECDE Page Text

To manage page text for the European Climate Data Explorer being developed by the C3S 434 project.

Example page for an ECDE indicator: https://c3s.maris.nl/health/climatic-suitability-of-tiger-mosquito--season-length.html

Existing method uses google docs to compile the text:
https://docs.google.com/document/d/1U7znbhqq-xogrpcurqQOBQIh18SMNrdh4fXdNXZPo-s/edit These worked well when I was doing the thinking about what to include in the descriptions but they aren't suitable for managing the text as we make updates and scale up to include new indicators.

The new plan is to compile the indicator texts in a google sheet (like UKCP18) and then process the sheets to generate markdown text for the indicator pages.

Draft Google Sheet for ECDE indicators: https://docs.google.com/spreadsheets/d/1BHVHR1-3DC-AJ1ZQUtGUOs25fiGrt0adwmZcSNDFMk0/edit#gid=1104920491

Usage

First install the requirements;

pip install -r requirements.txt

To download the google sheets data and parse it to JSON, run this command;

python code/gdoc_parser.py

The first time you run this, an exception will be raised and you will be prompted with a link in the terminal. Open the link in a web browser and go to step one where there is a button called Enable the Google Sheets API. Click this and follow the steps, call your project what you like (or just leave it as 'Quickstart') and choose Desktop app. You can then click Download Client Configuration. You will need to rename and move this file to this location;

{TOP_LEVEL_GIT_DIR}/client_secret.json

The next time you run gdoc_parser.py (If you are on a machine that can't open a browser, run with the argument --noauth_local_webserver) you'll be prompted with another link. Follow this and sign in with google, you'll be met with a page saying the Google hasn't verified this app, click Advanced, then Go to Quickstart (unsafe). Then grant permission to view google spread sheets (if you ran with --noauth_local_webserver you'll need to copy a code and paste it into the terminal prompt).

After that, gdoc_parser.py will have the information it needs to download the google sheets content.


To create the markdown files from the JSON, run this command;

python code/create_md_files.py

c3s_430a_ecde_page_text's People

Contributors

charliepascoe avatar martinjuckes avatar

Watchers

 avatar  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.