概览
本指南提供了有关如何编写自己的 Google Earth Engine 教程的一般准则。其目的是让整个 Earth Engine 社区能够轻松创建清晰、简洁且易于理解的优质教程。
以下教程模板还可作为额外的指南,帮助您开始制作自己的教程。如需详细了解如何使用模板来入门,请参阅编写教程。
此外,Google Cloud Platform 社区教程样式指南为编写面向广泛受众群体的端到端教程提供了宝贵的参考资料,而 Google JavaScript 样式指南则详细介绍了 JavaScript 代码示例中推荐使用的样式。审核人员在审核您的提交内容时可能会参考这些指南。
常规指南
- 言简意赅。
- 不要重复自己说过的话。
- 不要重复说同一件事(即使措辞不同)。
- 定期标记进度。
- 在教程的关键点添加图片和文字,以便用户知道自己是否在正轨上。请谨慎使用!
- 尽可能使用主动语态。
- “当用户更改值时”,而不是“当值发生更改时”。
- 例外情况:如果必须费尽心思才能使用主动语态,或者执行者显而易见或无关紧要,则可以使用被动语态(例如“返回了一个 GIF 动画”,而不是“Earth Engine 返回了一个 GIF 动画”)。
- 只说事实。
- 避免使用最高级(“这是 100% 最好和最快的方法”)。
- 避免宣传产品或服务。
- 避免有争议的主题。
- 引用特定方法、数据集和分析时,请添加引用和网址。
- 使教程自成一体。
- 尽量不要依赖 API 之外的特殊库或公共 Earth Engine Data Catalog中没有的数据集。
- 如果您要提供其他数据或算法,请仅在获得相应许可的情况下分享。请务必添加所有必需的许可和提供方信息。
- 测试您的代码。
- 请务必在提交文章以供审核之前运行并测试所有包含的代码示例。
教程文件标题
如果您要手动创建并提交社区教程,而不使用撰写教程中提供的模板,则需要在文件开头手动添加相应的元数据和许可标头。选择所需的格式,查看可复制到您自己的教程中的模板:
Markdown
将以下内容添加到文档开头。标头前面不应有空格或其他字符:
---
title: Your tutorial title
description: A short description of the tutorial, all on one line with no carriage returns.
author: your-github-username
tags: comma-separated, lowercase, list, of, related, keywords
date_published: YYYY-MM-DD
---
<!--
Copyright 2023 The Google Earth Engine Community Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
请务必先替换相应的模板字段,然后再提交教程以供审核。
Colab
在笔记本开头的代码单元中添加以下内容:
#@title Copyright 2023 The Earth Engine Community Authors { display-mode: "form" }
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
教程模板
Markdown
如果您熟悉 Git 和 GitHub,可以使用以下代码作为模板来开始操作:
---
title: Your tutorial title
description: A short description of the tutorial, all on one line with no carriage returns.
author: your-github-username
tags: comma-separated, lowercase, list, of, related, keywords
date_published: YYYY-MM-DD
---
<!--
Copyright 2023 The Google Earth Engine Community Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
In a few sentences, describe what the user is going to learn. Be sure to include
_concise_ background information; only include what's helpful and relevant.
When in doubt, leave it out!
## Section heading 1
Break up your tutorial into manageable sections.
With one or more paragraphs, separated by a blank line.
Inside your sections, you can also:
1. Use numbered lists
1. ..when the order..
1. ..of items is important.
And:
- This is a bulleted list.
- Use bulleted lists when items are not strictly ordered.
..and even:
Use | tables | to organize | content
------- | -------- | ----------- | -------
Your | tables | can | also
contain | multiple | rows | ...
## Section heading 2
Use separate sections for related, but discrete, groups of steps.
Use code blocks to show users how to do something after describing it:
```js
// Use comments to describe details that can't be easily expressed in code.
// Always try making code more self descriptive before adding a comment.
// Similarly, avoid repeating verbatim what's already said in code
// (e.g., "assign ImageCollection to variable 'coll'").
var coll = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA');
```
### Use subsections if appropriate
Consider breaking longer sections that cover multiple topics or span multiple
pages into subsections.
或者,您也可以按照撰写教程中的说明,直接在 GitHub 基于 Web 的文件编辑器中打开上述模板。
请务必参阅编写教程,详细了解如何提议、撰写和提交教程。
Colab
如需使用推荐的样式模板创建新的 Colab 笔记本,请点击此处:
系统随即会打开一个笔记本,其中包含有关如何撰写和提交教程的说明。请务必参阅撰写教程,了解有关提案、撰写和提交流程的重要详情。