<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[the peak lab. - Medium]]></title>
        <description><![CDATA[Here we will report on news, ideas and challenges. - Medium]]></description>
        <link>https://medium.com/thepeaklab?source=rss----e682a411f54d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>the peak lab. - Medium</title>
            <link>https://medium.com/thepeaklab?source=rss----e682a411f54d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 12 Nov 2026 20:51:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/thepeaklab" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Create a Scaling Drawer Using React Navigation 6]]></title>
            <link>https://medium.com/thepeaklab/how-to-create-a-scaling-drawer-using-react-navigation-6-30693487b32e?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/30693487b32e</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-navigation]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[drawer]]></category>
            <dc:creator><![CDATA[Paul Greve]]></dc:creator>
            <pubDate>Wed, 26 Jan 2022 09:15:33 GMT</pubDate>
            <atom:updated>2022-10-19T10:31:16.396Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Open kitchen drawer" src="https://cdn-images-1.medium.com/max/1024/0*HrrujZje-F_pUMUV" /><figcaption>Photo by <a href="https://unsplash.com/@jarson?utm_source=medium&amp;utm_medium=referral">Jarek Ceborski</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*NRYxZOTA7y-9L6Uv2OeD6g.gif" /></figure><p>We needed a drawer that scales down the content page when opened for one of our recently developed apps. We were already using the <a href="https://github.com/react-navigation/react-navigation/tree/main/packages/drawer">react-navigation/drawer</a> package, so this should easily be possible by setting some props, right? Unfortunately, the API slightly changed with react-navigation v6, and most of the examples and tutorials online were outdated and did not work. So, to save you some headache, I will show you how to create a content-scaling drawer without any third-party packages, just simple react navigation.</p><p>While researching, we found the npm package <a href="https://github.com/melihberberolu/react-native-scaling-drawer">react-native-scaling-drawer</a>, which you might be happy to use. However, this is the last option if you want to avoid additional third-party packages for features that you might expect are already included in comprehensive packages like react-navigation. So we went on and read our way through the <a href="https://reactnavigation.org/docs/getting-started/">react navigation docs</a> only to <a href="https://reactnavigation.org/docs/upgrading-from-5.x/#the-drawercontentoptions-prop-is-now-more-flexible-by-moving-to-options-for-drawer">find out that the drawerContents&#39; progress property was removed in v6</a>. Instead, the new useDrawerStatus and useDrawerProgress hooks should be used. I will show you an example.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bc5ed47810f0b17bb0d8786289bccaa/href">https://medium.com/media/4bc5ed47810f0b17bb0d8786289bccaa/href</a></iframe><h3>Setup</h3><p>We will create a blank react native project using <a href="https://expo.dev/">Expo</a> for the example project.</p><pre>$ expo init react-navigation-6-scaling-drawer</pre><p>We now have a blank app running. Next up, we add the navigation packages and the animation packages.</p><pre>$ npm install -S @react-navigation/native @react-navigation/drawer </pre><pre>$ expo install react-native-screens react-native-safe-area-context react-native-reanimated react-native-gesture-handler</pre><p>We start by adding two simple screen components to simulate the page navigation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff942b806a3c332c0bd76124106fc1b3/href">https://medium.com/media/ff942b806a3c332c0bd76124106fc1b3/href</a></iframe><p>After that, we create our drawer component based on the react-navigation/drawer and place it in the App component.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d0ca385da2e35977f5bb1038ed678bd7/href">https://medium.com/media/d0ca385da2e35977f5bb1038ed678bd7/href</a></iframe><p>As intended, this already provides us with the basic drawer functionality. Now we have to adjust the behavior and styling to make it scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*kYK13aViCoe0DqZU2HGX5w.gif" /></figure><h3>Scale it!</h3><p>The key feature of our scaling behavior will be a reusable wrapper component for our plain home and profile screens. The wrapper adds an abstraction layer for the scaling animation to be used with any other (existing) screen component without knowing anything about its implementation details. The screen component does not have to know about the drawer navigator either.</p><p>So here’s our animated scaling wrapper using the new useDrawerStatus hook.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/300a850de8128182085faeac05eb1663/href">https://medium.com/media/300a850de8128182085faeac05eb1663/href</a></iframe><p>As you can see, we use the useDrawerStatus hook to keep track of the open/closed status. We scale the content page to 80% if the drawer is opened to achieve the desired effect. You might want to play around with this value according to the needs of your app.</p><p>To use our new behavior component, we wrap it around our content screens.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/65317a6607299f49053e71e3351e262a/href">https://medium.com/media/65317a6607299f49053e71e3351e262a/href</a></iframe><p>From here on, it’s just about adjusting the styles of the drawer, like setting a background color and styling the menu entries.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/208a64565262895462d3b3c1c48dfb4c/href">https://medium.com/media/208a64565262895462d3b3c1c48dfb4c/href</a></iframe><h3>Optional: Dynamic status bar color for dark background drawers</h3><p>If you want to use a dark background, the status bar color has to be set dynamically based on the open/closed state of the drawer. To achieve this, we first install an additional Expo package.</p><pre>$ expo install expo-status-bar</pre><p>We can then use its exported method to dynamically update the status bar color in the ScalableScreen wrapper component.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/251bbef12ae15a106e67b9324fe0386d/href">https://medium.com/media/251bbef12ae15a106e67b9324fe0386d/href</a></iframe><h3>Wrapping up</h3><p>And there you have it, a scaling drawer using nothing but React navigation v6! Pretty easy to use as a starting point for your custom implementation. The working example can be found <a href="https://github.com/thepeaklab/react-navigation-6-scaling-drawer">here</a>.</p><p>Please note that this is only one possible solution for this effect. Some people also implemented the behavior using useDrawerProgress which might work just as well.</p><p>Thank you for reading; hopefully I can help you with this tutorial. Happy coding! 🤓</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30693487b32e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/how-to-create-a-scaling-drawer-using-react-navigation-6-30693487b32e">How to Create a Scaling Drawer Using React Navigation 6</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup a monorepo for react with yarn workspaces]]></title>
            <link>https://medium.com/thepeaklab/a-structural-approach-to-highly-reusable-react-components-6c6103335035?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/6c6103335035</guid>
            <category><![CDATA[yarn]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[monorepo]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Dennis Schneider]]></dc:creator>
            <pubDate>Fri, 22 Mar 2019 09:32:35 GMT</pubDate>
            <atom:updated>2020-06-09T10:37:26.027Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oMvA6aB2WFAio3Vq" /><figcaption>Photo by <a href="https://unsplash.com/@danielkcheung?utm_source=medium&amp;utm_medium=referral">Daniel Cheung</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this post I will show you some of the benefits of using a multi-package repository (“a monorepo”) to structure your large scale frontend projects. I will guide you through a simple example and show you some best practices. We will use Javascript and React in this project, still concepts should be applicable to other project types as well.</p><p>I’d love to hear how you do things and what you’ve found works well down in the comments.</p><h4>Prerequisites</h4><p>Before reading you should have some fundamental knowledge of the following technologies:</p><ol><li><a href="https://nodejs.org/en/">Node.js</a> and npm</li><li><a href="https://reactjs.org/">React</a></li><li><a href="https://yarnpkg.com/lang/en/">Yarn</a></li><li><a href="https://git-scm.com/">Git</a></li><li><a href="https://github.com/insin/nwb">nwb</a></li></ol><h3>The Structure</h3><p>At first we will need a solid directory structure. We will host multiple packages in different directories. Let’s give our root directory the following name: ACME. It’s the client we’re working for. Our client has two websites: one company website and a shop. For each of these projects we create a subdirectory. All packages will live inside a “packages” directory.</p><p>Both shop and website follow the same corporate identity and thus will share one component or another (eg. different Buttons, Selects, Text-Fields and so on). Let’s create a “common” directory for these. Components in this directory will be available for all packages.</p><p>The same applies for services, eg. a content service, which connects to a headless CMS. Or think of a twitter service that fetches ACME`s latest tweets (or lame jokes like in the example).</p><p>Anyway, we will end up with a folder structure like this:</p><pre>[acme]                                                                                                                                                                                                                                                          <br>├── package.json<br>└── packages<br>    ├── common<br>    ├── services<br>    ├── shop<br>    └── website</pre><p>A closer look reveals that we have to deal with two different types of packages: libraries (common, services) and apps (shop, website).</p><p>We will use <a href="https://github.com/facebook/create-react-app">create-react-app</a> to initialize the applications and <a href="https://github.com/insin/nwb">nwb</a> for the libraries. Both projects have excellent documentation, so I won’t cover the installation process in detail.</p><p>After you are done with the installation of all four packages, go ahead and delete all node_modules directories. Why? Well, we’ll learn that in the next part.</p><h3>The Setup</h3><p>To setup our packages architecture we’ll use a <a href="https://yarnpkg.com/lang/en/">Yarn</a> feature that’s available from Version 1.0: Workspaces. This feature comes along with some nice benefits. Apart from removing redundancy, it allows you to link packages, which means your packages can depend on each other.</p><p>We will use yarn init within the root directory to create a package.json file. Add the following to your freshly created file. We’ll call this directory the “workspace root”. Keep in mind that yarn requires you to set private : true .</p><pre>[ACME/package.json]</pre><pre>{<br>  <strong>&quot;name&quot;: &quot;@acme/core&quot;,</strong><br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;license&quot;: &quot;MIT&quot;,<br>  <strong>&quot;private&quot;: true,</strong><br>  &quot;<strong>workspaces</strong>&quot;: [<br>    &quot;<strong>packages/*</strong>&quot;<br>  ]<br>}</pre><p>You define your packages within the workspaces: [] array. In the example above we tell Yarn that all our packages will live under packages/*. Setting the wildcard makes life easy and fun (at least in this scenario).</p><p>Next go ahead and give you’re packages a name and a version number. It’s good practice to prepend a prefix. This opens up a namespace to avoid conflicts with other packages you might want to use.</p><pre>[ACME/packages/<strong>common</strong>/package.json]</pre><pre>{<br>  &quot;name&quot;: &quot;<strong>@acme/common</strong>&quot;,<br>  &quot;version&quot;: &quot;<strong>0.1.0</strong>&quot;,<br>  &quot;private&quot;: true,<br>  (...)<br>}</pre><pre>[ACME/packages/<strong>services</strong>/package.json]</pre><pre>{<br>  &quot;name&quot;: &quot;<strong>@acme/services</strong>&quot;,<br>  &quot;version&quot;: &quot;<strong>0.1.0</strong>&quot;,<br>  &quot;private&quot;: true,<br>  (...)<br>}</pre><p>Now that we have all our packages named, we can go on and add them as dependencies in packages where we want to use them. The package <strong>@acme/shop</strong> for instance depends on both <strong>@acme/common </strong>and <strong>@acme/services</strong> and thus has them listed as dependencies in its package.json file.</p><pre>[ACME/packages/<strong>shop</strong>/package.json]</pre><pre>{<br>  &quot;name&quot;: &quot;<strong>@acme/shop</strong>&quot;,<br>  &quot;version&quot;: &quot;0.1.0&quot;,<br>  &quot;private&quot;: true,<br>  &quot;dependencies&quot;: {<br>    &quot;<strong>@acme/common</strong>&quot;: &quot;<strong>0.1.0</strong>&quot;,<br>    &quot;<strong>@acme/services</strong>&quot;: &quot;<strong>0.1.0</strong>&quot;,<br>    ...<br>  },<br>  ...<br>}</pre><p>The same applies for ACME’s website package.</p><pre>[ACME/packages/<strong>website</strong>/package.json]</pre><pre>{<br>  &quot;name&quot;: &quot;<strong>@acme/website</strong>&quot;,<br>  &quot;version&quot;: &quot;0.1.0&quot;,<br>  &quot;private&quot;: true,<br>  &quot;dependencies&quot;: {<br>    &quot;<strong>@acme/common</strong>&quot;: &quot;<strong>0.1.0</strong>&quot;,<br>    &quot;<strong>@acme/services</strong>&quot;: &quot;<strong>0.1.0</strong>&quot;,<br>    ...<br>  },<br>  ...<br>}</pre><p>Having all in place we can install dependencies by calling yarn install from within the workspace root. The reason for removing the node_modules directories in the first place was that we wanted to allow Yarn to install all project dependencies together. Yarn uses a hoisting scheme to reduce redundancy. In this process all dependent packages are flattened into a global location (our workspace root).</p><h3>The Example</h3><p>It’s time to get your hands dirty. Feel free to clone the project from <a href="https://github.com/thepeaklab/acme-monorepo.git">Github</a> and install its dependencies.</p><pre>git clone <a href="https://github.com/thepeaklab/acme-monorepo.git">https://github.com/thepeaklab/acme-monorepo.git</a><br>cd ./acme-monorepo<br>yarn install</pre><p>You will find the following in this repository:</p><ul><li>the monorepo structure described above</li><li>a “HelloWorld”-component in the “common” library</li><li>one service that fetches jokes from David Katz <a href="https://github.com/15Dkatz/official_joke_api">random joke api</a></li></ul><p>Don’t be afraid to fiddle around with it.</p><p>Start with running yarn run website. This will build both packages common and services and fire up the website’s development-server. If you want to start the shop call yarn run shop. That’s it.</p><p>You should end up with something like this …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdE1SGGmGPIL4yoNqjFaXA.png" /></figure><p>… two completely independent projects able to share components and services from the same repository.</p><p>Both projects are almost identical and self-explanatory. Both have an instance of “HelloWorld” and both display data fetched from our service. The only difference is the value of the “name” property passed to “HelloWorld”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7rfk-uioeWw4kUJsvbIFWg.png" /><figcaption>packages/shop/src/App.js</figcaption></figure><p>Of course you don’t have to stop here. Imagine shared state reducers, reused business logic, maybe an independent storybook package to display your components and so on … possibilities of keeping your code <a href="https://www.codementor.io/joshuaaroke/dry-code-vs-wet-code-89xjwv11w">DRY</a> are endless. You will end up with a maintainable structure that encourages reusability.</p><p><strong><em>If you liked this article hit that 👋 button below. Thanks for reading!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c6103335035" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/a-structural-approach-to-highly-reusable-react-components-6c6103335035">How to setup a monorepo for react with yarn workspaces</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The magic of backend independent UI testing in Android]]></title>
            <link>https://medium.com/thepeaklab/the-magic-of-backend-independent-ui-testing-in-android-5c20ad6d2bf2?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/5c20ad6d2bf2</guid>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Thomas Cirksena]]></dc:creator>
            <pubDate>Fri, 15 Feb 2019 10:57:04 GMT</pubDate>
            <atom:updated>2019-02-15T10:48:10.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K83C6IHQXa29U3QVDNUNPA.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@conojeghuo?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Clem Onojeghuo</a> from <a href="https://www.pexels.com/photo/low-angle-photography-of-metal-building-on-grayscale-175771/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p><a href="https://github.com/thepeaklab/backend-independent-ui-tests">thepeaklab/backend-independent-ui-tests</a></p><p>Have you ever asked yourself how backend independent UI testing in Android works? Yes? Then please continue reading… ;)</p><p>As an app developer, from time to time you get the chance to integrate external APIs. When it comes to our customer projects, it is often the customer’s backend from which we are able to retrieve corresponding data.</p><p>If we need to implement a new feature, the best-case scenario would be that the API has already been adapted on a staging system, so we’re able to connect to it. The reality, however, is that new features often have to be implemented by the customer, as well. So unfortunately, there is seldom an API version available that reflects the new behaviour.</p><p>There are two different approaches to start the development:</p><ol><li>You have a MockServer that simulates the behaviour of the real server and can simply be extended with the new function (assuming there is an agreement on how the API will be implemented).</li><li>You mock the data within the app and return it directly during test runtime.</li></ol><p><strong>Both options have their advantages &amp; disadvantages:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*3VJI2GwrUstUe9lu3XnheQ.png" /></figure><p>I am guessing that most of you are familiar with “mocking” or how MockServers work. If not, the web offers a wide variety of articles on this matter. For example, check out the following Wikipedia article on <a href="https://en.wikipedia.org/wiki/Mock_object">Mock objects</a>.</p><p>Since the approach of mocked data within the app is often only described for JUnit-Tests, I would like to explain this option with regard to UI tests in this article.</p><h4>Dependency Injection &amp; MVVM</h4><p>The key to all this is Dependency Injection, i.e. the insertion of defined implementations at runtime and the MVVM app architecture. We currently use Dagger to insert dependencies, but the same should apply to <a href="https://insert-koin.io/">koin</a> and other libraries.</p><p>The <a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel">MVVM pattern</a> describes the differentiation between model, view and view model, which makes it possible to test them.</p><h4>How does it all work now?</h4><p>We use a custom class that inherits from the application class and thus represents the root context of the app. In this class, Dagger is initialized, so we can inject every dependency from there to the desired places.</p><p><strong>JUnit Tests (for comparison)</strong><br>Within the JUnit tests, the desired injection can simply be overwritten (<em>at setUp()</em>) to provoke a desired behaviour. This way almost all test cases can be mapped.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c2f71f4d267eb1885919ab09bc634e2/href">https://medium.com/media/1c2f71f4d267eb1885919ab09bc634e2/href</a></iframe><p><strong>UI Tests</strong><br>Unfortunately, the procedure used for the JUnit tests does not work within the UI tests. Because within these tests no mock data (using <a href="https://github.com/nhaarman/mockito-kotlin">Mockito-Kotlin</a>) can be created, another variant for the test procedure must be used for the Dagger Dependencies.</p><p>However, since we do not have direct access to the application (only after the launch of the activity, at which time the Dagger initialization has already been performed), we must consider another construct.</p><p><strong><em>1. Custom TestApplication Class for UI Tests<br></em></strong>First, we have to define our own application class for our test runtime. This is necessary because we can’t initialize a mock as injected dependency, as in the setUp() method shown above.</p><p><strong><em>2. Test runner</em></strong><br>In order that the UI test also uses the newly created application (and not the original one), we must write our own small TestRunner. This doesn’t really contain much, but only refers to our <em>TestApplication</em>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/794736ac7c43d1fd09bde0cb5530ca76/href">https://medium.com/media/794736ac7c43d1fd09bde0cb5530ca76/href</a></iframe><p>Within the <em>build.gradle (app)</em>, we only have to use this runner for our tests:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a2ab433aa8afb74f4f1079c3bd3c29ed/href">https://medium.com/media/a2ab433aa8afb74f4f1079c3bd3c29ed/href</a></iframe><p><strong><em>3. Mocking Data<br></em></strong>As described above, we can’t inject a mock, so we must do our own implementation of the interface in order to adapt it to the test runtime.<br>The mocked implementation could look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2781a7091e8e91ae7cc07f511116c7c/href">https://medium.com/media/b2781a7091e8e91ae7cc07f511116c7c/href</a></iframe><p>The mocked file consists of the expectations and the actual (mock) implementation under <em>service</em>.</p><p>By setting an expectation, the return value can be influenced, so we can now also adjust it within the UI test for the test runtime (similar to the unit tests before).</p><p><strong><em>4. TestImplementation of the Dagger initialization in the TestApplication.kt.</em></strong></p><p>Now that we have a test implementation, we have to equip Dagger with it as well. We do this again in the <em>TestApplication</em>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51f5713aa7ec77763bfa2569669c3ae6/href">https://medium.com/media/51f5713aa7ec77763bfa2569669c3ae6/href</a></iframe><p><strong>Ready for UI-Testing</strong></p><p>After all these steps, we are finally able to write UI tests that check how the UI behaves even if there is no implementation from the backend yet.</p><p>The tests could look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5698f083e7fc1321c3664f50bdbaf1c0/href">https://medium.com/media/5698f083e7fc1321c3664f50bdbaf1c0/href</a></iframe><h4>And that’s it! :)</h4><p>Now we can write UI tests that can simulate the desired response by means of the expectation. Thus, how the UI of the app behaves in different scenarios can now be tested.</p><p>It should be said again, however, that this is now a pure UI test and not an integration test, as it is often presented.</p><p>Since no real request is sent, the network interface cannot be checked this way, only the possible use cases.</p><p>Integration tests are another topic that I will present in a subsequent article.</p><p>I hope I was able make the concept a little more understandable. You can find an example app containing this on github:</p><p><a href="https://github.com/thepeaklab/backend-independent-ui-tests">thepeaklab/backend-independent-ui-tests</a></p><p>Please leave a clap if you want to see more articles like this one, thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c20ad6d2bf2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/the-magic-of-backend-independent-ui-testing-in-android-5c20ad6d2bf2">The magic of backend independent UI testing in Android</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interaktives Festivaldesign]]></title>
            <link>https://medium.com/thepeaklab/interaktives-festivaldesign-44a664b1a8d?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/44a664b1a8d</guid>
            <category><![CDATA[interaction-design]]></category>
            <category><![CDATA[jazz]]></category>
            <category><![CDATA[brutalism]]></category>
            <category><![CDATA[festivals]]></category>
            <category><![CDATA[ui-design]]></category>
            <dc:creator><![CDATA[Robin Schu]]></dc:creator>
            <pubDate>Thu, 10 Jan 2019 14:32:41 GMT</pubDate>
            <atom:updated>2019-01-10T15:04:15.406Z</atom:updated>
            <content:encoded><![CDATA[<h4>Gestaltung eines visuellen Leitbilds und einer Website an der DHBW Ravensburg</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QsN9s1dT_jtzQFIeCnZ-5A.png" /></figure><p><strong>Der akademische Hintergrund:</strong></p><p>Vorrangig beschäftigt sich das dritte Semester Mediendesign an der<br> <a href="http://www.mediendesign-ravensburg.de/">DHBW Ravensburg</a> im Schwerpunkt mit Funktionen und Ausdrucksmöglichkeiten multimedialer Gestaltung. Das Spektrum verläuft zwischen anschaulicher Vermittlung sowie Steuerbarkeit und Vernetzung von Informationen auf der einen Seite, Experiment, Unterhaltung sowie medialer Vielfalt auf der anderen Seite. Typografie, Animation, Interaktion und Informationsvernetzung sollen zu einem stimmigen Ganzen zusammen gebracht werden.</p><p><strong>Der Anwendungsfall Landes Jazzfestival:</strong></p><p>Das Kultusministerium des Landes Baden-Württemberg hat dem Verein <a href="http://www.jazztime-ravensburg.de/">Jazztime Ravensburg</a> die Ausrichtung des Landes Jazzfestival 2019 übertragen. Bei der Veranstaltung, die vom 6. bis 17. November stattfindet, werden musikalische Highlights umrahmt von einem abwechslungsreichen Programm aus den Bereichen Kunst, Film und Literatur.<br>Die Aufgabe ist es, in einer Gruppe von maximal vier Studenten eine <br>Website für das Landes Jazzfestival zu konzipieren und zu gestalten.<br>Die Herausforderung besteht hierbei aus der Balance zwischen <br>künstlerisch-kreativer Inszenierung des bevorstehenden Events und einer funktional-dienlichen Hilfestellung für die Besucher. <br>Eckpfeiler gestalterischen Handelns sind neben der medienspezifischen Repräsentation von Orten und Künstlern das visuelle Leitbild.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUuFeQTXvpCQmqc3PA7y7Q.jpeg" /></figure><p><strong>Die Idee:</strong></p><p>Unter der Prämisse einer persönlich eingegrenzten jungen Zielgruppe von Menschen im Alter von 18 bis 40 Jahren soll das Landes Jazzfestival 2019 in neue Sphären aufsteigen. Ein integratives Konzept, das in der Gestaltung grundsätzlich auf der Exploration von Grundformen aufbaut, <br>soll dazu dienen, das Erlebnis spannend und erfahrbar zu machen. <br>Jede Veranstaltung des Festivals erhält eine ikonische Form, die sich ferner in Kategorien einordnen lässt. So orientieren sich Musikveranstaltungen an elliptischen Formen, Literatur- und Filmevents erhalten rechteckige Formen, dreieckige Eigenheiten verkörpern Kunstausstellungen. Zusätzlich orientiert sich das Design am Stile des Brutalismus, dessen Eigenschaften der Einfachheit und Beschränktheit einen Kontrast zu der komplexen Verbindung aus Formen und Veranstaltungen schaffen soll. Diese Entscheidung untermalt auch das Farbkonzept, welches sich in der Hierarchie den Formen hintenanstellt und entsprechend schlicht gehalten ist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MIAfPS8aNnNZKAZCYqtuSw.jpeg" /></figure><p><strong>Die Gestaltung:</strong></p><p>Für die Website ist eine primäre Anforderung die funktionale und intuitive Navigation durch sämtliche Inhalte. Das erarbeitete Konzept orientiert sich an einer globalen Menüführung im Kopfbereich der Website, die jederzeit sichtbar bleibt. Auf den Veranstaltungsseiten erscheint ein Submenü, das zusätzlich durch die jeweilige Veranstaltung navigiert und eine Verbindung aus betreffenden Persönlichkeiten, Veranstaltungsort und Ticketkauf ermöglicht.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WJSaSc2buNm5qVsJPh01wQ.jpeg" /></figure><p>Für ein integratives Erleben der Verbindung aus Formen und Veranstaltungen wird auf der Website umfangreich mit Micro-Interactions gearbeitet. <br>Dem Nutzer wird so unterbewusst eine Verbindung aus beiden Inhalten beigebracht, wobei diese für eine ausreichende Informationsaufnahme nicht zwingend notwendig ist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*huZZc18_pUNOZBogWZ0AXw.gif" /></figure><p><strong>Die Aussichten:</strong></p><p>Die Fertigstellung ist als interaktiver Prototyp anzusehen und obliegt dem Hintergrund einer studentischen Projektarbeit — dennoch wird in diesem Kontext mit dem Landes Jazzfestival ein realer Anwendungsfall geschaffen.</p><p>Weitere Einzelheiten und Details zu der Gestaltung sind <a href="https://www.behance.net/gallery/74638383/LandesJazzFestival-Ravensburg-2019">hier</a> zu sehen.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44a664b1a8d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/interaktives-festivaldesign-44a664b1a8d">Interaktives Festivaldesign</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pulse 2.0]]></title>
            <link>https://medium.com/thepeaklab/pulse-2-0-54244e08f7f4?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/54244e08f7f4</guid>
            <category><![CDATA[interface-design]]></category>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[ux-research]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[ux-design]]></category>
            <dc:creator><![CDATA[the peak lab.]]></dc:creator>
            <pubDate>Wed, 14 Nov 2018 10:30:10 GMT</pubDate>
            <atom:updated>2018-11-14T10:31:53.836Z</atom:updated>
            <content:encoded><![CDATA[<h4>Die Erweiterung der Pulse App im Hinblick auf zentrale Stromversorgung und Datenvisualisierung</h4><p>By <a href="https://medium.com/u/ddbd7181613e">Robin Schu</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3YKpZgfwzZwis5Jn1qyaSQ.jpeg" /></figure><p>Der erste Prototyp der Serie “<a href="https://medium.com/thepeaklab/pulse-an-initial-prototype-towards-the-interface-of-energy-part-i-7ed092d746b2">Pulse</a>” stützt sich ausschließlich auf das Einbetten in ein Szenario der <strong>dezentralen Stromerzeugung</strong>. Dabei geht es um die verbrauchernahe Produktion von Strom mithilfe von Kleinkraftwerken — eine Fortentwicklung, die innovativ und progressiv ist, jedoch von vielen Konsumenten im Energieverbund bislang nicht wahrgenommen wird. Das mehrheitlich angewandte System unserer Zeit stützt sich heute immer noch auf die <strong>zentrale Erzeugung</strong> und Verteilung von Strom. <br> <br>Das <a href="https://medium.com/thepeaklab/the-interface-of-energy-c28d508259be">Interface der Energie</a> soll selbstverständlich in Zusammenhang mit innovativen und zukunftsweisenden Technologien gesetzt werden, doch ist es uns ebenso wichtig einen Beitrag zu gegebenen Rahmenbedingungen zu leisten. Dieser soll insbesondere jene Teile unserer Gesellschaft ansprechen, die sich aus eigenem Interesse bislang eher weniger für die <strong>private Energieverwaltung mithilfe eines digitalen Tools</strong> interessiert haben. Es gilt daher sich speziell den Anforderungen älterer Menschen und Wenig-Nutzern mit geringer Technikaffinität anzunehmen und eine Anwendung zu entwickeln, die ein hohes Maß an Sensibilität aufweist. Das Konzept des “Universal Design” ist in diesem Zusammenhang besonders wichtig. Warum?</p><blockquote>Weil dieser am Menschen orientierte Designansatz nach dem Ziel strebt, die von Menschen für Menschen gestaltete Umwelt für möglichst alle empfänglich zu machen.</blockquote><p>Ein besonderer Schwerpunkt unserer Gestaltung ist deshalb die Datenvisualisierung. Welche spezifischen Inhalte sind für die oben genannten Konsumenten interessant und welche Art der Darstellung passend?</p><p>Das Bewusstsein der Menschen lässt sich unserer Meinung nach mithilfe zweier Aspekte am besten schärfen: <strong>Nachhaltigkeit</strong> und <strong>monetäre Bilanzierung</strong>. Diese beiden Inhalte sind in dem neuen Entwurf von “Pulse” auf zwei verschiedenen Ansichten des Dashboards angeordnet. Eine definiert tagesaktuelle Aspekte, die andere einen Rückblick zu vergangenen Monaten.</p><p>Bei Betrachtung der ersten Darstellung wird dem Nutzer eine Uhr gezeigt, auf die mithilfe von Überlagerungen verschiedene Ereignisse projiziert werden. Darunter fallen auch Zeiträume, zu denen die Netzauslastung eine Rolle spielt. Durch diese Visualisierung soll das Bewusstsein für ein zukünftiges dezentrales Szenario geöffnet werden — der neue Prototyp dient also auch als Mittler, der Menschen über neue Technologien und nachhaltiges Energiemanagement aufklärt.</p><p>Die Farbwahl der Gestaltung gibt die Bewertung der einzelnen Ereignisse vor — rosa eingefärbte Bereiche unterliegen einer hohen Auslastung des Stromnetzes, blaue Ereignisse hingegen eröffnen Nutzern die Möglichkeit, gewonnene Kapazitäten aus Grünstrom bewusst zu nutzen. Die zweite Ansicht zeigt in einem interaktiven Liniendiagramm einen monetären Trend der Verbräuche. Unter der Berücksichtigung der Mensch-Computer-Interaktion wird besonders auf den Interaktionsstil dieser Darstellung geachtet. Das prägende Leitbild des Screens ist in diesem Fall die Intention der Anwender. Der Nutzer soll zu einer offensichtlichen Interaktion ermutigt werden. Diese soll genau die Erwartungen erfüllen, die der User an sie hat. Eine Objektauswahl ist in dem Liniendiagramm an vier Punkten möglich. Diese beziehen sich jeweils auf eine der vier Wochen des ausgewählten Monats. Sie geben einen Verbrauchstrend und einen monetären Wert der Verbrauchsdaten an, sobald sie durch Tippen angewählt werden.</p><p>Wir glauben, dass sich der neue “Pulse 2.0.” Prototyp gut in ein aktuelles Szenario integrieren ließe und dabei neue Zielgruppen als Anwender — wie beispielsweise sogenannte Wenig-Nutzer mit geringer Technikaffinität — einbeziehen würde, um diese für die private Energieverwaltung per App zu sensibilisieren.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54244e08f7f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/pulse-2-0-54244e08f7f4">Pulse 2.0</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aus Daten folgen Taten — wie geht das? III]]></title>
            <link>https://medium.com/thepeaklab/aus-daten-folgen-taten-wie-geht-das-iii-f76899c6146a?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/f76899c6146a</guid>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[the-peak-lab]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[the peak lab.]]></dc:creator>
            <pubDate>Thu, 25 Oct 2018 09:28:12 GMT</pubDate>
            <atom:updated>2018-10-25T09:29:12.288Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Aus Daten folgen Taten — wie geht das? </strong>III</h3><p>By <a href="https://medium.com/u/edb99a9e0168">Andy Meinke</a></p><h3><strong>Eine Data-Science Artikelserie</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*sOR6mjFJRlTuK8HpjLxkIw.png" /><figcaption>Credit: Benjamin Jopen, <a href="https://unsplash.com/photos/ng4orQFv_mA">Unsplash</a></figcaption></figure><p>Neben dem im Artikel von <a href="https://medium.com/u/caa2d6bbee99">Moritz Mönning</a> beschriebenen <a href="https://medium.com/p/3b3cc0957b6">Sichtbarmachen von Daten</a>, können mithilfe der Data Science auch Auffälligkeiten in Datenmengen erkannt und herausgearbeitet werden. Auf Grundlage dieser Auffälligkeiten können im Anschluss gegebenenfalls Handlungsanweisungen erfolgen.<strong> </strong>So können beispielsweise datengetriebene Anwendungen dank der zugrundeliegenden und mittels der Data Science erarbeiteten Muster, Ereignisse mit einer gewissen Wahrscheinlichkeit vorhersagen.</p><p>Um dies zu veranschaulichen, haben wir die <a href="https://www.kaggle.com/adamschroeder/crimes-new-york-city">Polizeidaten</a> der Stadt New York City analysiert. Die untersuchten Daten beinhalten die Aufzeichnung aller im Zeitraum von Ende 2013 bis Ende 2015 aufgezeichneten Verbrechen in den Bezirken Bronx, Brooklyn, Manhattan, Queens und Staten Island. Die Erhebung ergibt für diesen Zeitraum 1.048.575 Rohdaten, wobei 1.016.158 davon geo-annotiert, das heißt standortspezifisch sind. Nach Bereinigung dieser Daten durch unser <a href="https://thepeaklab.com/de/">the peak lab.</a> Data-Science Team, sprich Entfernen von fehlenden und falschen Werten, sind insgesamt 842.416 Datensätze übrig geblieben, auf die wir zugreifen konnten.</p><p>Was wir herausgefunden haben? Auf den ersten Blick wird deutlich, dass Staten Island im untersuchten Zeitraum der Stadtteil mit der geringsten Verbrechensrate ist, nämlich circa 40.000 Straftaten. In Brooklyn hingegen wurde von den Behörden die höchste Anzahl an Verbrechen erfasst. Hier waren es mehr als 250.000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zUHocIrOmCa691B3c6MnIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZUq8CVOLY87Ayb4G0wNTXA.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Teilt man die verschiedenen Verbrechen in Kategorien wie Körperverletzung (Assault), Einbruch (Burglary), Drogendelikte (Dangerous Drugs), schwerer Diebstahl (Grand Larceny), Belästigung (Harrassment) und leichter Diebstahl (Petit Larceny) ein, so ergibt die Analyse, dass leichte Diebstähle in New York City über die Stadtteile verteilt prozentual den größten Anteil ausmachen. Der Besitz von gefährlichen Drogen sowie Einbrüche hingegen den geringsten Anteil.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*BixiK4bcIIjAP9DyiCCjfg.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Doch was bedeutet das nun für unsere Untersuchung? Wie zuvor beschrieben, kann Data Science dazu dienen Ereignisse auf Grundlage von Mustern in Daten vorherzusagen. Somit können also beispielsweise Menschen — in unserem Fallbeispiel etwa die Polizeibehörde von New York — dazu befähigt werden zu reagieren. Unsere Analyse zeigt, dass von allen oben aufgeführten Verbrechen, der Einbruch (Burglary) das einzige Verbrechen ist, das auf eine bestimmte Uhrzeit und einen bestimmten Ort hin vorhergesagt werden kann.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRyU02eHu_2PSBw5fwU2RQ.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Nachdem wir aus den 1.016.158 aufgezeichneten Verbrechen alle Einbr­üche gefiltert haben, konnten wir nicht nur Gebiete mit besonders hohen Einbruchsraten erkennen, sondern auch feststellen, dass drei Adressen in Brooklyn besonders auffällig sind.</p><p>Insgesamt wurde in den Apartmenthäusern an der Adresse im oben genannten Zeitraum 71 Mal eingebrochen. Warum aber waren genau diese Standorte in der Vergangenheit so häufig bevorzugtes Ziel von Einbrechern geworden? Eine Antwort auf diese Frage liefert eine Recherche im Netz: Dank der Geo-Annotation der Daten, konnten wir die Gebäude über Google Maps ausfindig machen. Bei Betrachtung der Häuser über Google Streetview fiel folgendes auf:</p><p>Wir konnten erkennen, dass bei allen drei Häusern direkt unter den Feuerleitern ein Zaun installiert war. Es war daher ein Leichtes für Einbrecher, die Feuerleiter mit Hilfe des Zauns zu erreichen. Wir glauben, dass dies einer der entscheidenden Gründe für die hohe Einbruchsrate bei diesen Wohnkomplexen sein kann.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XRDWpgFwE7t5kjjKIbKMQw.png" /><figcaption>Credit: Google Maps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPXPVGCy4KU1qyn9A64cWA.png" /><figcaption>Credit: Google Maps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gICl7ffQwgaQMna_gMp3uA.png" /><figcaption>Credit: Google Maps</figcaption></figure><p>Ausgehend von diesen drei Wohnhäusern, haben wir im nächsten Schritt weitere Faktoren bestimmt: Die bevorzugte Uhrzeit, den bevorzugten Monat, sowie den bevorzugten Wochentag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*y1xBZUDDSW5ZFFvP8VeevQ.png" /><figcaption>Credit: the peak lab.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*RsgXVEzkX7E0cXk1ZzDPGQ.png" /><figcaption>Credit: the peak lab.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*g0FMFnmXaOyJRZs8XdM2nw.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Die Analyse zeigt, dass vermehrt zwischen 5 Uhr und 10 Uhr, an Freitagen und primär in den Sommermonaten eingebrochen wurde. Diese drei Beispielinformationen dürfen allerdings nicht getrennt voneinander, sondern nur im Kontext betrachtet werden. Man muss also Wochentage und Uhrzeit miteinander kombinieren, um genauere Vorhersagen treffen zu können.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*gn7ZRpp5UDi0V9aV7LSLaw.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Wie können solche Erkenntnisse nun der Stadt New York City dabei helfen, Stadtteile sicherer zu machen? Ganz einfach: Um auf den Daten basierend vorherzusagen, wann und wo die Einbruchsgefahr besonders hoch ist, müssen große in mehrere kleine Gebiete geclustert und ähnliche Muster angewendet werden. Auf diese Weise kann die New Yorker Polizeibehörde entsprechende, auf Daten basierende Handlungsanweisungen umsetzen, um beispielsweise Einsätze von Streifenwagen in bestimmten Gebieten zielgerichteter planen und einsetzen zu können, damit Verbrechen möglicherweise bereits im Vorfeld vereitelt werden können.</p><p>Natürlich ist dies nur eins von vielen Beispielen, wie Data Science eingesetzt werden können. Ein weiterer interessanter Anwendungsfall für den positiven Einsatz von Data Science in New York ist die Initiative von <a href="http://www.passnyc.org/">PASSNYC</a>, einer datengetriebenen non-profit Organisation. Sie hat sich zum Ziel gesetzt, mit Hilfe von Data Science, die Diversität innerhalb des öffentlichen New Yorker Schulsystems zu erhöhen sowie Schulmittel gleichmäßig und gerecht zu verteilen.</p><p>Unsere beiden Beispiele von <a href="https://medium.com/u/caa2d6bbee99">Moritz Mönning</a> und <a href="https://medium.com/u/edb99a9e0168">Andy Meinke</a> zeigen, dass Data Science — bestehend aus einem großen Satz an wissenschaftlichen Techniken — nicht nur genutzt werden kann, um in der Theorie Auffälligkeiten und Muster zu erkennen und sichtbar zu machen. Vielmehr kann der richtige Einsatz von Data Science Menschen dazu befähigen ungeahnte Probleme zu erkennen, zu analysieren und zu lösen.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f76899c6146a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/aus-daten-folgen-taten-wie-geht-das-iii-f76899c6146a">Aus Daten folgen Taten — wie geht das? III</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aus Daten Dinge sichtbar machen — wie geht das?]]></title>
            <link>https://medium.com/thepeaklab/aus-daten-dinge-sichtbar-machen-wie-geht-das-3b3cc0957b6?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/3b3cc0957b6</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[the peak lab.]]></dc:creator>
            <pubDate>Thu, 18 Oct 2018 09:45:13 GMT</pubDate>
            <atom:updated>2018-10-25T09:27:24.902Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Aus Daten Dinge sichtbar machen — wie geht das? II</strong></h3><p>By Moritz Mönning</p><h3>Eine Data Science Artikelserie</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5DHkwOxlfukEF5nI8Hk0Tg.jpeg" /><figcaption>Credit: Jose Alonso, Unsplash</figcaption></figure><p>Unser erstes Beispiel beschäftigt sich mit dem Thema Waffenmissbrauch in den USA am Beispiel von Bandenkriminalität. Mit Hilfe von Visualisierungstechniken möchten wir aufdecken, welche Informationen und Muster sich in <a href="https://www.kaggle.com/jameslko/gun-violence-data">Polizeidaten</a> finden lassen, die sich auf Waffenmissbrauch beziehen. Auf diese Weise wollen wir veranschaulichen, welches oft ungenutzte Potential in großen Datenmengen verborgen liegt.</p><p>Trotz über 20.000 existierender Regularien in Bezug auf Waffenbesitz, ist das Recht eine Schusswaffe zu tragen in den USA durch den <a href="https://usa.usembassy.de/etexts/gov/gov-constitutiond.pdf">zweiten Zusatzartikel</a> aus dem Jahr 1791 verfassungsrechtlich geschützt. Darin heißt es:</p><blockquote>“Da eine gut ausgebildete Miliz für die Sicherheit eines freien Staates erforderlich ist, darf das Recht des Volkes, Waffen zu besitzen und zu tragen, nicht beeinträchtigt werden.”</blockquote><p>Wie hoch der Anteil an Schusswaffen in den USA tatsächlich ist, darüber gibt es keine genauen Zahlen. Eine landesweite Datenbank zur Registrierung von Waffenbesitz gibt es nicht. Verschiedene Umfragen aus dem Jahr 2016/17 besagen laut eines <a href="https://edition.cnn.com/2018/02/15/politics/guns-dont-know-how-many-america/index.html">CNN-Artikels</a>, dass zwischen 32 und 42 Prozent der Amerikaner in Haushalten mit Schusswaffen leben. Was jedoch sicher ist: Mit dem Recht Waffen zu besitzen, geht leider auch einher, dass es in den USA regelmäßig zu illegalem Gebrauch von Schusswaffen kommt — oft mit schwerwiegenden Folgen. Wie sich das in Zahlen ausdrücken lässt und welche Auswirkungen das hat, möchten wir im Folgenden zeigen:</p><p>Die von uns untersuchten Daten wurden im Zeitraum vom 01. Januar 2014 bis einschließlich 31. Dezember 2017 von den amerikanischen Behörden gesammelt. Unsere Analyse der 225.597 geo-annotierten Datensätze zeigt, dass die Straftaten von Jahr zu Jahr steigen. Während im Jahr 2014 51.854 Waffenmissbräuche registriert wurden, hat sich diese Zahl bis 2017 auf 61.402 erhöht. Ein Anstieg von circa 18,4 Prozent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWVZ0sHY83PuZn0RQXHi2A.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Unabhängig von der zeitlichen Perspektive der Daten, ist es besonders für ein so großes Land wie die Vereinigten Staaten interessant, die räumlichen Unterschiede zu betrachten. Wenn man die Häufigkeit der Waffenmissbräuche anhand der einzelnen Bundesstaaten aufschlüsselt, werden deutliche Unterschiede erkennbar: Während im Westen nur in Kalifornien und im Süden in Texas Ballungszentren erkennbar sind, häufen sich die Vorfälle im gesamten Bereich östlich von Texas mit einem Spitzenwert von 17.556 Fällen in Illinois im angegebenen Zeitraum.</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fplot.ly%2F%7Emo178%2F1%2F&amp;src=https%3A%2F%2Fplot.ly%2F%7Emo178%2F1.embed%3Fautosize%3Dtrue&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=plot" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0616399e486ecc18d69a9a61517c5842/href">https://medium.com/media/0616399e486ecc18d69a9a61517c5842/href</a></iframe><p>Zusätzlich zu der Häufigkeit des illegalen Gebrauchs von Schusswaffen, liefern die untersuchten Polizeidaten Hinweise auf die Charakteristika der Vorfälle. Wir haben diese aufgeschlüsselt und herausgefunden, dass beispielsweise in der Hochburg Illinois neben den für Waffenmissbrauch „gewöhnlichen“ Merkmalen wie etwa unerlaubter Waffenbesitz und Abfeuern von Schüssen unter Drogeneinfluss, Bandenkriminalität einen großen Anteil der Missbräuche ausmacht. Diese Annahme wollen wir im Folgenden genauer betrachten.</p><p>Sortiert man alle amerikanischen Städte absteigend nach der Anzahl der Vorfälle mit Einfluss von Gangmitgliedern, so setzen sich klar drei Städte von der Masse ab. Dabei handelt es sich um Chicago in Illinois (1378 Fälle), Portland in Oregon (259 Fälle) und Fresno in Kalifornien (235 Fälle). Um die Entwicklung im Laufe der Zeit besser nachvollziehen zu können, haben wir die Fälle monatsweise aggregiert und als Zeitreihe dargestellt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L1blVrfMCl5Jm_wPTYsQNg.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Besonders auffällig ist, dass die Gangkriminalität in Chicago scheinbar je nach Jahreszeit unterschiedlich hoch ist. So ist zu den warmen Sommermonaten stets ein rapider Anstieg zu verzeichnen, während die Vorfälle zum Winter hin wieder abnehmen. Der signifikante Abstieg im Jahr 2017 wird später noch genauer unter die Lupe genommen.</p><p>Um die verschiedenen Verbrechensmerkmale der drei Städte zu veranschaulichen, haben wir die Städte relativ zueinander dargestellt. Dabei fällt auf, dass jede Stadt eine eigene Struktur aufweist. Während in Fresno und Chicago besonders oft der Waffenbesitz der Gangmitglieder geahndet wurde, macht der Drogeneinfluss ausschließlich in Fresno einen Großteil aus. Der hohe Anteil von sonstigen Merkmalen in Portland ist einer sehr hohen Anzahl an Fällen geschuldet, bei denen zwar geschossen, allerdings niemand verletzt oder getötet wurde.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MzWTMb6w3TJE0l4SxpF80Q.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Bei jedem Vorfall notiert die zuständige Polizeibehörde mit prägnanten Schlagworten besondere Auffälligkeiten. Diese Notizen haben wir mit sogenannten Wordclouds visualisiert. Dabei gibt die Größe der jeweiligen Wörter die Häufigkeit der notierten Schlagworte an.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*nh76CUXX4s4yXgIAx3hH1w.png" /><figcaption>Chicago | Portland</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mEBoNR_T-8mhcEUyOEoGVw.png" /><figcaption>Fresno</figcaption></figure><p>Chicago ist die Stadt in den USA mit der höchsten Gangkriminalität. Mit 1.378 von den insgesamt 5.395 Fällen in den vereinigten Staaten verzeichneten Vergehen, macht allein Chicago über ein Viertel aller Verbrechen in diesem Zusammenhang aus. Bezieht man das Ganze auf den Staat Illinois, so macht hier Chicago mit 82,91% den Großteil aus.</p><p>Um einmal die Entwicklung der Art der Vorfälle nachvollziehen zu können, haben wir die Verbrechensmerkmale quartalsweise ausgewertet und nachfolgend dargestellt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l_3MT0_HI4Ljd5YxqFL6LQ.png" /><figcaption>Credit: the peak lab.</figcaption></figure><p>Die nachfolgende Animation dient dazu die Orte der einzelnen Vorfälle im Laufe der Zeit zu identifizieren. Dabei ist die Darstellung in Quartale unterteilt. Zudem werden neben den Geokoordinaten zwei weitere Attribute berücksichtigt. Während die Größe der Punkte angibt, wie viele Menschen durch den jeweiligen Vorfall verletzt oder getötet wurden, steht die Farbe für das Alter der Opfer. Eine Erläuterung der Farben sowie eine Zuordnung der Opferanzahl (X-Achse) zu der jeweiligen Altersklasse (Y-Achse), findet sich in der Legende unter von der Animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*7ofsNZveMzAB0akvifjZAg.gif" /></figure><p>Chicago konnte nach einer starken Zunahme der Schießereien bis einschließlich 2016 seit 2017 einen Rückgang verzeichnen. Neben der Anstellung von hochqualifizierten Polizisten und einer starken Fokussierung auf die Themen Waffen- und Gangkriminalität, nutzt das Chicago Police Department seit kurzem auch „Predictive Crime“ Technologien. Dabei werden Taten bereits vorhergesagt bevor sie passieren. Dies geschieht anhand der Analyse von historischen Daten, aufgrund dessen vermutet wird, dass bei einer ähnlichen Parameterkombination auch in Zukunft gewisse Bereiche besonders gefährdet sind.</p><p>Daten mit ungeahnten und vor allem ungenutzten Potentialen liegen überall verborgen. Sie werden meistens einfach in einer Datenbank abgelegt und verweilen dort oft ungenutzt für eine lange Zeit. Wir möchten zeigen, dass bereits mit einfachen Analysen und dem Einsatz von Filtern neue Erkenntnisse geschaffen werden können, welche ein besseres Verständnis der Daten ermöglichen. Dank der hohen Anzahl an Datensätzen, können wir die die Analysen beliebig skalieren. So können beispielsweise gesondert voneinander verschiedene Staaten oder gar Städte auf ihre Muster hin untersucht werden. Um euch dies zu demonstrieren, hat mein Kollege <a href="https://medium.com/u/edb99a9e0168">Andy Meinke</a> im dritten Teil unserer Artikelreihe die Stadt New York auf ihre Verbrechen hin untersucht und dazu interessante Einblicke erhalten. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b3cc0957b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/aus-daten-dinge-sichtbar-machen-wie-geht-das-3b3cc0957b6">Aus Daten Dinge sichtbar machen — wie geht das?</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aus Daten Wissen generieren — wie geht das?]]></title>
            <link>https://medium.com/thepeaklab/aus-daten-wissen-generieren-wie-geht-das-7418715596e1?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/7418715596e1</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[the peak lab.]]></dc:creator>
            <pubDate>Tue, 09 Oct 2018 13:38:01 GMT</pubDate>
            <atom:updated>2018-10-18T12:14:55.106Z</atom:updated>
            <content:encoded><![CDATA[<h3>Aus Daten Wissen generieren — wie geht das? I</h3><p>By <a href="https://medium.com/u/c6417d323b1c">Jens Läkamp</a></p><h3>Eine Data Science Artikelserie</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0q0oLwXbb9wkKp8LzR0JPA.jpeg" /></figure><p><strong>Einleitung: Irgendwas mit Daten</strong></p><p>Begriffe wie Big Data oder Data Science sind in aller Munde. Doch was verbirgt sich eigentlich dahinter? Wie funktionieren das Auffinden und Lesen sowie die Deutung von Daten? Welchen wissenschaftlichen, wirtschaftlichen, gesellschaftlichen oder gar politischen Nutzen hat die Datenwissenschaft? Und warum beschäftigt sich ein Unternehmen wie <a href="https://thepeaklab.com/de/">the peak lab.</a> damit?</p><p>Diese Fragen haben wir unseren beiden Data Scientisten <a href="https://medium.com/@andreas.meinke.92">Andy</a> und <a href="https://medium.com/@moenning94">Moritz</a> gestellt. Seit zwei Jahren arbeiten sie intensiv daran, unsere the peak lab. Data Science Unit aufzubauen. In Kooperation mit der <a href="https://www.uni-oldenburg.de/">Universität Oldenburg</a> haben wir in diesem Zusammenhang unter anderem die Projektgruppe <a href="http://empowergenerations.de/">www.empowergenerations.de</a> ins Leben gerufen. Gemeinsam mit Kolleginnen und Kollegen unseres Teams entwickeln Studierende mit Hilfe von Data Science und Blockchain Ideen für den Strommarkt, damit Menschen beispielsweise in Zukunft überschüssige Energie selbst handeln können, <a href="https://www.uni-oldenburg.de/news/art/strom-direkt-vom-erzeuger-3630/">ohne auf Energieversorger als Zwischenhändler</a> angewiesen zu sein. Eine Idee, die allen Beteiligten viel Geld sparen würde.</p><p>Wie so oft jedoch, wenn Experten zu Ihrem Feld befragt werden, fallen die Antworten für Laien nicht immer verständlich aus. Daher haben Andy und Moritz zwei Beispiele herausgesucht, anhand derer sie den Nutzen der Datenwissenschaften verständlich erklären möchten. Die Grundlage ihrer Untersuchung bilden Daten aus öffentlich zugänglichen Polizeidatenbanken der USA. Diese haben sie gesichtet und im Anschluss Daten in Bezug auf <a href="https://www.kaggle.com/jameslko/gun-violence-data">Waffenmissbrauch</a> sowie <a href="https://www.kaggle.com/adamschroeder/crimes-new-york-city">Verbrechen</a> in New York City untersucht. Die Ergebnisse sollen veranschaulichen, welchen Zweck die Analyse großer Datenmengen hat und welche Schlüsse aus Big Data gezogen werden können.</p><p>Als interdisziplinäres Wissenschaftsfeld aus Mathematik, Statistik und Informatik, verfügt Data-Science über verschiedene Methoden aus Daten Wissen zu generieren. In unserer <strong>Data Science Artikelserie</strong> möchten wir anhand von Beispielen zwei Merkmale des Wissenschaftsfelds vorstellen: Zum einen das Generieren von Wissen anhand von <strong>Visualisierungen</strong>. Ein Prozess, der aus dem so genannten Data Mining entstanden ist. Zum anderen, das Data Mining selbst, wobei versucht wird, <strong>Auffälligkeiten</strong> in Daten aufzudecken.</p><blockquote>Unter Data Mining versteht man in diesem Zusammenhang die systematische Anwendung von statistischen Methoden auf große Mengen von Daten, mit dem Ziel, Verbindungen und Trends zu erkennen. Diese Anwendungen sind aufgrund der großen Datenmengen computergestützt.</blockquote><p>Wenn ihr wissen wollt, welches oft ungenutzte Potential in großen Datenmengen verborgen liegt, seid gespannt auf unseren nächsten Artikel. Im zweiten Teil erklärt Moritz euch am Beispiel des <a href="https://medium.com/thepeaklab/aus-daten-dinge-sichtbar-machen-wie-geht-das-3b3cc0957b6">illegalen Gebrauchs von Schusswaffen in den USA</a>, wie dank der richtigen Analyse von Daten Informationen sichtbar gemacht werden können.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7418715596e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/aus-daten-wissen-generieren-wie-geht-das-7418715596e1">Aus Daten Wissen generieren — wie geht das?</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Instant Apps]]></title>
            <link>https://medium.com/thepeaklab/android-instant-apps-da3335a2fe5e?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/da3335a2fe5e</guid>
            <category><![CDATA[android-instant-apps]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[instant-apps]]></category>
            <dc:creator><![CDATA[Julia Tetens]]></dc:creator>
            <pubDate>Tue, 25 Sep 2018 10:14:38 GMT</pubDate>
            <atom:updated>2018-10-18T09:54:06.784Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn about Instant Apps and how to implement it to your (existing) Android apps.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cggfVofIi-nZ_VUm5dPQw.jpeg" /><figcaption>Credit: Tommy Tong, Unsplash</figcaption></figure><p><strong>Android Instant Apps are native Android apps that can be used without pre-installation. They always belong to an installable app and can not be released without it.</strong></p><p>If there is an Instant App for an installable app available, the Play Store displays a “Try Now” button so that the user can try the Instant App directly without installing the whole app.</p><p>Instant apps can be linked to web links via Android App Links. So they can be accessed via a web link directly from other apps (for example, from Google Search app, from shared links in social media and messaging apps, etc.). If the installable app already exists on the user’s device, this app is opened directly (no app selection dialog as usual in Android).</p><p>Here’s a short video from Google how Instant Apps look like:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJ7EZgXJQGz0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJ7EZgXJQGz0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJ7EZgXJQGz0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4da69bdffd4b3464da7d59a242e15c66/href">https://medium.com/media/4da69bdffd4b3464da7d59a242e15c66/href</a></iframe><h4>Requirements</h4><ul><li>supported by most devices ≥Android 5.0 (many features like Android App Links and several permissions are only available on ≥ Android 6.0)</li><li>Android Studio ≥3.0</li><li>Android SDK build tools ≥ 26.x</li><li>Android SDK Platform Tools ≥25.x</li><li>Android SDK Tools (latest version)</li><li>Instant Apps Development SDK (latest version)</li><li>Support Repository (latest version)</li><li>all dependencies from the Support Repository (latest versions)</li><li>adjust permission handling if necessary (<a href="https://developer.android.com/topic/google-play-instant/getting-started/convert-to-instant-app#permissions">not all permissions are available for Instant Apps</a>)</li><li>the maximum size of an Instant App is <strong>4MB</strong> for alpha, beta and production (10MB for internal test)</li><li>if you use Android App Links, these links must be verified</li></ul><h3>Building a project with Instant App Support</h3><p>To deploy Instant Apps, the app project must be modularized so that the build process is separated from the app logic. There are at least three modules needed for this. Every Module has its own <em>build.gradle</em> with specific responsibilities.</p><h4>Base Feature Module</h4><p>The Base Feature Module is a module that must exist in every Instant App. It can contain the entire code of the app (if it’s small enough) or just the base code that will be included in all other Feature Modules. It will be marked as <strong>baseFeature</strong>:</p><pre><strong>apply plugin: &#39;com.android.feature&#39;</strong></pre><pre>android {</pre><pre>    ...</pre><pre>    <strong>baseFeature true</strong></pre><pre>    ...</pre><pre>}</pre><pre>...</pre><h4>APK Module</h4><p>The APK Module contains only a <em>build.gradle</em> and a <em>Manifest.xml</em> to build the APK of the installable app are needed. It sets the applicationID of the entire app in the <em>build.gradle</em>:</p><pre><strong>apply plugin: &#39;com.android.application&#39;</strong></pre><pre>android {</pre><pre>    ...</pre><pre>    defaultConfig {</pre><pre>        <strong>applicationID com.thepeaklab.example</strong></pre><pre>    }</pre><pre>    ...</pre><pre>}</pre><pre>...</pre><p>The package of the installable APK is defined in the <em>Manifest.xml</em>:</p><pre>&lt;manifest package=&quot;com.thepeaklab.example.app&quot; /&gt;</pre><h4>Instant App Module</h4><p>The Instant App Module defines all the modules that this Instant App should contain. It only has a build.gradle where the dependencies are defined:</p><pre>apply plugin: &#39;com.android.instantapp&#39;</pre><pre>dependencies {</pre><pre>    implementation project(&#39;:base&#39;)</pre><pre>    implementation project(&#39;:examplefeature&#39;)</pre><pre>    ...</pre><pre>}</pre><h4>Further Feature Modules</h4><p>In addition to the Base Feature Module the project can contain further modules that encapsulate individual features. Although the Base Feature Module may include the entire code of the app, it is best to split the app into separate feature modules. The smaller the binary of a single Instant App, the faster it can be loaded. These modules must apply the feature plugin in the <em>build.gradle</em>:</p><pre>apply plugin: &#39;com.android.feature&#39;</pre><pre>...</pre><h4>“Try Now” Button</h4><p>Use the following filters to define the entry point Activity of the Instant App (if you also use In App Links in your Instant App, you will have to define a default URL described below in the Android App Links Support section):</p><pre>...</pre><pre>&lt;intent-filter&gt;</pre><pre>    &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;</pre><pre>    &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;</pre><pre>&lt;/intent-filter&gt;</pre><pre>...</pre><h3>Prepare project for Instant Apps</h3><h4>Create a new app from scratch with Instant App Support</h4><p>When you create a new project with Android Studio, you can click on “include Instant App support” directly in the wizard. You can also define the desired host and the route for your main activity (see guidance <a href="https://developer.android.com/topic/google-play-instant/getting-started/first-instant-app">Create an Instant App</a>).</p><h4>Integrate Instant App support into existing app</h4><p>If you want to add Instant App support to an existing app, the project must be modularized. As described in the previous section, you have to create a Base Feature Module, an APK Module and an Instant App Module.</p><p><strong>First step</strong>: move all the existing app logic to the base feature module and create the APK module (see guidance <a href="https://developer.android.com/topic/google-play-instant/getting-started/create-base-feature-module">Convert to app to a base feature module</a>).</p><p><strong>Second step</strong>: create the Instant App Module (see guidance <a href="https://developer.android.com/topic/google-play-instant/getting-started/convert-to-instant-app">Convert a feature module to an instant app</a>).</p><p><strong>Third step</strong>: split the base feature module into smaller feature modules. This will be only necessary if your base feature module is too large but recommended for better user experience.</p><h4>Android App Links Support</h4><p>If you want your Instant App to be accessed via a web link, you have to <a href="https://developer.android.com/training/app-links/instant-app-links">integrate</a> the <a href="https://developer.android.com/training/app-links/">Android App Links</a> (Android 6.0 or higher) and <a href="https://developer.android.com/training/app-links/verify-site-associations">verify</a> them on your website.</p><p>An Android App Link is defined as an Intent filter in the Manifest.xml just like a <a href="https://developer.android.com/training/app-links/deep-linking">deep link</a>. In addition, a default URL must be specified, which serves as the entry point for the “Try Now” button.</p><pre>...</pre><pre>&lt;activity android:name=&quot;.MainActivity&quot;&gt;</pre><pre>    &lt;meta-data android:name=&quot;default-url&quot;</pre><pre>               android:value=&quot;<a href="https://thepeaklab.com/welcome%22">https://thepeaklab.com/&quot;</a> /&gt;</pre><pre>    &lt;intent-filter&gt;</pre><pre>        &lt;data</pre><pre>            android:host=&quot;thepeaklab.com&quot;</pre><pre>            android:scheme=&quot;https&quot;</pre><pre>            android:pathPrefix=&quot;/hello&quot; /&gt;</pre><pre>    &lt;/intent-filter&gt;</pre><pre>...</pre><pre>&lt;/activity&gt;</pre><pre>...</pre><p>In addition, you have to store a JSON file on the associated website under the URL <strong>https</strong>://<em>domain.name</em>/.well-known/assetlinks.json. This file verifies that your Instant App is allowed to be opened instead of the website. The file can be generated using the <strong>In App Link Assistant</strong> in Android Studio.</p><h4>Instant App API</h4><p>There is an <a href="https://developers.google.com/android/reference/com/google/android/gms/instantapps/package-summary">Instant App API</a> which you can use to check if the user currently uses the Instant App or the installable version. You also have the possibility to show an installation dialog for the entire App whenever you want.</p><h4>Optimization</h4><p>To keep the Instant App as small as possible and not to exceed the maximum size of <strong>4MB</strong>, there are the following tips:</p><ul><li><strong>use APK Analyzer</strong>: Android Studio analyzes and uncovers a selected APK, which consumes the most space</li><li><strong>Code refactoring</strong>: remove unnecessary code and outsource as much code as possible to individual modules (right-click on selected files → Refactor → Modularize)</li><li><strong>Resource refactoring</strong>: find unused resources with lint (cmd + alt + shift + I → “unused resources”), convert simple images to .svg and more complex images to WebP (right click on image or whole folder → Converting Images to WebP)</li><li><a href="https://developer.android.com/topic/google-play-instant/guides/config-splits"><strong>Configuration APKs</strong></a>: different APKs can be defined for individual device types, languages ​​etc.</li><li><strong>Libraries</strong>: remove unnecessary libs or make sure that they are only involved in the individual modules, where they are really needed; for larger libraries, which only require small parts, the remainder can be excluded by exclude group in the build.gradle</li><li><strong>ProGuard</strong>: use it to shrink, optimize and obfuscate your code</li></ul><h4>Test</h4><p>During development, the Instant App can be started on the device directly by building and launching the Instant App module.</p><p>In the App Links Assistant in Android Studio, there is the ability to enter URLs and test whether the desired Instant App is called.</p><p>With the <a href="https://developers.google.com/digital-asset-links/tools/generator">Statement List Generator and Tester</a> you can enter the URL and the package name of the app and check if Google has verified the url for this package name.</p><p>In the Google Play Developer Console, the Instant App can be uploaded as internal test with a specified list of testers. For this, an installable APK version of the app with the same or a higher version code must already have been uploaded.</p><h4>Distribution</h4><p>The Instant App is uploaded to the Google Play Console under “Release Management” → “Android Instant Apps”. It is possible to publish the Instant App for an internal test, an alpha, a beta or a production phase. More detailed instructions can be found <a href="https://support.google.com/googleplay/android-developer/answer/7381861">here</a>.</p><h4>Miscellaneous</h4><p>You can find general FAQ page for developing Instant Apps <a href="https://developer.android.com/topic/google-play-instant/faqs">here</a>.</p><p>You can also find a good tutorial video from Google Developer Days 2017 in India <a href="https://www.youtube.com/watch?v=aqzHJa_QV-k">here</a>.</p><h3>Conclusion</h3><p>Instant Apps are a great way to increase traffic in your app. Trying out the app removes the hurdle of installation. By linking to a web link, the Instant App opens directly, providing the ability to run completely native code from a link.</p><p>A major disadvantage is that links to Instant Apps are currently not accessible from Google search inside the browser and search results are not marked as an Instant App at the moment. I tried it out with the apps shown in the video above but I wasn’t able to see these special search results. In Google Search app, as well as clicking on a link from GMail or WhatsApp it works fine.</p><p>By restricting permissions, apps that need these permissions can not provide Instant Apps (or only features that don’t need them).</p><p>As Google pushes the modularization of apps, it’s worth optimizing apps to this scheme. Google has already announced the <a href="https://developer.android.com/guide/app-bundle/">Android App Bundles</a> (Android Studio 3.2). App Bundles are modular parts of an APK and can be dynamically exchanged without redeploying the entire APK. This means that the entire app does not have to be re-uploaded during an app update and only this part has to be updated on a device. App bundles should also receive Instant App support in the future. This means that an app bundle can be uploaded for updating the entire app as well as an Instant App at the same time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da3335a2fe5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/android-instant-apps-da3335a2fe5e">Android Instant Apps</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ENERA, OR WHAT WE CAN LEARN FROM SCIENCE FICTION]]></title>
            <link>https://medium.com/thepeaklab/enera-or-what-we-can-learn-from-science-fiction-240346289f2f?source=rss----e682a411f54d---4</link>
            <guid isPermaLink="false">https://medium.com/p/240346289f2f</guid>
            <category><![CDATA[energiewende]]></category>
            <category><![CDATA[people]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Jens Läkamp]]></dc:creator>
            <pubDate>Thu, 12 Jul 2018 12:46:06 GMT</pubDate>
            <atom:updated>2018-10-23T10:18:05.600Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vhIKiY3_5HLh9k0fXq29rw.jpeg" /></figure><p>What is enera? The enera project seeks to speed Germany’s transition to a smart grid that encompasses new technologies, new market mechanisms and a more consistent, transparent energy information system. It aims at increasing the integration of distributed and renewable energy sources across Germany and beyond. In a nutshell: enera seeks to revolutionize the energy system. As part of the enera project, the peak lab. will help to create the new “interface of energy.”</p><p>But if you consider the enera project solely from a technical point of view, the picture falls short. Instead, I think it is the needs of the consumer that will (help) decide the success or failure of the energy revolution.</p><p>We need to ask ourselves: how can we get the consumer to embrace the change? How do we get people on board? My response: Simple. All we need to do is show them how the energy revolution will have a positive effect on their everyday life.</p><p><strong>A TRIP TO THE FUTURE.</strong><br>As a proponent of electromobility, I can often be found riding around Oldenburg on my e-bike. On my journeys, I regularly pass by the windparks which have now become a standard feature of our landscape in northwestern Germany. A thought that has always struck me when I see these: the sleek columns and the spinning turbines look like something off the set of a science fiction film. A self-confessed sci-fi fan, I think there is something to learn from this genre as we integrate new technologies into our lives. That’s why I write this energy transformation blog today not from a purely technical or business perspective, but instead I try to explain just what it is about our enera model region that fascinates me and what the intelligent energy showcase has to offer every one of us.</p><p>We have become accustomed to the sight of wind turbines. We don’t even realize anymore how resourceful it really is to use a clean energy source that is available to us here in the North in unlimited quantities and virtually without interruption — and which helps us to be energy self-sufficient. At the moment, we are so preoccupied with technical and economic aspects such as grid expansion, storage management, costs and data security that we are beginning to lose sight of the big picture.</p><p>The more we hear about new technologies, systems, software, networks and political conditions, the easier it becomes to turn a blind eye to a crucial factor: acceptance by the user. With enera, we have to avoid this mistake at all costs. We must make it our goal to actively involve every single household in the process. Because it is only when the user is on board with us that the energy transformation can move ahead successfully.</p><p><strong>THE FIRST TANGIBLE BENEFITS WILL MAKE THE ENERGY REVOLUTION INTERESTING FOR PEOPLE.</strong><br>How can the individual be involved in the process? The “smart home” — as it is now known in Germany — presents a great possibility. This is a concept that regularly pops up in discussions about the energy transition and one that everyone believes they know what it means. In my mind, this is a fallacy. Sure, we are all aware of the example of the washing machine that washes our clothes when the wind blows and power is therefore cheap. But this example is old hat by now. In reality, we actually have no idea exactly what people’s requirements for a smart home are. As a design-driven software company, the peak lab. is trying to establish at this point how to understand in different ways the demands for a changing energy system. We want to develop products that users will enjoy using. They have to offer a quantifiable added value. And this is where the potential of the enera project comes in.</p><p>It is no secret: the energy transition is still viewed skeptically by most consumers. The benefits are rather abstract and the anticipated extra costs don’t appear to be worthwhile. Discussions about technical details also add to the skepticism and confusion. Today, not everyone wants a smart meter in their home. This would change if consumers knew just how they benefit from having one. One thing is clear: intelligent use of energy with smart grids is being implemented now and will soon become so commonplace it will be like smartphones are today. This is exactly what fascinates me about science fiction: how technologies that to us are new and foreign are taken for granted in these other worlds.</p><p><strong>FASCINATION, NOT CONFRONTATION.</strong><br>Every time a new technology is ready to be launched, there is a challenging initial period. Once this hurdle is overcome, acceptance builds among most users. Today, the smart home is sitting at this point. It doesn’t help that the smart meter was introduced by means of legislation, as this gives consumers the sense that they were forced into it. It would be much better to show consumers how “sexy” a smart meter can be and what the benefits would be. We must design products that are simple and intuitive to use. In today’s world, we must motivate people to support the transition. This is easiest to do if we can offer sustainable products that speak to the future of energy — a future that is already here. To me, this means taking the “fiction” out of science fiction and making tomorrow’s world one that everyone can experience. That’s my motivation and that is what the peak lab. will achieve, together with the partner of the enera project. We are looking forward to it!</p><p>For more information on the project’s aims, the model region, and it’s partners, please see: <a href="http://www.energie-vernetzen.de/">www.energie-vernetzen.de</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6SgEK0TBWjY%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6SgEK0TBWjY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6SgEK0TBWjY%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/282ee8b2eef16a32bc4f942f357f837f/href">https://medium.com/media/282ee8b2eef16a32bc4f942f357f837f/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=240346289f2f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/thepeaklab/enera-or-what-we-can-learn-from-science-fiction-240346289f2f">ENERA, OR WHAT WE CAN LEARN FROM SCIENCE FICTION</a> was originally published in <a href="https://medium.com/thepeaklab">the peak lab.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>