<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dvir_BD</title>
    <description>The latest articles on DEV Community by Dvir_BD (@dvir).</description>
    <link>https://dev.to/dvir</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1057210%2F3e954ee5-d521-41a2-9642-575efe2e7059.png</url>
      <title>DEV Community: Dvir_BD</title>
      <link>https://dev.to/dvir</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dvir"/>
    <language>en</language>
    <item>
      <title>A Community-Driven Data Exploration Journey: Airbnb Property Data &amp; Bright Data</title>
      <dc:creator>Dvir_BD</dc:creator>
      <pubDate>Mon, 05 Jun 2023 09:24:49 +0000</pubDate>
      <link>https://dev.to/dvir/a-community-driven-data-exploration-journey-airbnb-property-data-bright-data-29bb</link>
      <guid>https://dev.to/dvir/a-community-driven-data-exploration-journey-airbnb-property-data-bright-data-29bb</guid>
      <description>&lt;p&gt;I am excited to share an intriguing use case that showcases not only the potential of data marketplaces and data analysis, but also the incredible value of the global developer community.&lt;/p&gt;

&lt;p&gt;Recently, I embarked on a project to analyze the real estate market in Salt Lake City - a city predicted to be the next hotspot for timeshares and vacation rentals. I built a dataset of 918 Airbnb properties in Salt Lake City, accommodating five guests or less, which I plan to use for price comparisons, market analysis, and cool visualizations.&lt;/p&gt;

&lt;p&gt;The exciting part? Instead of spending hours painstakingly scraping data, I got it directly from Bright Data’s marketplace! This high-quality dataset is accurate and ready to use, leaving me more time to focus on analyzing the data rather than gathering it.&lt;/p&gt;

&lt;p&gt;However, I quickly faced a new challenge - how could I best visualize this information and extract valuable insights from the dataset? Being a self-taught (and continuously learning) data analyst, I decided to leverage the wisdom of the Reddit community to help navigate this problem.&lt;/p&gt;

&lt;p&gt;My initial questions were:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How do the prices of these properties vary by location, number of bedrooms, or amenities offered?&lt;/li&gt;
&lt;li&gt;Are there any patterns or trends in the reviews or ratings of these properties?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I also needed advice on the best tools or techniques to explore this dataset and answer these questions. Python, Excel, or any other data analysis software - all suggestions were welcome!&lt;/p&gt;

&lt;p&gt;The response from the community was overwhelming. Not only did they share their insights and expertise, but one member even set up a GitHub project to streamline our collective efforts. Together, we transformed the raw Airbnb data into insightful graphs and charts, shedding light on previously hidden trends and patterns.&lt;/p&gt;

&lt;p&gt;This journey has reinforced two key insights:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The power of data marketplaces like Bright Data in providing reliable and ready-to-use data.&lt;/li&gt;
&lt;li&gt;The value of community in problem-solving and innovation. When developers collaborate, the potential for innovation becomes boundless.
If you're interested in the project, check out the [GitHub repository](&lt;a href="https://github.com/yuchen927/python_salt_lake_city_airbnb/blob/main/salt_lake_city_airbnb.ipynb"&gt;https://github.com/yuchen927/python_salt_lake_city_airbnb/blob/main/salt_lake_city_airbnb.ipynb&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>datasets</category>
      <category>airbnb</category>
      <category>reddit</category>
      <category>github</category>
    </item>
    <item>
      <title>The 8 biggest myths about web scraping 😤</title>
      <dc:creator>Dvir_BD</dc:creator>
      <pubDate>Mon, 22 May 2023 11:25:41 +0000</pubDate>
      <link>https://dev.to/dvir/the-8-biggest-myths-about-web-scraping-3l1e</link>
      <guid>https://dev.to/dvir/the-8-biggest-myths-about-web-scraping-3l1e</guid>
      <description>&lt;h2&gt;
  
  
  Myth #1: Web scraping is not a legal practice
&lt;/h2&gt;

&lt;p&gt;Many people have the misconception that web scraping is illegal. The truth is that it is perfectly legal as long as one does not collect password-protected information, or Personally Identifiable data (PII). The other thing to pay attention to is the Terms of Service (ToS) of target websites, and to ensure that rules, regulations, and stipulations are followed when collecting information from a specific website. Companies that target open source web data that is anonymized and who only work with data collection networks that are CCPA, and GDPR- compliant can never go wrong. &lt;/p&gt;

&lt;p&gt;In the United States, at the Federal level there are no laws prohibiting web scraping as long as the information being collected is public and no harm is done to the target site in the process of scraping. In the European Union and in the United Kingdom, scraping is viewed from an intellectual property standpoint, under the Digital Services Act. This states that ‘ The reproduction of publicly available content’ is not illegal, meaning as long as the data collected is publicly available, you are legally in the clear. &lt;/p&gt;

&lt;h2&gt;
  
  
  Myth #2: Scraping is Only for Developers
&lt;/h2&gt;

&lt;p&gt;This is one of the more common myths. Many professionals with no technical background typically give up on being able to control their data intake without even looking into this. It is true that many scraping techniques do require technical skills that mostly developer types possess. But it is also true that there are new zero-code tools currently available, these solutions help automate the scraping process by making pre-built data scrapers available to the average business person. They also include web scraping templates for popular sites such as Amazon and Booking. &lt;/p&gt;

&lt;h2&gt;
  
  
  Myth #3: Scraping is Hacking
&lt;/h2&gt;

&lt;p&gt;This is not true. Hacking consists of illegal activities that typically result in the exploitation of private networks or computer systems. The point of taking control of these consists of carrying out illicit activities such as stealing private information or manipulating systems for personal gain. &lt;/p&gt;

&lt;p&gt;Web scraping, on the other hand, is the practice of accessing publicly available information from target websites. This information is typically used by businesses to better compete in their space. This results in better services, and fairer market prices for consumers. &lt;/p&gt;

&lt;h2&gt;
  
  
  Myth #4: Scraping is Easy
&lt;/h2&gt;

&lt;p&gt;Many people wrongfully believe that ‘scraping is a piece of cake’. ‘What is the problem?’, they ask, ‘all you need to do is go into the website you are targeting and retrieve the target information’. Conceptually this seems right, but in practice, scraping is a very technical, manual, and resource-heavy endeavor. Whether you choose to use Java ,  Selenium, PHP, or PhantomJs, you need to keep a technical team on staff that knows how to write scripts in these languages. &lt;/p&gt;

&lt;p&gt;Many times, target sites have complex architectures and blocking mechanisms which are constantly changing. Once those hurdles are overcome, data sets typically need to be cleaned, synthesized, and structured so that algorithms can analyze them for valuable insights. The bottom line is that scraping is anything but easy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth #5: Once collected, data is ‘ready-to-use’
&lt;/h2&gt;

&lt;p&gt;This is usually just not the case. There are many aspects to consider when collecting target information. For example, what format can the information be captured in versus what format your systems are able to ingest data in.  For example, let’s say all of the data you are collecting is in JSON format, yet your systems can only process files in CSV. Beyond format, there are also the issues of structuring, synthesizing, and cleaning data before it can actually be used. This may include removing corrupted or duplicated files, for example. Only once the data is formatted, cleaned and structured is it ready to be analyzed and used.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth #6: Data scraping is a fully automated process
&lt;/h2&gt;

&lt;p&gt;Many people believe that there are bots who simply crawl websites and retrieve information at the click of a button. This is not true, most web scraping is manual and requires technical teams to oversee the process and troubleshoot issues. There are, however, ways in which this process can be automated, either by using a Web Scraper IDE tool or simply by buying pre-collected Datasets that do not require any involvement in the complexities of the data scraping process. &lt;/p&gt;

&lt;h2&gt;
  
  
  Myth #7: It is easy to scale data scraping operations
&lt;/h2&gt;

&lt;p&gt;This is a total myth. If you are maintaining in-house data collection software and hardware, as well as a technical team to manage operations. When looking to meaningfully scale operations, new servers need to be added, new team members need to be hired, and new scrapers need to be built for target sites. Consider that the upkeep of a server alone could run a business up to an average of $1,500 on a monthly basis. The larger the company, the higher the cost multiple. &lt;/p&gt;

&lt;p&gt;On the other hand, when relying on Data as a Service provider, however,  scaling operations can be extremely easy as you are relying on third-party infrastructure and teams. As well as live maps of thousands of constantly changing web domains.&lt;/p&gt;

&lt;h2&gt;
  
  
  Myth #8: Web scraping produces large amounts of usable data
&lt;/h2&gt;

&lt;p&gt;This is usually not the case. Businesses performing manual data collection can very often be served inaccurate data or information that is illegible. That is why it is important to use tools and systems that perform quality validation and that route traffic through real peer devices. This enables target sites to identify requesters as real users and ‘encourages’ them to retrieve accurate datasets for the GEO in question. Using a data collection network that uses quality validation will allow you to retrieve a small data sample, validate it, and only then run the collection job in its entirety. Saving both time and resources. &lt;/p&gt;

&lt;h2&gt;
  
  
  The bottom line
&lt;/h2&gt;

&lt;p&gt;As you can see there are many misconceptions regarding data scraping. Now that you have the facts you can better approach your future data collection jobs.&lt;/p&gt;

</description>
      <category>webscraping</category>
      <category>proxy</category>
      <category>selenium</category>
    </item>
    <item>
      <title>Parsing JSON data with Python</title>
      <dc:creator>Dvir_BD</dc:creator>
      <pubDate>Sun, 02 Apr 2023 09:13:15 +0000</pubDate>
      <link>https://dev.to/dvir/parsing-json-data-with-python-596c</link>
      <guid>https://dev.to/dvir/parsing-json-data-with-python-596c</guid>
      <description>&lt;p&gt;&lt;strong&gt;Defining JSON&lt;/strong&gt;&lt;br&gt;
JSON, or JavaScript Object Notation is a format commonly used to transfer data (mainly by APIs) in a way that will not be ‘heavy on the system’. The basic principle is utilizing text in order to record, and transfer data points to a third party.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The rules of JSON Syntax&lt;/strong&gt;&lt;br&gt;
JSON’s syntax is identical to JavaScript (JS) as JSON is essentially an offshoot of JS. Here are the major rules:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One:&lt;/strong&gt; ‘Arrays’ are displayed in square brackets&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;“companies”:[
    {“BrandName”:”Adidas”, “NumberofEmployees”:”20,000″},
    {“BrandName”:”Nike”, “NumberofEmployees”:”31,000″},
    {“BrandName”:”Asics”, “NumberofEmployees”:”14,000″}
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Two:&lt;/strong&gt; ‘Objects’ are flanked by curly brackets&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example: {"BrandName":"Adidas", "NumberofEmployees":"20,000"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Three:&lt;/strong&gt; Data points are separated by commas&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example: "Asics", "Adidas", "Nike"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Four:&lt;/strong&gt; Data points appear in pairs of ‘keys’ and ‘values’&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example: "BrandName":"Adidas"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is the subtotal of all the above parts when combined to display a JSON array of three company records (objects), and the number of employees currently employed at each respective corporation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
“companies”:[
{“BrandName”:”Adidas”, “NumberofEmployees”:”20,000″},
{“BrandName”:”Nike”, “NumberofEmployees”:”31,000″},
{“BrandName”:”Asics”, “NumberofEmployees”:”14,000″}
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON in the context of Python&lt;/strong&gt;&lt;br&gt;
The good news is that Python supports JSON natively. When looking to use JSON in the context of Python, one can enjoy the ease of using Python’s built-in package: ‘The JSON encoder and decoder.’ Give this documentation a good read, and it will be instrumental in helping you kickstart your JSON/Python conversion. To get you started, the first string of code you will need in order to import JSON to Python is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; import json
Here is an example of the structure of what will typically follow:

# some JSON:
x =  '{ "name":"John", "age":30, "city":"New York"}'
# parse x:
y = json.loads(x)
# the result is a Python dictionary:
print(y["age"])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep in mind that JSON information is usually stored in ‘string variables,’ as is the case with the vast majority of APIs. These ‘string variables’ need to be parsed into the Python dictionary (see the next section) before any further actions can be completed in the target language (Python). As demonstrated in the example code snippet above firstly, you want to import the Python JSON module, which contains the load and loads (note that the ‘s’ here stands for ‘string’) functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A useful tool: JSON -&amp;gt; Python ‘dictionary’&lt;/strong&gt;&lt;br&gt;
As with any language, different ‘items’ are said/written differently yet mean the same thing. This is the concept of a dictionary. ‘Chair’ in English is ‘Chaise’ in French. Here is your ultimate JSON -&amp;gt; Python dictionary of the most common/useful terms:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data collection automation: JSON/Python alternatives&lt;/strong&gt;&lt;br&gt;
Bright Data’s Data Collector gives busy professionals a way to collect large amounts of web data without having to write any code. Many companies trying to collect data for competitive intelligence, dynamic pricing strategies, or user-driven market research are actually targeting many of the same websites. That is why Bright Data created &lt;a href="https://brightdata.com/products/web-scraper"&gt;different web scrapers&lt;/a&gt;, including hundreds of ready-to-use, site-specific web crawlers.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>json</category>
      <category>python</category>
      <category>webscraping</category>
    </item>
  </channel>
</rss>
