Giter VIP home page Giter VIP logo

rsv-dossier's Introduction

This site show's general information about Radschnellverbindungen (cycle highways) in Germany and specific about specific highways which are planned or build.

💾 Data

TLDR: The (geo)data is available in the radschnellwege/ folder. If you use the data, attribute it like this:

© FixMyCity/RSV-Dossier - ODbL License

You find the geometry and meta information about the highways under ./src/radschnellwege/. There is one file for all highways in meta/ folder containing the meta information. In the geometry/ folder, every cycle highway has one individual file. In ./data/schema/you'll find the schema for the json files. It enables the validation of the files via gatsby.

See README.md for more details.

🧑‍💻 Developing

If you found any bugs feel free to create an issue.

Getting Started

For starting developing, the following steps could be helpful for getting started:

  • Use or nvm to install Node.js: nvm use
  • Install dependenices: npm install
  • Start gatsby develop service: npm start
  • Use npm run to see a list of commands
  • Use npm run build && npx serve public to test the build

We use husky to ensure commits don't include linting issues. If you use nvm, as suggested here, you should create a ~/.huskyrc. See docs

Setup your .env.development file, for which you can use .env.defaults as a start.

For production you will also need a .env.production file. Otherwise the modules using the env variables, will not work.

Gatsby KnowHow

License

This project has different licenses. The code is licensed under the AGPL-3.0 License - see the LICENSE.md file for more information. It contains dependencies which have different Licenses, see package.json.

For the license of the data, please see the specific README.md respectively LICENSE file.

Thanks

rsv-dossier's People

Contributors

ann1kina avatar cafca avatar camisauria avatar dependabot[bot] avatar hekele avatar johannapeanut avatar ohrie avatar rush42 avatar tordans avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rsv-dossier's Issues

Integrate MapLibre GL JS

We want different kind of maps. There should be overview map and small info maps. For this we want to integrate MapLibre GL JS.

Tasks

  • Add maplibre-gl dependency
  • Figure out how to use it in Gatsby
  • Add MapTiler Base Layer
  • Add additional GeoJSON / VectorTile Layer

Implement new Homepage design

What's the problem you want solved?
The design for the homepage got updated. We need to adapt the design in the application. See Figma draft.

Is there a solution you'd like to recommend?

Integration ToDos

  • Add Image Logo
  • Add bottom hero image
  • Update content section for smaller images
  • Update text of homepage
  • Find (generic) images and add these

Improve <ButtonLink /> Component

What's the problem you want solved?
Currently you need to pass class names to get, for example, the outlined version of the ButtonLink. This is not handy and too hard to memorise.

Example:

<ButtonLink to="/foerderungen" className="btn-brand-outline mt-5">
  Zur Förderübersicht
</ButtonLink>

Is there a solution you'd like to recommend?

New version should be:

<ButtonLink to="/foerderungen" outline className="mt-5">
  Zur Förderübersicht
</ButtonLink>

Define `detail_level` as Enum Type in JSON schema

Currently in the JSON schema the detail_level property is defined as string. IMHO we should define allowed values as an enum type, to limit the possibilities and allow fully defined mappings for e.g. a map legend.
Until now we have the following values:

  • exact
  • rough
  • corridor
  • approximated

Maybe we could do something similar for the variant property.

Update to Gatsby

Gatsby released a new version of the core and plugins. We are two minor behind this newest version and should update to 4.16

Design Projects overview page components

What's the problem you want solved?

We want an overview page, which displays multiple highways on one page. Therefore we need one component which displays one highway. This component should

Use the TailwindUI component Alternating with optional testimonial as initial component.

Important: Integrate these components only as static components. Don't use dynamic maps or content from jsons. This issue is only for designing the components. Also don't change footer, navigation or something other from Layout components.

Tasks

  • Introduce a new component <RsvSnippet />
  • Modularize the component into comfortable sub-components into the same component folder
  • Integrate the component into (and replace current content of) /radschnellwege page
  • Design the components according to design draft

Build custom Matomo opt-out component

What's the problem you want solved?

We currently use a Matomo Iframe for users to opt out from tracking. This is located at /datenschutz page. Since Iframes are not optimal, especially for mobile, we would like to get rid of the iframe and use the matomo script to build a opt-out component our self.

Is there a solution you'd like to recommend?

There is a documentation at https://developer.matomo.org/guides/tracking-javascript-guide#optional-creating-a-custom-opt-out-form how to use the script.

Tasks

  • Remove the iframe from datenschutz page
  • Create new component MatomoOptOut
  • Use script mentioned above to build a checkbox which disables tracking on disabling.

RSV-Dossier: Setup Storybook

What's the problem you want solved?

Storybook should be integrated into the package. It should contain the UI components. It should not contain arbitrary components, which are not related to the project

Is there a solution you'd like to recommend?

See branch integrate-storybook.

Integration ToDos

  • Install via npm
  • Setup first components
  • Setup Netlify build

Integrate Privacy Opt-In for map

User should decide on whether share their information with the map service provider or not. They also should be to opt out afterwards.

  • Add Opt-In component before map loads
  • Load Map after opt-in
  • Add Opt-Out to privacy policy

Depends on #4

Fast build lane for skipping generating and requesting all static images via gatsby node

The Problem

Build time increased very much with the new static image generation for RSV. Also every build triggers many API Calls, but we have limited request quota.

Proposed Solution

There should be an CLI parameter or Environment variable where I can disable the generation of the static map images

Tasks

  • ?
  • ...

This has some medium priority for me.

Introduce Matomo on page

This page will be using Matomo for analysing user traffic.

Testing

  • Each page view shows data in Matomo
  • Its possible to add event tracking to track in page links
  • Its possible to add campaign tracking to track external links

Fix react helmet

Right now, we do not generate the required meta tags on SSR.

I had the same issue in FixMyBerlin/radwege-check.de@858474d, here are my findings gatsbyjs/gatsby#25189 (comment).

The last issue is an issue for us as well

In my case, I also noticed that I had some data:image;base64 stuff in the og:image tag which was because I used an import to import a PNG instead of referencing it from the 'static' folder.

To test success:

Looking at https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fradschnellverbindungen.info%2F now, it does show some data. I don't know where that comes from; I don't see the data inspecting http https://radschnellverbindungen.info/

Custom attribution for `DyanmicMap` and `StaticMap`

The Problem

The static map images are not necessarily shown in their full size and thus the attribution is not always visible.

Proposed Solution

Implement a custom attribution component for use in dynamic and static maps and disable the internal attribution tags.

Tasks

  • implement attribution component
  • disable attribution in static map generation
  • disable attribution in dynamic map

Introduce Gatsby Image Plugin

For better image handling we could introduce the gatsby-plugin-image. It automatically creates srcsets and providing different sizes for responsive pages in different formats. It also handles placeholder images, when internet connection is bad.

It provides the <StaticImage /> component.

See also https://www.gatsbyjs.com/plugins/gatsby-plugin-image/ and docs: https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image/

  • Add dependency
  • Replace all appropriate images with new Component

Suggested changes to MetaJSON

For the planned features of radschnellverbindungen.info we need the following adaptations in the MetaJSON schema:
(descending order of priority)

  • include the total length of every RSV
  • split from and to attributes, e.g.: from: string -> from: {city: string, state: string}
  • name id attribute consistent with the geoJSON files: currently the corresponding geoJSON attribute is name (which is also a foreign key in the geoJSON specification... thus changing name -> id might be better)

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.