Sensor.Community
Making the world a better place through community driven, open environmental data.
https://github.com/opendata-stuttgart/sensor.community
Category: Natural Resources
Sub Category: Air Quality
Keywords
javascript sapper sensor-community svelte
Keywords from Contributors
sensor citizen-science iot-device dust-sensor air-quality sensors-africa transforms measur archiving observation
Last synced: about 20 hours ago
JSON representation
Repository metadata
:sparkles: new shiny website built with svelte :heart: for dust and noise measuring project :point_right: https://sensor.community
- Host: GitHub
- URL: https://github.com/opendata-stuttgart/sensor.community
- Owner: opendata-stuttgart
- License: mit
- Created: 2020-01-04T17:02:14.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2024-12-30T21:32:26.000Z (4 months ago)
- Last Synced: 2025-04-10T06:40:57.200Z (17 days ago)
- Topics: javascript, sapper, sensor-community, svelte
- Language: Svelte
- Homepage: https://sensor.community
- Size: 35.8 MB
- Stars: 51
- Watchers: 11
- Forks: 43
- Open Issues: 16
- Releases: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
sensor.community website
✨ new shiny website for dust and noise measuring project 👉 sensor.community
How to install
Prerequisites
Get started
inside the folder install the dependencies...
npm install
or with yarn
yarn install
...then start Rollup:
npm run dev or sapper dev
alternative use yarn
yarn install
yarn dev or sapper dev
Navigate to localhost:3000.
You should see your app running. Edit a component file in src
, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv
commands in package.json to include the option --host 0.0.0.0
.
Getting started with Svelte & Sapper
Website is based on Svelte 3 and Sapper.
Please consider reading the documentation.
Translation
1. Create locale file
duplicate locales/en.json
file and rename it to language by iso-3166-alpha2 coding, for example fr for French.
Translate the values in the locale file:
{
"nav": {
"home": "Accueil", <- "Accueil" is the value
...
},
Now duplicate content/airrohr/en
folder and rename it again to language by iso-3166-alpha2 coding.
Also duplicate content/dnms/en
for the DNMS guide. Translate both
It's written in markdown. To get used to the markdown syntax, visit www.markdownguide.org.
FYI You can leave the filename. The title will be taken from the beginning of each file, see picture above.
2. Add new language to the init18n.js
Go to src/utils/initI18n.js
. Add the new language, in this case it's French.
First add the path to the locale file, then add it to the resources.
import fr from '../../locales/fr'; // path to the locale file
function initI18n(lng = 'en') {
i18next.init({
lng,
resources: {
en,
de
de,
fr
},
Go to src/routes/[lang]/_layout.svelte
and extend the array with the new language.
<script context="module">
const LANGUAGES = ["en", "de", "fr"]; // <- add new lanuage in the array
const DEFAULT_LANGUAGE = "en";
export async function preload(page) {...
3. Add language to the navbar
To add the language in the navbar go to src/components/LanguageSwitcher.svelte
. Scroll down to around Line 24 and add this line with the corresponding language.
const langauges = [
"gb", "de", "fr", "it", "sk", "ru" // <- add new lanuage in the array
]
4. Add endpoints
Duplicate inside src/routes/endpoints/airrohr
or src/routes/endpoints/dnms
then en
folder to the iso-3166-alpha2, e.g. fr
. Inside the index.json.js
file change line 8.
import send from '@polka/send';
import generate_docs from '../../../../utils/generate_docs.js';
let json;
export function get(req, res) {
if (!json || process.env.NODE_ENV !== 'production') {
json = JSON.stringify(generate_docs('airrohr/fr')); // <- change the lanuage iso-code
}
send(res, 200, json, {
'Content-Type': 'application/json'
});
}
Bugs and feedback
The website is in early development, and may have the rough edge here and there.
Deployment
yarn export or sapper export
copy content of __sapper__/export
to a ftp server
Happy coding 🎉 🙌
Owner metadata
- Name: Open Data Stuttgart
- Login: opendata-stuttgart
- Email:
- Kind: organization
- Description:
- Website: http://codefor.de/stuttgart/
- Location: Stuttgart, Germany
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/11635590?v=4
- Repositories: 14
- Last ynced at: 2023-02-28T23:25:26.385Z
- Profile URL: https://github.com/opendata-stuttgart
GitHub Events
Total
- Issues event: 2
- Watch event: 2
- Issue comment event: 1
- Push event: 1
- Pull request event: 2
- Fork event: 1
Last Year
- Issues event: 2
- Watch event: 2
- Issue comment event: 1
- Push event: 1
- Pull request event: 2
- Fork event: 1
Committers metadata
Last synced: 7 days ago
Total Commits: 400
Total Committers: 29
Avg Commits per committer: 13.793
Development Distribution Score (DDS): 0.453
Commits in past year: 9
Committers in past year: 3
Avg Commits per committer in past year: 3.0
Development Distribution Score (DDS) in past year: 0.222
Name | Commits | |
---|---|---|
ohheyitsdave | d****c@m****m | 219 |
DeeKey | D****y | 27 |
Rajko Zschiegner | r****z@g****e | 23 |
Pierre-Jean Guéno | c****j@y****m | 22 |
Pierre-Jean Guéno | p****o@y****r | 19 |
Maurício Taffarel | m****l@g****m | 18 |
dependabot[bot] | 4****] | 13 |
elvith-de | e****e | 11 |
Petarkir2000 | 3****0 | 8 |
flavio045 | 6****5 | 6 |
evertkuiken | i****o@e****l | 5 |
Michael Lažan | h****n@g****m | 4 |
Bertrik Sikken | b****k@s****l | 4 |
Aurimas Liutikas | a****s@l****t | 2 |
LadislavM | l****j@g****m | 2 |
MCedoc | M****c | 2 |
Maxime Jublou | m****e@j****r | 2 |
lokn | 2****n | 2 |
C. Jacobs | 5****l | 1 |
Eric Schaefer | o****g@e****m | 1 |
Stas | s****v@g****m | 1 |
centraline | c****e@c****t | 1 |
ignotus87 | s****i@g****m | 1 |
nodenetworks | 5****s | 1 |
reuben honigwachs | r****n@h****e | 1 |
rouf93 | 7****3 | 1 |
str3yt | 9****t | 1 |
Lukas Mocek | l****k@L****l | 1 |
Phaze-III | x****b@g****m | 1 |
Committer domains:
- honigwachs.de: 1
- cambiamolastrada.it: 1
- eric-schaefer.com: 1
- jublou.fr: 1
- liutikas.net: 1
- sikken.nl: 1
- evertkuiken.nl: 1
- gmx.de: 1
- me.com: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 31
Total pull requests: 201
Average time to close issues: 5 months
Average time to close pull requests: 12 days
Total issue authors: 22
Total pull request authors: 29
Average comments per issue: 1.77
Average comments per pull request: 0.42
Merged pull request: 169
Bot issues: 0
Bot pull requests: 27
Past year issues: 0
Past year pull requests: 5
Past year average time to close issues: N/A
Past year average time to close pull requests: about 1 month
Past year issue authors: 0
Past year pull request authors: 4
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- ohheyitsdave (7)
- steltenpower (3)
- marcauberer (2)
- RikDrabs (1)
- ituri (1)
- pyrog (1)
- alexey-milovidov (1)
- ignotus87 (1)
- aebgit (1)
- mouse256 (1)
- toastal (1)
- Sphericals79 (1)
- mattsches (1)
- kirrg001 (1)
- Dr0p42 (1)
Top Pull Request Authors
- ohheyitsdave (90)
- dependabot[bot] (27)
- pjgueno (16)
- DeeKey (14)
- ricki-z (6)
- Petarkir2000 (6)
- evertkuiken (5)
- flavio045 (5)
- LadislavM (3)
- hazarizk (3)
- MCedoc (3)
- ignotus87 (3)
- lokn (2)
- bertrik (2)
- taffarel55 (2)
Top Issue Labels
- enhancement (5)
- documentation (3)
- bug (3)
- help wanted (1)
- wontfix (1)
Top Pull Request Labels
- enhancement (57)
- documentation (56)
- bug (37)
- dependencies (34)
Dependencies
- 308 dependencies
- @babel/core ^7.10.5 development
- node-fetch ^3.2.0 development
- svelte ^3.46.4 development
- @fullhuman/postcss-purgecss ^4.1.3
- @polka/send ^1.0.0-next.15
- @rollup/plugin-commonjs ^21.0.2
- @rollup/plugin-json ^4.1.0
- @rollup/plugin-node-resolve ^11.2.1
- @rollup/plugin-replace ^3.1.0
- @sindresorhus/slugify ^1.1.0
- compression ^1.7.4
- country-emoji ^1.5.6
- date-fns ^2.28.0
- golden-fleece ^1.0.9
- gray-matter ^4.0.3
- highlight.js ^11.4.0
- i18next ^21.6.12
- marked ^3.0.8
- polka 1.0.0-next.22
- postcss ^8.4.7
- postcss-cli ^8.3.1
- prismjs ^1.27.0
- rollup ^2.68.0
- rollup-plugin-babel ^5.0.0-alpha.2
- rollup-plugin-svelte ^6.1.1
- rollup-plugin-terser ^7.0.2
- sapper ^0.29.1
- sirv ^1.0.19
- svelte-i18n ^3.3.13
- tailwindcss ^2.2.19
- 305 dependencies
Score: 7.571988449377439